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

150 Коммитов

Автор SHA1 Сообщение Дата
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
Brandon Jones 4e6f2aeac2 Implement ANGLE_copy_texture_3d Extension
Adds copyTexture3DANGLE and copySubTexture3DANGLE that adds copy
operations on volumetric textures.

Bug: angleproject:2762
Test: angle_end2end_tests

Change-Id: I0076989c2b7ed69abfc73143c325065bdb06a360
Reviewed-on: https://chromium-review.googlesource.com/c/1207216
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-10-04 12:06:13 +00:00
Olli Etuaho 2c8f084543 Add ANGLE_multiview_multisample
We add a novel multiview multisampling extension that includes the
requirement to explicitly resolve the multisampled framebuffer. The
explicit resolve is much more straightforward to implement on top of
OpenGL and D3D11 than implicit resolve found in the native extension
OVR_multiview_multisampled_render_to_texture. It also has predictable
performance characteristics.

The extension allows multiview drawing to 2D multisample texture
arrays and is now enabled on both the GL backend and the D3D11
backend. The implementation is fairly simple, as it involves just
small changes in validation to allow multisampled framebuffer
attachments. The multiview rendering logic is exactly the same
regardless of whether multisampling is enabled.

For the most part the same tests are used to test both multisampled
and non-multisampled rendering. The tests will use a different
framebuffer setup depending on the test param. They resolve the
multisampled framebuffer to a non-multisampled framebuffer prior to
any readbacks from the framebuffer.

Some of the tests are adjusted so that they have the correct sub-pixel
positioning of multisampled quads, so there won't be any pixels that
would be just partially covered.

The tests don't have any tolerance for partially covered pixels - if
we find any platforms where the tests run into a sub-pixel positioning
corner case, tolerance may need to be added later.

BUG=angleproject:2775
TEST=angle_end2end_tests

Change-Id: I590d7f300a92ea5439f2720d9db14a7976db2e1d
Reviewed-on: https://chromium-review.googlesource.com/1221214
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-09-19 13:19:40 +00:00
Jamie Madill f4d429c1cb Fix EGL enum allocation.
The following enums had a small typo causing them to be takend from an
unused block:

EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE
EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM
EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE

Fix this by temporarily defining a secondary enum. Once Chromium is
fixed upstream we can remove the temporary enum.

Reported by dan.glastonbury@gmail.com.

Bug: angleproject:2806
Change-Id: I2ce1dec0a30d5e83f2bec0ae243fd860cbcea4fc
Reviewed-on: https://chromium-review.googlesource.com/1220371
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-09-13 16:19:36 +00:00
Yunchao He 97dbf43611 Add specification for ANGLE_texture_multisample.
The patch adds the specification for the ANGLE_texture_multisample
extension, which enables the functionality of multisample texture.

This extension is also the basis to expose multisample texture to
web via a webgl extension.

BUG=angleproject:2275
BUG=angleproject:2775

Change-Id: I21771ac1d7d3e2fad8bf5d5e0a5c5e082c8fe7a2
Reviewed-on: https://chromium-review.googlesource.com/859917
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-08-31 17:15:44 +00:00
Olli Etuaho 064458a8f8 Remove separate ANGLE_texture_multisample_array
We can just expose OES_texture_storage_multisample_2d_array instead.
The compiler was already changed to accept
OES_texture_storage_multisample_2d_array, and now the change is made
also at the API level.

Out-of-bounds access guarantees provided by ANGLE were the only big
difference between the ANGLE spec and the OES spec, so it's simpler
to just expose the native extension. Safe out-of-bounds accesses can
be guaranteed without having them in the extension spec.

This also adds missing texStorage3DMultisample entry point to the proc
table, which will enable running dEQP tests.

BUG=angleproject:2775
TEST=angle_end2end_tests

Change-Id: Idf376ee877a3374a33de177df023f0531ec8f01d
Reviewed-on: https://chromium-review.googlesource.com/1196722
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2018-08-31 14:04:58 +00:00
Olli Etuaho 4285647bdd Draft ANGLE_texture_multisample_array spec
This is needed for antialiased multiview rendering.

The extension is written against OpenGL ES 3.1. To add support for it
in OpenGL ES 3.0, an extension for exposing non-array multisample
textures will also be required (ANGLE_texture_multisample). This has
been previously proposed though not yet submitted to ANGLE.

The extension spec provides robustness guarantees for sampling
multisample textures. It still needs to be tested whether native
implementations follow these guarantees or if the spec needs to be
adjusted to allow for clamping coordinates. The native
KHR_robust_buffer_access_behavior is not very explicit about whether
the texel fetch robustness applies also to multisample textures.

BUG=angleproject:2775

Change-Id: I1bd721008a10bee29f8e2e06edca19370a9932a7
Reviewed-on: https://chromium-review.googlesource.com/1186336
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2018-08-24 07:16:08 +00:00
Olli Etuaho 8acb1b6127 Allow reads from a multiview framebuffer with one view
It's safe to read from a multiview framebuffer if it is layered and
has just one view. The native OVR_multiview spec supports this as
well.

BUG=angleproject:2062
TEST=angle_end2end_tests

Change-Id: I04e1364390574075f7e06e39a64e3bf05a539a05
Reviewed-on: https://chromium-review.googlesource.com/1156509
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2018-07-31 15:39:00 +00:00
LRN 03d132eb80 Support EGL_(WIDTH|HEIGHT) in eglSurfaceAttrib(), fixed resize
Setting EGL_WIDTH or EGL_HEIGHT results in mFixedWidth and mFixedHeight
changing their values.

Whenever the swap chain is tested for needing a resize, surfaces with
mFixedSize are treated as if they should be resized to mFixedWidth and
mFixedHeight from their current size. This way fixed-size surfaces
can be resized - it's enough to do a couple of eglSurfaceAttrib() calls
and then either let ANGLE check surface for needing a resize in due course,
or force that by calling eglWaitNative().

BUG=angleproject:2725

Change-Id: I2932d8ecd5a2f10500e4aa8583a169aa09bf01bb
Reviewed-on: https://chromium-review.googlesource.com/1139055
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-07-27 18:31:28 +00:00
Olli Etuaho 94c91a9535 Don't allow multiview clear during timer query
This brings the ANGLE_multiview spec in line with WEBGL_multiview.

This also fixes the test so that the timer query extension is
requested when it is being tested.

BUG=angleproject:2062
TEST=angle_end2end_tests

Change-Id: Ibd5c117a5ae2642d26137d9ad44420d6601ba762
Reviewed-on: https://chromium-review.googlesource.com/1143283
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2018-07-23 14:02:59 +00:00
jchen10 82af620e05 ParallelCompile: Add entry points.
Add the extension text, entry points and validations.

BUG=chromium:849576
TEST=angle_end2end_tests

Change-Id: I4c06ee30e4f4fe9bb1c1fecada747b9c78fed0ea
Reviewed-on: https://chromium-review.googlesource.com/1103789
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
2018-06-27 02:07:17 +00:00
Geoff Lang 24ddc7a894 WGL: Support unvirtualized contexts and unsafe multithreading.
When using unvirtualized contexts, DisplayWGL still creates a Renderer for
managing any internal GL resources such as emulated back buffers for
DXGISwapChainWindowSurfaceWGL or D3DTextureSurfaceWGL but also creates a new
Renderer for each GL context.  All created contexts share resources.

BUG=angleproject:2464

Change-Id: I945502514079368e062beef70bed49c61ed44403
Reviewed-on: https://chromium-review.googlesource.com/1097459
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-06-21 20:21:27 +00:00
Brandon Jones 2a01815879 Change Validation For Indexed Draw Without ELEMENT_ARRAY_BUFFER
Changed WebGL Validation to return INVALID_OPERATION any time an
indexed draw call is made without a bound ELEMENT_ARRAY_BUFFER. Spec
was changed to no longer require count > 0 in order to cause error.
Make same spec change to GL_ANGLE_client_arrays extension.

BUG:angleproject:2639
Change-Id: I23963f357119d081890aa5387b2863e1d42b92a5
Reviewed-on: https://chromium-review.googlesource.com/1093984
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-06-19 17:18:46 +00:00
Courtney Goeltzenleuchter 390900a04b Add support for EGL_PLATFORM_ANGLE_EGL_HANDLE_ANGLE
To support ANGLE for Android need a way to tell ANGLE
what library to call when using GL backend.

Bug: angleproject:2418
Test: test-opengl-gl2_copyTexImage
Change-Id: Ie00251b0672a036db4720e1e5b269f66a30a03da
Reviewed-on: https://chromium-review.googlesource.com/1066822
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-05-24 15:56:49 +00:00
Brandon Jones 1816828632 Add initial specification for EGL_ANGLE_explicit_context Extension
Adds formal specification for the unimplemented EGL_ANGLE_explicit_context
extension. This extension will introduce alternate entry points that allow
us to specify the context during the gl function call, so we can avoid
looking it up in TLS.

Bug: angleproject:1395
Change-Id: I6060c02b8edf586dc2443b563e2d292c00e4fbb7
Reviewed-on: https://chromium-review.googlesource.com/1033577
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-05-23 19:19:57 +00:00
Olli Etuaho 44861c48b9 Clarify aliasing rules in CHROMIUM_bind_uniform_location
The CHROMIUM_bind_uniform_location spec previously had some
conflicting information on when uniform location aliasing was
allowed. Now the section on uniform location aliasing makes it clear
that aliasing locations of two statically used uniforms is an error.
This guarantees compatibility between different compiler versions that
may treat a different subset of uniforms as active, depending on
optimizations. It follows the spirit of GLSL ES 3.00.6 spec section
12.46, that has similar rules for attributes.

The implementation is fixed to correctly follow the spec. When
flattening uniforms, static use is tracked separately from activeness.

BUG=angleproject:2262
TEST=angle_end2end_tests

Change-Id: I570fd384064aec66ef0380a53fa01ac5e43eec5a
Reviewed-on: https://chromium-review.googlesource.com/978144
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2018-03-26 17:11:27 +00:00
Geoff Lang 0ab41fa5eb Add an EGL extension to disable GL extensions by default.
BUG=angleproject:2404

Change-Id: I2667ddc92d5c9ef6e0ef115f2fdf0c3d3643d945
Reviewed-on: https://chromium-review.googlesource.com/962702
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2018-03-14 20:46:16 +00:00
Corentin Wallez 3f4b87b474 Expand the EGLIOSurfaceClientBufferTests
This expands the test to check for validation errors and that multiple
formats of IOSurfaces can be read from / rendered to. It fixes a couple
issues in the implementation of the extension too.

Minor fixes in the EGL_ANGLE_iosurface_client_buffer extension text.

Fix a fragile test that was not setting the texture unit a shader is to
sample from.

BUG=angleproject:1649

Change-Id: Ied2a9bfff95cb3a9a7a59008260899eb2fc55575
Reviewed-on: https://chromium-review.googlesource.com/924477
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2018-02-20 16:00:01 +00:00
Olli Etuaho d66e193930 Allow creating EGL pbuffers from typeless D3D textures
A new extension EGL_ANGLE_d3d_typeless_texture_client_buffer is added
that allows creating EGL pbuffers from typeless D3D textures.

The extension increases the flexibility of the API compared to plain
EGL_ANGLE_D3D_texture_client_buffer. The colorspace for the created
EGL pbuffer can be set by using the EGL_GL_COLORSPACE attribute.
Internally this sets the ANGLE format of the buffer. There are new
ANGLE formats that are used specifically for typeless textures,
separate ones for SRGB and linear views into the D3D textures.

The extension is only supported on the D3D11 backend of ANGLE.

BUG=angleproject:2300
TEST=angle_white_box_tests

Change-Id: I6a6cb873d2cc0dca0b7f18a0f2cd35e7bafcb7d8
Reviewed-on: https://chromium-review.googlesource.com/873917
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2018-01-23 16:15:50 +00:00
Olli Etuaho ceffd20ce2 Set colorspace of D3D pbuffers according to DXGI format
When a EGL pbuffer is created based on a D3D SRGB texture using
EGL_ANGLE_d3d_texture_client_buffer, SRGB conversions are performed as
if it was an SRGB surface. The value of EGL_GL_COLORSPACE now
reflects that correctly. If the pbuffer is bound to a texture and used
as a framebuffer attachment, querying GL_FRAMEBUFFER_COLOR_ATTACHMENT
also reflects that correctly.

The behavior is the same on both the D3D backend, where there is no
native interop involved, and on the GL backend using
WGL_NV_DX_interop(2).

There are a few limitations on the GL backend that relies on native
interop:

1. SRGB conversion for textures created this way can't be disabled
using the GL_FRAMEBUFFER_SRGB_EXT toggle that's exposed in ANGLE
through EXT_sRGB_write_control. This is now documented in the
EGL_ANGLE_d3d_texture_client_buffer spec. On the D3D backend this is
not a problem since EXT_sRGB_write_control is not supported either
way.

2. Creating a pbuffer out of a D3D11 texture with the format
DXGI_FORMAT_B8G8R8A8_UNORM_SRGB does not work, even though it was
listed as one of the supported formats in the
EGL_ANGLE_d3d_texture_client_buffer spec. It's now mentioned that
support for this format is optional.

BUG=angleproject:2300
TEST=angle_white_box_tests

Change-Id: I70ee0646680805e4469291a5b2ce59e92fda009e
Reviewed-on: https://chromium-review.googlesource.com/866743
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2018-01-16 15:21:51 +00:00
Jamie Madill f3e2329595 EGL: Expose NULL driver device selection.
This makes the device type selection part of the ANGLE platform
extension. We currently support NULL driver selection on all
available back-ends (although on the NULL back-end, it already
has no device type). Optionally we could expose certain features
of this as separate extensions.

This currently also supports the old hidden enum, until we can
update Chrome and consolidate to the new exposed official enum.

Bug: angleproject:2159

Change-Id: I85d0811098e644e8192c207673af9e18ed7c1da2
Reviewed-on: https://chromium-review.googlesource.com/846021
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-01-05 00:08:29 +00:00
Corentin Wallez 9db70de8ec Reland: Implement EGL_ANGLE_iosurface_client_buffer
Includes a fix for creating pbuffers with <buftype> EGL_D3D_TEXTURE
with EGL_WIDTH and EGL_HEIGHT attributes.

BUG=angleproject:1649
TBR=geofflang@chromium.org

Change-Id: Id2974b8fab02c3218febfac708b9b034e65cbc53
Reviewed-on: https://chromium-review.googlesource.com/823248
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-12-13 00:45:43 +00:00
Corentin Wallez 7f5c3eb768 Revert "Implement EGL_ANGLE_iosurface_client_buffer"
This reverts commit c7abc08034.

Reason for revert: Might have broken Chromium Win10 composition due to validation changes.

Original change's description:
> Implement EGL_ANGLE_iosurface_client_buffer
> 
> BUG=angleproject:1649
> 
> Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2
> Reviewed-on: https://chromium-review.googlesource.com/559107
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>

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

Change-Id: I605b710b6d76056d6276b09822cd6ddca277bfd0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:1649
Reviewed-on: https://chromium-review.googlesource.com/822172
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-12-12 14:55:31 +00:00
Corentin Wallez c7abc08034 Implement EGL_ANGLE_iosurface_client_buffer
BUG=angleproject:1649

Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2
Reviewed-on: https://chromium-review.googlesource.com/559107
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-12-11 19:52:06 +00:00
Corentin Wallez 43fd0d44d2 Add the EGL_ANGLE_iosurface_client_buffer extension text
BUG=angleproject:1649

Change-Id: Ie613ae835ea3e7c590f74429bdd36f7a42045131
Reviewed-on: https://chromium-review.googlesource.com/811905
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-12-06 21:51:12 +00:00
Jeff Gilbert 3dddccff31 Support RGB gl-tex-external stream consumers for StreamProducerNV12.
This makes it relatively simple to sample from a D3D11Texture of
arbitrary format.

From: https://bugzilla.mozilla.org/show_bug.cgi?id=1322746

BUG=angleproject:2233
TEST=angle_end2end_tests

Change-Id: I10cd3043b5cb0c5d36dd613467ba6c0ceadf41af
Reviewed-on: https://chromium-review.googlesource.com/758042
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-12-05 15:24:25 +00:00
Geoff Lang b433e872c8 Change robust resource init into a context creation attribute.
Enabled support on OpenGL even through the extension is not fully
implemented so that testing with Chromium/Passthrough commmand decoder
is still possible.

BUG=angleproject:1635

Change-Id: Ia417b1779aace1eae19514325701a79cd33f4ef3
Reviewed-on: https://chromium-review.googlesource.com/678479
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2017-10-06 14:23:12 +00:00
Geoff Lang 09cd47779d Remove references to the framebuffer fetch extensions in the GL layer.
BUG=angleproject:1523

Change-Id: I145323661bc4fdd596784eb7b6e9d8f4588c7270
Reviewed-on: https://chromium-review.googlesource.com/688099
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2017-10-03 15:24:06 +00:00
Martin Radev da8e257cba Number of views should match when Draw* is called
The ANGLE_multiview specification is modified so that Draw* generates
an error if the number of views in the active program does not match
with the number of views in the active draw framebuffer object.
The tests and validation are modified accordingly.

The patch also sets a contact person, updates the contributor list and
sets the correct enum values in the ANGLE_multiview specification.

BUG=angleproject:2062
TEST=angle_end2end_tests

Change-Id: I15fee4c5e729605bb1d6292f7ad1155637578dea
Reviewed-on: https://chromium-review.googlesource.com/663160
Commit-Queue: Martin Radev <mradev@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2017-09-14 07:50:48 +00:00