Граф коммитов

178 Коммитов

Автор SHA1 Сообщение Дата
Kenneth Russell af72779224 Improve EGL_ANGLE_power_preference on dual-GPU MacBook Pros.
Add the ability to release and reacquire the high-power GPU, and to
respond to changes in the active GPU. In Chromium, the GPU process can
not access the WindowServer. An external process must inform ANGLE
that the active GPU has changed, and that ANGLE should switch its
internal context to the new GPU.

Incorporates a couple of functions from WebKit, used with permission,
to effect this GPU switch.

A follow-on change in Chromium which uses these new APIs will make the
existing dual-GPU tests pass with ANGLE and the passthrough command
decoder.

Carry forward Chromium's workaround of disabling GPU switching on
older MacBook Pros to ensure stability.

Document the process of adding new EGL extensions to ANGLE.

Bug: chromium:1091824
Change-Id: I499739156e851b493555d4d6e4aef87d8b97fa31
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2240638
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-06-12 23:38:22 +00:00
Maksim Sisov 8ba5cf99b0 Add EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE
This CL adds a new attribute that helps to identify
lower platform angle should use. We identified
several different use cases that ANGLE must
comply with when choose a display implementation.
Please refer to the
Support Matrix for EGL_ANGLE_platform_angle table

Bug: chromium:1084458
Change-Id: I6ea3d5081012ddf450f1c641343d1ba1a673483b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2210151
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
2020-06-04 02:20:23 +00:00
Sunny Sachanandani 3d5f0c8261 Use surface texture offset for clears and blits
https://chromium-review.googlesource.com/c/angle/angle/+/2186176 added
surface texture offset attributes for D3D11 pbuffer surfaces, but the
implementation didn't apply the offset to blits or clears. This CL fixes
that and includes a unit test for blit, clear, and draw.

Also renames textureOffset to surfaceTextureOffset throughout since it's
clearer, and fixes the dcomp surface test to specify the update offset
returned by dcomp BeginDraw().

Bug: angleproject:2997
Change-Id: I9298ccf55cbb2d04c3b8f78e12f9d07dc8fa54b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2210967
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-05-26 23:18:47 +00:00
Sunny Sachanandani 4b225c70c1 Add texture offset attributess for D3D texture pbuffer surfaces
Add EGL_TEXTURE_OFFSET_X_ANGLE and EGL_TEXTURE_OFFSET_Y_ANGLE attributes
to EGL_ANGLE_d3d_texture_client_buffer which are used to specify offsets
used for rendering into the pbuffer surface backed by a D3D11 texture.
Rendering with the correct offset is needed when Chrome gets a texture
and offset from an external source e.g. when calling BeginDraw() on
IDCompositionSurface.

Bug: angleproject:2997
Change-Id: I363f739f3f05c38720f385e34c91e98fc6a622a0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2186176
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
2020-05-14 19:24:55 +00:00
Patrick To a2ec926cfc Specify LUID in D3D11
Add an extension to provide the ability to specify the LUID of the
GPU adapter to use when using D3D11.

Corresponding chromium CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2096778

Bug: chromium:792657
Change-Id: Iefebea221a4b7a20f150b445ae1adf375444726d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2096663
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
2020-05-06 22:21:27 +00:00
Michael Spang 3c2d329cab Fix wrong date in ANGLE_external_objects_fuchsia revision history
The current timeline implies the existence of time travel.

Bug: None
Change-Id: Ic558f430912b874afc881f4841a49236f26b78dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2178945
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-05-04 17:07:48 +00:00
Jonah Ryan-Davis 4b94d7bb4f Split EGL_CHROMIUM_sync_control into EGL_ANGLE_sync_control_rate
eglGetMscRateCHROMIUM was added to EGL_CHROMIUM_sync_control based
on the original extension GLX_OML_sync_control. However, this new
function is not universally implemented. This CL moves it to a new
extension, EGL_ANGLE_sync_control_rate, and renames it to
eglGetMscRateANGLE.

Bug: chromium:1064078
Change-Id: Ia2a29c6776b2b2bf2b98e58ee83b5f141ed01301
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118154
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-03-31 20:55:48 +00:00
Julien Isorce 07044c6549 Reland "Instantiate rx::DisplayEGL when device type EGL is selected"
This is a reland of 7455b54401

Original change's description:
> Instantiate rx::DisplayEGL when device type EGL is selected
>
> Define EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE that should be
> used to request a driver egl-backed implementation with ANGLE.
>
> Bug: angleproject:4328
> Change-Id: I6871d3a27e2bfc02af9815dcf86ae1cb6524f0cc
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2030038
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

Bug: angleproject:4328
Change-Id: I4e997c4fa1b5b59f081436f05bd208303ffe38e9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2093412
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
2020-03-12 22:21:48 +00:00
Ian Elliott 03ed5f6c46 Revert "Instantiate rx::DisplayEGL when device type EGL is selected"
This reverts commit 7455b54401.

Reason for revert: This appears to break the "Linux FYI Ozone (Intel)" bots on the chromium.gpu.fyi waterfall.  Ozone means ChromeOS.

Original change's description:
> Instantiate rx::DisplayEGL when device type EGL is selected
> 
> Define EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE that should be
> used to request a driver egl-backed implementation with ANGLE.
> 
> Bug: angleproject:4328
> Change-Id: I6871d3a27e2bfc02af9815dcf86ae1cb6524f0cc
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2030038
> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=geofflang@chromium.org,syoussefi@chromium.org,jonahr@google.com,julien.isorce@chromium.org

Change-Id: I8aec6c2783b0acb67d3315d351cdc9e526f58d6b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:4328
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2091864
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
2020-03-06 22:15:53 +00:00
Julien Isorce 7455b54401 Instantiate rx::DisplayEGL when device type EGL is selected
Define EGL_PLATFORM_ANGLE_DEVICE_TYPE_EGL_ANGLE that should be
used to request a driver egl-backed implementation with ANGLE.

Bug: angleproject:4328
Change-Id: I6871d3a27e2bfc02af9815dcf86ae1cb6524f0cc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2030038
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-03-06 17:39:35 +00:00
Michael Spang 0941e65385 Add external object extensions for Fuchsia to GL API
Add extensions layered on top of GL_EXT_memory_object and GL_EXT_semaphore
to support GL & Vulkan interoperation on Fuchsia. They are analagous to
the file descriptor versions, except not quite as opaque.

This is a draft; the underlying vulkan extensions have not been submitted
to Khronos.

Bug: angleproject:3492
Change-Id: Ic4723ded9fff752c4186eaa6a7f07d9ac51a3364
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642332
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-02-20 21:54:21 +00:00
Jonah Ryan-Davis 806ba5663b Extend ANGLE_iosurface_client_buffer to Vulkan backend for Swangle
Implement an IOSurface-backed pBuffer surface for the Vulkan backend
on Mac, through SwANGLE. ANGLE will pass a raw pointer to Swiftshader
and handle locking/unlocking the IOSurface.

Bug: chromium:1015454
Change-Id: Ia3ead55334736003d405b54ba8dcc7701706fbb2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965434
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2020-02-05 21:19:16 +00:00
Jonah Ryan-Davis 1a1a1427fd Expose eglGetMscRateCHROMIUM from EGL_CHROMIUM_sync_control
When ANGLE is using the GL backend on GLX, we can expose
eglGetMscRateCHROMIUM via glXGetMscRateOML. Otherwise, this function
should return false.

Bug: chromium:1042393
Change-Id: Id9b308c2217e07ee9860e2869be0e23b7a0c7411
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2017048
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-01-27 19:30:45 +00:00
Kenneth Russell 86f7309717 Upstream support for iOS Simulator.
Originally authored in the WebKit repository:
https://bugs.webkit.org/show_bug.cgi?id=205618

Has been tested with WebKit's WebGL backend on top of ANGLE inside the
iOS Simulator. TODOs will be addressed in forthcoming CLs.

Bug: angleproject:4263
Change-Id: Ic879866aaee5f933599d956b0646d0c01db55d0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1995824
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2020-01-14 21:08:21 +00:00
Kenneth Russell 12ce8f687d Upstream WebKit's iOS port of ANGLE.
Added the EAGL backend authored by Dean Jackson from Apple, and the
refactoring changes needed to support it side-by-side with the macOS
backend. Ran "git cl format" against these diffs.

Defined the EGL_ANGLE_device_eagl extension and allocated an enum out
of ANGLE's reserved range.

The iOS backend is not yet included in any of the GN files.

Bug: angleproject:4263
Change-Id: I631c32930433c03bb16a242955ffedf55174bb29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1987278
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: James Darpinian <jdarpinian@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2020-01-10 02:00:18 +00:00
James Darpinian 27db24581e Optimize disabling ARB_texture_rectangle
In https://crrev.com/c/1838418 I added the ability to disable
ARB_texture_rectangle so that we can use it in the WebGL implementation
but disable it when compiling user shaders. Unfortunately disabling
and re-enabling the extension causes the shader translator to be
reinitialized which turns out to be more expensive than the actual
work of shader translation, at least for small shaders. It's slow enough
to cause timeouts in WebKit's WebGL conformance test runs.

This introduces an alternate method of disabling ARB_texture_rectangle
in the translator which is much faster because it avoids reinitializing
the translator.

Bug: angleproject:3956
Change-Id: I5d31b683ff19a59bdfd289cfd3c609f64ef5e25b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1991969
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
2020-01-09 17:46:38 +00:00
Jonah Ryan-Davis f9c3eaf457 Add ability to disable all ANGLE features
Chrome has a --disable-gpu-driver-bug-workarounds flag that needs to be
able to be forwarded to ANGLE

Bug: 1016377
Change-Id: Ied6c8656742e25c32d508b8bfe76a902d82bcf93
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1925249
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-11-20 17:01:23 +00:00
Jamie Madill c898ec1a5e Add EGL GGP extensions.
This CL adds two new extensions:

 * EGL_ANGLE_ggp_stream_descriptor:
    Introduces a new attribute to CreateWindowSurface. Allows the app
    to pass in a stream descriptor to VkCreateSurfaceKHR.
    Mirrors VK_GGP_stream_descriptor_surface.

 * EGL_ANGLE_swap_with_frame_token:
    Introduces a new function 'eglSwapBuffersWithFrameTokenANGLE'. This
    allows the app to pass a GGP frame token down to vkQueuePresentKHR.
    Mirrors VK_GGP_frame_token.

Bug: angleproject:4078
Change-Id: I4313ac4c264e68999905049f661bc64b44f72fab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1897315
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-11-05 01:50:17 +00:00
shrekshao 35f74cd6f8 Reorder BaseVertexBaseInstance draw calls parameters
To match the parameter order of MultiDraw* calls.
And potentially expose in chromium directly with ANGLE_ prefix.

Bug: angleproject:3402, chromium:891861
Change-Id: I19548f4c3c7faa422e43905850b218039de43015
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894241
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2019-11-01 20:14:45 +00:00
Jamie Madill 0964988b77 Fixups to ANGLE_get_image boilerplate.
- Remove level parameter from GetRenderbufferImage.
- Add packed enum handling to GetTexImage.
- Fix ext spec reference to table 8.4.

Bug: angleproject:3944
Change-Id: I8f67608396217aaddb789dd95d0f3e2378ce918d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879960
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-28 15:21:53 +00:00
Jamie Madill 04ee27efff Capture/Replay: Add ANGLE_get_image extension.
Will be used for mid-execution capture. Only has a
stubbed-out implementation right now.

Bug: angleproject:3944
Change-Id: I6ddae07907ecbdbd3be9a5d2d3fcafeb425445e4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1878888
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-10-25 19:02:16 +00:00
James Darpinian c42da4e57c Extend ANGLE_request_extension with DisableExtension
ARB_texture_rectangle is the only currently supported disablable
extension. This allows us to use ARB_texture_rectangle in WebGL
implementations without exposing it to WebGL user shaders.

Bug: angleproject:3956
Bug: angleproject:3770
Change-Id: I80b10d2e9c9feebe545ce15195721487165ecc51
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1838418
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-10-12 00:42:21 +00:00
Nathan Zabriskie 5d9c4ee328 Add D3D11on12 device option
This CL adds a new D3D11on12 device option which runs the D3D11
API on top of D3D12. This is done to aid in preliminary
investigations into the feasibility of creating a full D3D12
backend implementation.

Bug: angleproject:3919
Change-Id: I0ad4250eb3c93b0b74274c904aac74f03753c7ad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1814404
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-10 02:07:39 +00:00
Jamie Madill 09495f87d9 Add ANGLE Platform Metal extension.
EGL_ANGLE_platform_angle_metal is the new extension name.

Bug: angleproject:2634
Change-Id: I6ebffbd4f6d7974bc5ef6d48849e985ee83e9808
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1848793
Reviewed-by: Le Hoang Quyen <le.hoang.q@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-10-09 15:41:52 +00:00
Kenneth Russell 8e7d9d6c23 Add EGL_ANGLE_device_cgl extension.
Supports querying the CGLContextObj and CGLPixelFormatObj associated
with ANGLE's underlying OpenGL context on macOS.

Minor refactorings to implementation of device attribute queries on
all platforms.

Bug: angleproject:3973
Change-Id: I24341668be4cbfed0b7f2df4c1402df1effe275e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1846733
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-09 03:45:28 +00:00
Kenneth Russell d01ae535b3 (ANGLE) Rename CHROMIUM_compressed_texture_etc to use ANGLE_ prefix.
This is the ANGLE side of a two-sided patch including Chromium to
rename this synthetic OpenGL extension to use an ANGLE_ prefix.

Bug: chromium:1011653
Change-Id: Ice4b526a34157ebbd8c283aacc9437fae2e35d6e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1843506
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2019-10-08 18:19:23 +00:00
Jonah Ryan-Davis 7dd034469a Ensure Features* descriptions stay up to date
Created a macro to help keep Features' descriptions up to date. This
will avoid confusion in the future when conditions change. Also update
all descriptions to match current state.

Bug: angleproject:3947
Change-Id: Ifc65e7789c916fab79f1323798dfb59d7a4efad2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1829584
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-10-02 15:57:35 +00:00
Jamie Madill 8be7a4c7f7 Re-land "Vulkan: SwiftShader integration."
Re-land fixes Win7 configs and placement of the SwiftShader module for
ASAN/TSAN configs.

Adds a new EGL extension for picking SwiftShader when using the Vulkan
back-end. Also cleans up ICD enabling code RendererVk. Also includes a
change to a buffer size necessary to support SwiftShader's minimum
limits.

Bug: angleproject:3876
Bug: b/140251624
Change-Id: I5e16057ac4de07bbdbbd248542b1b9103133294f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1810065
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-09-21 14:00:27 +00:00
Zhenyao Mo db7a36f456 Revert "Vulkan: SwiftShader integration."
This reverts commit 1224802c21.

Reason for revert: https://bugs.chromium.org/p/angleproject/issues/detail?id=3912

Original change's description:
> Vulkan: SwiftShader integration.
> 
> Adds a new EGL extension for picking SwiftShader when using the Vulkan
> back-end. Also cleans up ICD enabling code RendererVk. Also includes a
> change to a buffer size necessary to support SwiftShader's minimum
> limits.
> 
> 32-bit is currently left disabled to work around an issue on AMD Win7.
> 
> Bug: angleproject:3876
> Bug: b/140251624
> Change-Id: I33c55d994801d6154caca0cad0a608c1e808d517
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776231
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=geofflang@chromium.org,jonahr@google.com,jmadill@chromium.org

Change-Id: Id7464250f6941b0228a6b2a9bd0349823727275b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3876, b/140251624
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1808101
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
2019-09-17 00:22:43 +00:00
Jamie Madill 1224802c21 Vulkan: SwiftShader integration.
Adds a new EGL extension for picking SwiftShader when using the Vulkan
back-end. Also cleans up ICD enabling code RendererVk. Also includes a
change to a buffer size necessary to support SwiftShader's minimum
limits.

32-bit is currently left disabled to work around an issue on AMD Win7.

Bug: angleproject:3876
Bug: b/140251624
Change-Id: I33c55d994801d6154caca0cad0a608c1e808d517
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776231
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-09-16 20:52:55 +00:00
Sunny Sachanandani c1af9abfce Add support for overriding internal format for D3D11 texture EGLImages
Add an optional EGL_D3D11_TEXTURE_FORMAT_ANGLE attribute that is the
GL internal format to use for EGLImage being created.  This will be used
for RGB emulation of swap chain texture backed WebGL contexts in Chrome
when they have alpha:false set.  Without RGB emulation it is possible to
observe side-effects of the underlying swap chain being RGBA such as
reading/writing the alpha channel, BlitFramebuffer working/not working
when expected, etc.

Also document creating EGLImages from D3D11 textures in the existing
EGL_ANGLE_d3d_texture_client_buffer extension along with RGB emulation.

Bug: chromium:699566, chromium:939657
Change-Id: I4931cb7bdc46e9bc6debd56b79ecc10ea27bd78b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1777099
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
2019-09-09 21:32:50 +00:00
shrekshao cdecd97cee Add Draw base vertex and base instance function entrypoints
Split from https://chromium-review.googlesource.com/c/angle/angle/+/1705035/27

This patch adds entrypoints glDrawArraysInstancedBaseInstanceANGLE,
glDrawElementsInstancedBaseVertexBaseInstanceANGLE,
glMultiDrawArraysInstancedBaseInstanceANGLE,
and glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE

Implementation will come in a later separate patch.

Bug: chromium:891861, angleproject:3402
Change-Id: I18e19b850cddd79be4798b9ae7efe0680a050c7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1750125
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-08-16 00:27:22 +00:00
Geoff Lang b3eeb2a403 Emulate RGB textures using BGRX IOSurfaces.
When the user requests an IOSurface Pbuffer with an RGB format, emulate the
missing alpha channel by clearing it to 1.0 and masking reads and writes in
shaders.

BUG=angleproject:3766

Change-Id: I58c992bf641d9ece0f923603f32640615150e4f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1737437
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2019-08-13 21:54:02 +00:00
Geoff Lang 6a02f06dfd Implement EGL_ANGLE_create_context_backwards_compatible
This extension allows the user to specify if ANGLE should create a
context of the exact requested version or a higher version context that
is backwards compatible.

BUG=angleproject:3425

Change-Id: I7d0b75cdd7e34a2fc888aa238e1eeb67af82ae0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601560
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-07-18 22:51:46 +00:00
Jonah Ryan-Davis beb0eb2d8c Clean up workarounds/features to single location.
Rename all workarounds structs to features, and move the lists to a
shared location in include/platform (to help with documentation,
see:
https://cs.chromium.org/chromium/src/ui/gl/gl_switches.cc?sq=package:chromium&g=0&l=69)

Bug: angleproject:1621
Change-Id: I4069f08131db5e886047a007efb5d7764dfee5f2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660952
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-17 19:44:51 +00:00
Jonah Ryan-Davis fce1e2d1e2 Extend eglGetPlatformDisplay to allow feature overrides.
Add EGL_FEATURE_OVERRIDES_ENABLED_ANGLE and
EGL_FEATURE_OVERRIDES_DISABLED_ANGLE to submit lists of strings naming
the features that should be overridden (either enabled or disabled) on
display creation.

Bug: angleproject:1621
Change-Id: I4bb75c5dbab0e3b701a72069c38f8c60ecfffad2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646595
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-06-12 14:01:50 +00:00
Jonah Ryan-Davis e431aaa15a Rename EGL_ANGLE_workaround_control to EGL_ANGLE_feature_control.
For consistency, call these ANGLE "features", a subset of which may be
workarounds. Also, whether the feature is enabled/disabled should be
publically visible as "status".

Bug: angleproject:1621
Change-Id: I0de90a932fbfe1fc9b59138153d616d29fa7268b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1643410
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-06-04 18:51:44 +00:00
Jonah Ryan-Davis 2dd40a44d1 Add eglQueryDisplayAttribANGLE to query workarounds count.
Add eglQueryDisplayAttribANGLE based on eglQueryDisplayAttribEXT to add
behavior for quering the count of all workarounds available. Used
externally to build a list of workarounds.

Bug: angleproject:1621

Change-Id: I793acedc76111fd018600169d58bf5d8cf4a63ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1637817
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-06-03 22:36:28 +00:00
Jonah Ryan-Davis f52f2637ae Add EGL_ANGLE_workaround_control extension.
This extension is used to query strings from an array based on index,
which will be used to query all the information about workarounds in
ANGLE.

Bug: angleproject:1621

Change-Id: I27157f278f7f17c92c8b4fd7753e2a5ecd0528f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1627723
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-05-29 19:39:42 +00:00
Kenneth Russell 51386f4a5e Reland "Define and expose EGL_ANGLE_power_preference extension."
This is a reland of ac58e63295

The original CL was reverted in a rush because I thought there was an
uninitialized variable bug, but upon later re-review this turned out to
not be the case.

Original change's description:
> Define and expose EGL_ANGLE_power_preference extension.
>
> Allows application to select the integrated or discrete GPU on
> dual-GPU macOS systems.
>
> Tested by modifying the example program at:
> https://github.com/grorg/ANGLEIOSurfaceTest
>
> and verifying that both integrated and discrete GPUs can be selected.
> (The changes to that program will be upstreamed once some build issues
> are resolved.)
>
> Bug: 2813
> Change-Id: Ibeb17778512896456d220e9bc4cf8f222aa57057
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570081
> Commit-Queue: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

Bug: 2813
Tbr: geofflang@chromium.org
Tbr: cwallez@chromium.org
Change-Id: Iea000dd718f4f4b4f57237adb1dc44381b10106b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575419
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2019-04-19 07:22:23 +00:00
Kai Ninomiya 145ec7fa7c Revert "Define and expose EGL_ANGLE_power_preference extension."
This reverts commit ac58e63295.

Reason for revert: Revert on kbr's request: "has an uninitialized variable bug"

Original change's description:
> Define and expose EGL_ANGLE_power_preference extension.
> 
> Allows application to select the integrated or discrete GPU on
> dual-GPU macOS systems.
> 
> Tested by modifying the example program at:
> https://github.com/grorg/ANGLEIOSurfaceTest
> 
> and verifying that both integrated and discrete GPUs can be selected.
> (The changes to that program will be upstreamed once some build issues
> are resolved.)
> 
> Bug: 2813
> Change-Id: Ibeb17778512896456d220e9bc4cf8f222aa57057
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570081
> Commit-Queue: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=geofflang@chromium.org,kbr@chromium.org,cwallez@chromium.org

Change-Id: Icb936d91eec70deb825585da3ff8835ca2794736
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 2813
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575134
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2019-04-19 01:50:45 +00:00
Kenneth Russell ac58e63295 Define and expose EGL_ANGLE_power_preference extension.
Allows application to select the integrated or discrete GPU on
dual-GPU macOS systems.

Tested by modifying the example program at:
https://github.com/grorg/ANGLEIOSurfaceTest

and verifying that both integrated and discrete GPUs can be selected.
(The changes to that program will be upstreamed once some build issues
are resolved.)

Bug: 2813
Change-Id: Ibeb17778512896456d220e9bc4cf8f222aa57057
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570081
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-04-19 01:40:32 +00:00
Sunny Sachanandani b8a8ffd3fc Add support for RGB10A2 in eglCreatePbufferFromClientBuffer
Bug: chromium:937108

Change-Id: I689562ebff9f9f85ecb8af918bbb788b16b0f91b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565420
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-04-16 21:04:02 +00:00
Mingyu Hu 7d64c4863d GL_ANGLE_multiview has been renamed to GL_OVR_multiview2.
changes include:
1) GL_OVR_multiview to GL_OVR_multiview2 extension directive change
2) Removal of all references to side by side. We no longer support multiple views in a single 2DTexture. Only 2DTextureArray's are supported
3) WebGL 2 (ES3) is required for multiview

Bug: angleproject:3341
Change-Id: Ie0c1d21d7610f8feebdb2e4d01c6947f57e69328
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552023
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-04-16 17:37:10 +00:00
James Darpinian 2889dff699 Mac: Support using an IOSurface as the default framebuffer
Bug: angleproject:2764
Change-Id: I3fdab330b59ed996f68e3063debca29323a66cf0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1542599
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-04-03 00:02:36 +00:00
Jonah Ryan-Davis 2b0553ce59 Implement EXT_instanced_arrays
Bug: angleproject:3015
Change-Id: Ib01cc5e0df6db27981cb843a6bd386de5d10c2db
Reviewed-on: https://chromium-review.googlesource.com/c/1452740
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-02-08 20:40:08 +00:00
Jamie Madill 3a25622879 Update ANGLE_multiview validation.
Multiview transform feedback now passes if the transform feedback is
paused. Also updates the relevant validation. This aligns the
ANGLE_multiview validation with OVR_multivew and with the WebGL
extension spec.

This change allow us to combine multiple draw call validation updates
into one update function.

Bug: angleproject:3012
Change-Id: I2ce04edc386039134198afa1792201e03cc20490
Reviewed-on: https://chromium-review.googlesource.com/c/1357148
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2018-12-12 01:00:09 +00:00
Austin Eng 3b7c9d099b Change offsets in MultiDrawElements* entrypoints to match glMultiDrawElements
This patch changes arguments for MultiDrawElements and
MultiDrawElementsInstanced from from GLsizei *offsets to
const* GLvoid* indices.

Bug: chromium:890539

Change-Id: I2124cf2daeaa6af0f889f3c46aa2b8c77be200a6
Reviewed-on: https://chromium-review.googlesource.com/c/1352591
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2018-11-28 01:50:44 +00:00
Austin Eng 1bf18ce9e2 Implement GL_ANGLE_multi_draw
This patch adds entrypoints glMultiDrawArraysANGLE,
glMultiDrawElementsANGLE, glMultiDrawArraysInstancedANGLE,
annd glMultiDrawElementsInstancedANGLE

Bug: chromium:890539

Change-Id: Ic9c374c53892460f44ca6e73a253b78473ac2dff
Reviewed-on: https://chromium-review.googlesource.com/c/1282268
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2018-11-06 18:04:07 +00:00
Geoff Lang 1590fcc4d3 Add a spec and tests for GL_ANGLE_memory_size.
Change the data type of buffer memory sizes to 64 bit integers.

BUG=892288

Change-Id: I10e07b86f2ccc0cb61c8d7ee0d439e00d5eb8d3a
Reviewed-on: https://chromium-review.googlesource.com/c/1312244
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-11-02 20:37:23 +00:00