185 Commits

Author SHA1 Message Date
Shahbaz Youssefi
2d5fb09d7f Stubs for EGL_ANGLE_external_context_and_surface
Bug: angleproject:5509
Change-Id: I8e2395784abcd2b4e3e1f888e70a879ef49287bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706026
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-07-25 16:16:54 +00:00
Alexey Knyazev
94ceedb7e8 Add GL_EXT_texture_compression_astc_decode_mode stubs
Bug: angleproject:8254
Change-Id: I2a839139b5738710e32842b04db35eab8fb04687
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4679683
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-12 10:27:03 +00:00
Shahbaz Youssefi
4439593002 Make various state setting entry points lockless
These entry points only set context-local state and thus don't require
locking.

Bug: angleproject:8224
Change-Id: I428c23cc862e9356d571bc085b5df0bf48017175
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4661700
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-07-06 23:38:50 +00:00
Steven Noonan
a01a566c48 extension xmls: fix incorrect use of <ptype> tags
I was having trouble using some GL/EGL loader generators because of some
errors in the XML definitions for ANGLE.

The first major problem is the content of the <ptype> tags. Let's refer
to the Khronos registry XML schema (which is annoyingly a PDF rather
than an xsd that we can test against, though I don't know if an xsd
would catch this anyway):

    https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/readme.pdf

In section 12.4.2, "Contents of <param> tags" it states:

    The <ptype> tag is optional, and contains text which is a valid type
    name found in <type> tag, and indicates that this type must be
    previously defined for the definition of the command to succeed.
    Builtin C types, and any derived types which are expected to be
    found in other header files, should not be wrapped in <ptype> tags

Note that the above is repeated for the contents of <proto> tags as
well.

The extension XML files currently have a bunch of <ptype> tags which
don't meet the expectations described above. The correct transformation
for them would be, for example:

    <ptype>GLfloat *</ptype>      ->   <ptype>GLfloat</ptype> *
    <ptype>void *</ptype>         ->   void *
    <ptype>const char *</ptype>   ->   const char *
    <ptype>EGLAttrib *</ptype>    ->   <ptype>EGLAttrib</ptype> *

The next issue is that some tags have some typos, such as "<pytpe>"
instead of "<ptype>". (Now *that* is something an .xsd would catch...)

The last issue is the use of the typename "GLvoid" which is not as
serious a problem. It is still defined in Khronos' gl.xml <types> block,
but Khronos no longer uses it in their XML registries. The comment for
the "GLvoid" type in their <types> block states:

    <type comment="Not an actual GL type, though used in headers in the past">typedef void <name>GLvoid</name>;</type>

So we might as well replace those with just plain "void".

Anyway, long story short: to apply these transformations, I used Perl
regular expressions, and applied these expressions in order:

- Fix the tag misspellings:

    s#<(/?)pytpe>#<\1ptype>#g

- Move the const qualifiers (if present) and pointer asterisk(s) (if
  any) outside the <ptype> tag itself:

    s#<ptype>(const )?([A-Za-z0-9]+)[ ]?(\*\*?)</ptype> #\1<ptype>\2</ptype> \3#g

- Replace "GLvoid", "char", and "void" inside ptype tags to normal
  C types outside tags:

    s#<ptype>(GLvoid|void|char)</ptype>#\1#g

Bug: angleproject:8190
Change-Id: Ib0bea79fecb7e714910b6e92124bb9f52994d0fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4603709
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-06-09 21:15:16 +00:00
Steven Noonan
beeb465b6c xml: fix enum EGL_SYNC_METAL_SHARED_EVENT_SIGNALED_ANGLE
The name in the extension/require block did not match the name in the
enum specification block. This caused some EGL loader generators to fail
to run properly.

Bug: angleproject:8190
Change-Id: I6ce6e226121e7ea9aa611c7d331a8fd1bc83e55b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4603708
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2023-06-09 17:56:22 +00:00
Roman Lavrov
8447e2792a code_generation_hashes json files end with newline
Bug: None
Change-Id: Iddd2c1777a1d5486a4d390c6e3d56ffb09f47f02
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4574569
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Roman Lavrov <romanl@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-05-30 18:08:28 +00:00
Alexey Knyazev
b7a5714f11 Add polygon mode extension stubs
* Added NV_polygon_mode

* Specified a portable polygon mode extension
  implementable on all ANGLE backends

Bug: angleproject:1791
Bug: angleproject:8132
Change-Id: I018aaaf1fb43ec16910859b152049e02169ede91
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4492684
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-05-01 21:21:01 +00:00
Vikas Soni
b5fa872897 Add extension to skip texture renderability validation in ANGLE.
Add a new extension to skip the texture renderability
validation in ANGLE.

Bug: angleproject:0000
Change-Id: Ia9e5a1eff233f5aced4706b7d3c183058d474c41
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4455549
Auto-Submit: vikas soni <vikassoni@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: vikas soni <vikassoni@chromium.org>
2023-04-25 22:28:47 +00:00
Chris Dalton
a491bbe3bb Add PLS utilities for interrupting a rendering pass
Adds two more simple commands to ANGLE_shader_pixel_local_storage that
allow WebGL and the command buffer to interrupt rendering passes without
having to either (1) make expensive queries, or (2) track lots of
complex state for validation that they are not currently equipped to
track.

Bug: chromium:1421437
Change-Id: I80eaef3ae6b0b4bbbecb9cd2268ac90b43675d1c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4355032
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2023-03-21 21:45:35 +00:00
Chris Dalton
513ca72369 Delete GL_LOAD_OP_DISABLE_ANGLE from PLS
This load op makes the PLS spec and WebGL implementations unnecessarily
complex.

Bug: chromium:1421437
Change-Id: Iab02a8b02083899c6cc345ecb25b88c5871611c9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4335148
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-03-14 15:03:44 +00:00
Chris Dalton
b468e4dd03 Add back "non-robust" PLS queries
Chrome doesn't have a codegen template for queries that model the
"robust" signature, so support both types.

Specify that the robust variants are only supported if
ANGLE_robust_client_memory is supported, so Chrome and other
implementations don't have to support them.

Bug: chromium:1421437
Change-Id: Icc69b69ce9ce0a2cfad0dbeed1f3b29bcfa92d20
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4321867
Commit-Queue: Chris Dalton <chris@rive.app>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-03-10 17:16:01 +00:00
Chris Dalton
f2e13539b5 Implicitly enable PLS dependency extensions
The ANGLE_shader_pixel_local_storage implementation makes internal use
of various other extensions. These extensions must be implicitly enabled
when ANGLE_shader_pixel_local_storage is in use. In this CL:

* Convert ANGLE_shader_pixel_local_storage and
  ANGLE_shader_pixel_local_storage_coherent to requestable extensions.

* Implicitly enable the dependency extensions, including each other, at
  the time either of these extensions is enabled.

Bug: angleproject:7279
Bug: chromium:1421437
Change-Id: I26acbda776fe7045ea99d4f1e3df445e7a5cfd7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4306526
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
2023-03-10 10:02:46 +00:00
Dan Glastonbury
aa5b97de88 ANGLE_metal_shared_event_sync: Control signaling external events
It was assumed that the external MTLSharedEvent passed to eglCreateSync
should be signaled by the GL. This change adds
EGL_SYNC_METAL_SHARED_EVENT_SIGNALED_ANGLE, which when passed as the
value for EGL_SYNC_CONDITION during eglCreateSync, changes the behavior
to not insert a fence command into the command stream.

Test: angle_end2end_tests --gtest_filter=EGLSyncTestMetalSharedEvent.AngleMetalSharedEventSync_WaitSync_ExternallySignaled
Bug: angleproject:8064
Change-Id: Ia1b8615b976f293d411b7d2be506b0ac87d64dee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4307152
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
2023-03-09 01:42:53 +00:00
Alexey Knyazev
52ba6071e1 Add EXT_texture_filter_minmax stubs
Bug: angleproject:8072
Change-Id: Idfc2f2ff0eff7b0f6c131c37aeb53fb04019257d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4315865
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-03-08 18:54:12 +00:00
Chris Dalton
a65f6a9dfe Make PLS queries robust
There's no reason not to mirror the ANGLE_robust_client_memory API here.

Bug: chromium:1421437
Change-Id: Ifb8b1a9675abe2ceb35272dc905f3c38f29dceda
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4317485
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
2023-03-08 06:43:21 +00:00
Alexey Knyazev
a2efea13c9 Add ANGLE_stencil_texturing
This extension allows texturing of the stencil
component of a packed depth stencil texture on
OpenGL ES 3.0 contexts.

Trivially exposed on backends that support
OpenGL ES 3.1, which requires this feature.

Adjusted the tests to check for the new
extension string instead of the context
version.

Bug: angleproject:8051
Change-Id: I4d833acbc72e7374bde91d4c861598a0fdaf9b90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4295312
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-03-01 18:17:38 +00:00
Alexey Knyazev
1ca860acad Add extension stubs
* GL_EXT_conservative_depth
* GL_EXT_depth_clamp
* GL_EXT_render_snorm

Bug: angleproject:8046
Bug: angleproject:8047
Bug: angleproject:8048
Change-Id: I7deb4f25f76008103c2754747db2d90be880b6ca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4296803
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-03-01 05:30:38 +00:00
Alexey Knyazev
e2cf65ed96 Implement QCOM_render_shared_exponent
Fixed: angleproject:8043
Change-Id: Ia76b8e4b60a640180bae77cba523142749051398
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4289140
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2023-02-28 23:52:20 +00:00
Alexey Knyazev
dd1cf777e6 Add EXT_texture_mirror_clamp_to_edge entry points
Bug: angleproject:7968
Change-Id: I04b0c5d7b5148fbaca24d77a2c8688ea7a96cb64
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4262073
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Auto-Submit: Alexey Knyazev <lexa.knyazev@gmail.com>
2023-02-21 23:25:32 +00:00
Mohan Maiya
1d9b8d802e Reland "Add support for glShaderBinary"
This is a reland of commit 228973e731
with the following fixes -

1. Apply patch from Yuly to fix chromium build errors
2. Fix ShaderBinaryTest instantiation call
3. Add ShaderBinaryTest to expectations file for IOS

Original change's description:
> Add support for glShaderBinary
>
> This patch adds the following -
> 1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token.
> 2. Compiler support to generate shader binaries.
> 3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for
> Vulkan translator.
> 4. Support to load GL_SHADER_BINARY_ANGLE binaries.
> 5. end2end tests for glShaderBinary.
>
> Tests: ShaderBinaryTest*
> Bug: angleproject:7833
> Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: mohan maiya <m.maiya@samsung.com>
> Reviewed-by: Charlie Lao <cclao@google.com>

Bug: angleproject:7833
Change-Id: I21135c52e2bae955342a99aff5631ba0e687eff1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4195852
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-01-27 00:27:14 +00:00
Sean Risser
0133b6f186 Add GL_ARM_shader_framebuffer_fetch builtins
Bug: b/242419750
Bug: angleproject:7882
Change-Id: I85582ad21e58e448b740789ec88f783c8b95ee01
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4189028
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Sean Risser <srisser@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2023-01-26 18:50:48 +00:00
Yuly Novikov
0c9cbf39f5 Revert "Add support for glShaderBinary"
This reverts commit 228973e731.

Reason for revert: breaks compile on ANGLE into Chromium roll
https://cr-buildbucket.appspot.com/build/8790942326644064097
https://cr-buildbucket.appspot.com/build/8790942759045412865
https://cr-buildbucket.appspot.com/build/8790942417069789217
Leaks detected on ASAN
https://cr-buildbucket.appspot.com/build/8790946657703508337

Original change's description:
> Add support for glShaderBinary
>
> This patch adds the following -
> 1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token.
> 2. Compiler support to generate shader binaries.
> 3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for
> Vulkan translator.
> 4. Support to load GL_SHADER_BINARY_ANGLE binaries.
> 5. end2end tests for glShaderBinary.
>
> Tests: ShaderBinaryTest*
> Bug: angleproject:7833
> Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: mohan maiya <m.maiya@samsung.com>
> Reviewed-by: Charlie Lao <cclao@google.com>

Bug: angleproject:7833
Change-Id: Ice19576acbc1351810ff0cd769ac17ad6c0abdf3
No-Try: true
No-Presubmit: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4197375
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-01-26 12:15:06 +00:00
Mohan Maiya
228973e731 Add support for glShaderBinary
This patch adds the following -
1. ANGLE_shader_binary extension and GL_SHADER_BINARY_ANGLE token.
2. Compiler support to generate shader binaries.
3. Update compiler to use SH_SPIRV_VULKAN_OUTPUT as output type for
Vulkan translator.
4. Support to load GL_SHADER_BINARY_ANGLE binaries.
5. end2end tests for glShaderBinary.

Tests: ShaderBinaryTest*
Bug: angleproject:7833
Change-Id: I191d5ba7c4d5304696f5e743c851dc945fa57858
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4137306
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
2023-01-25 22:13:01 +00:00
Alexey Knyazev
9bd37934e0 Add EXT_polygon_offset_clamp entry points
Bug: angleproject:7957
Change-Id: Ida28b852b1db3e6017b6e91a9424381eb8fe29f2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4169943
Auto-Submit: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-01-16 16:00:50 +00:00
Alexey Knyazev
067ace47d0 Add ANGLE_clip_cull_distance extension
Added an extension spec.

Trivially exposed it on GL, Vulkan, and D3D11.

Adjusted tests and validation to allow no cull
distance support for this extension string.

Removed extra built-in variable definitions.

Bug: angleproject:7904
Change-Id: Ic60772dfe28132c316eaa29aadc1afd66e3b0fa7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4114290
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2022-12-23 01:57:59 +00:00
Gregg Tavares
be9e8e7b03 Add EGL_ANGLE_wait_until_work_scheduled extension
We're changing eglReleaseTexImage so it calls
flushCommandBuffer(mtl::NoWait) instead of
flushCommandBuffer(mtl::WaitUntilScheduled)
and then adding an extension to allow us to
WaitUntilScheduled.

This is because Chrome calls eglReleaseTexImage for
every canvas and having it WaitUntilScheduled per call
is very slow. So instead we'll call eglWaitUntilWorkScheduledANGLE
once which will effectively wait just once.

Bug: angleproject:7890
Change-Id: I87bc9f9a1a7f4a0f99d93736cc3083799e76afeb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4109311
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Gregg Tavares <gman@chromium.org>
2022-12-17 02:33:59 +00:00
Chris Dalton
004c5c9452 Prefix all PLS enums with "GL_"
Bug: angleproject:7279
Change-Id: Ifb4062e502305f4e59546f067d195d1a05fbabe4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4095380
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
Reviewed-by: Steven Noonan <steven@valvesoftware.com>
2022-12-13 16:32:24 +00:00
Chris Dalton
eb1a13d8cf Improve PLS load and store op tokens
Define more new tokens that are more clearly named, as opposed to
recycling tokens that were meant for a different purpose.

Bug: angleproject:7279
Change-Id: I840e5ea168235c49eec2693b2231c2d329027b0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4082057
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2022-12-09 15:32:37 +00:00
Alexey Knyazev
27727e501a Fix ProvokingVertex typos
Aligned the parameter name with the upstream specs

Moved ValidateProvokingVertexANGLE to validationESEXT.cpp

Bug: angleproject:2829
Change-Id: I820a90c20ef0a1873640c933b1de52526cac7e70
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4043701
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
2022-11-22 22:20:58 +00:00
Alexey Knyazev
44d8fef850 Add ANGLE_provoking_vertex spec
Renamed provoking vertex enums to use _ANGLE suffix.
The newly defined enums alias those from the
desktop OpenGL extensions.

Updated tests to use the new enum names.

Bug: angleproject:2829
Change-Id: I72b686773536d3d54a653114cee5292007510a55
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4013700
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2022-11-14 21:51:47 +00:00
Chris Dalton
9bda9a79b4 Add Store Ops to pixel local storage
Browsers will need the ability to pre-empt pixel local storage, which
means every plane will need a backing store to dump to. Store Ops allow
the app to still avoid memory transactions at the end of PLS even if
their plane has a backing texture.

Bug: angleproject:7279
Change-Id: I3a3efa21773f87c03cd346a996e3c638028c68ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3974652
Commit-Queue: Chris Dalton <chris@rive.app>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2022-11-04 23:13:35 +00:00
Chris Dalton
3605b399e0 Move PLS clear values back into context state
The API that required packing raw data into a buffer was un-ergonomic
for developers and difficult to implement for WebGL vendors.

Bug: angleproject:7279
Change-Id: If7c98908c285462c5775e8e2d8811883be139f64
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3972376
Commit-Queue: Chris Dalton <chris@rive.app>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2022-11-04 00:55:08 +00:00
Chris Dalton
86d9d8768f Finish renaming GL_PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE
Fix a couple spots that missed the rename.

Bug: angleproject:7797
Change-Id: Iee44b525f70e00e631e07ec2e984c7a41c3b616a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3996109
Reviewed-by: Steven Noonan <steven@valvesoftware.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2022-11-02 13:46:30 +00:00
Jamie Madill
dc62b3eef6 Capture/Replay: Add trace interpreter.
Also adds a self-test using the retrace script.

Bug: angleproject:7752
Change-Id: I1985b47250bef99726d2ca2d90bef859208e357e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3965128
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
2022-10-21 23:12:02 +00:00
Jamie Madill
fd45cec30b Entry Points: Move enum helper to registry_xml.
This will make it accessible to other generators.

Bug: angleproject:7752
Change-Id: I91bc9a4d6c919266ea329f66d271bf881d99d17a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963364
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-10-20 22:27:40 +00:00
Jamie Madill
ad2fbc7da4 Roll third_party/OpenGL-Registry/src/ 11d7b7bae..5bae8738b (5 commits)
Also removes our copy of gl.xml now that upstream patches are merged.

11d7b7baeb..5bae8738b2

$ git log 11d7b7bae..5bae8738b --date=short --no-merges --format='%ad %ae %s'
2022-09-29 sunserega2 [xml] Fixes for defined but unused enum groups (#520)
2022-09-29 julius_hager Added group PixelType to multiple-enums (#529)
2022-09-29 gnl021 EXT_separate_depth_stencil: Explicit unsupported cases (#531)
2022-09-29 jmadill Add enum groups for ANGLE use cases. (#538)
2022-09-29 syoussefi Clarify that PLS doesn't allow leak from outside framebuffer (#540)

Created with:
  roll-dep third_party/OpenGL-Registry/src

Bug: angleproject:6461
Change-Id: I6b7d8471144babe5cdd465c64574804f85c9e4f2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3937049
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2022-10-07 20:43:23 +00:00
Dan Glastonbury
d2a58f00af EGL: Implement eglCopyMetalSharedEventANGLE
Add eglCopyMetalSharedEventANGLE function to the
ANGLE_metal_shared_event_sync extension. This brings the extension on
par with the EGL_ANDROID_native_fence_sync extension.

eglCopyMetalSharedEventANGLE allows for copying the Metal event object
from EGLSync objects implemented by the ANGLE Metal renderer. This
function follows Objective-C convention for "copy" methods and increases
the retain count of the Metal event object. The EGL API user is thus
responsible for ensuring to release the returned object to avoid memory
leaks.

Test: angle_end2end_tests --gtest_filter=EGLSyncTestMetalSharedEvent.*
Bug: angleproject:7561
Change-Id: I8c35b559014b85cb8c6a0e76ac2ab7891eed5da0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3881423
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
2022-09-23 22:01:09 +00:00
Constantine Shablya
e82eaff91f Stubs for paletted images
Bug: angleproject:7599
Change-Id: Idb49f8ba07ebd3b6cad461fa9e90b856af666183
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3909396
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Constantine Shablya <constantine.shablya@collabora.com>
2022-09-22 16:11:44 +00:00
Dan Glastonbury
a89f678f8a EGL: Implement ANGLE_metal_shared_event_sync on metal
Implement creation of fence sync object taking an external
MTLSharedEvent and optional value to use when signaling completion of
prior commands.

Extended end2end test suite with metal shared event test cases.

Test: angle_end2end_tests --gtest_filter=EGLSyncTestMetalSharedEvent.*
Bug: angleproject:7561
Change-Id: I0e72b5417275a20a24e535670ceb995ecc87abcb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3865060
Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
2022-09-21 01:42:23 +00:00
Shahbaz Youssefi
de73f7cd7d Introduce GL_ANGLE_logic_op
This extension exposes the desktop GL glLogicOp function as a GLES
extension.  This is supported by Vulkan through the logicOp feature as
well.

The goal is to directly use this extension in GLES1 emulation where the
backend supports it, avoiding a more costly fallback.

Bug: angleproject:3862
Change-Id: I7ed436cdf401437157ca9724168849b4c819b91b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3898310
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2022-09-20 04:02:18 +00:00
Chris Dalton
04f46f391d Reland "Generate stubs for ANGLE_shader_pixel_local_storage"
This is a reland of commit 8208e8a234

In Take 2 we omit the GLenum groups PixelLocalLoadOpANGLE and
PixelLocalInternalFormatANGLE. We can add these back once the extension
is published and we can update Khronos's gl.xml, or else once we figure
out how to make this work without updating the Khronos gl.xml.

Original change's description:
> Generate stubs for ANGLE_shader_pixel_local_storage
>
> Bug: angleproject:7279
> Change-Id: I41548ad35c236b67372a12fecaa9a1b9c556d232
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3891972
> Commit-Queue: Chris Dalton <chris@rive.app>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

Bug: angleproject:7279
Change-Id: I02f42c1cfc685ed95164744108e0c185d3a7fefb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900491
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
2022-09-15 19:44:02 +00:00
Chris Dalton
8c45e3c417 Revert "Generate stubs for ANGLE_shader_pixel_local_storage"
This reverts commit 8208e8a234.

Reason for revert: Compile failures

Original change's description:
> Generate stubs for ANGLE_shader_pixel_local_storage
>
> Bug: angleproject:7279
> Change-Id: I41548ad35c236b67372a12fecaa9a1b9c556d232
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3891972
> Commit-Queue: Chris Dalton <chris@rive.app>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

Bug: angleproject:7279
Change-Id: Ic9a232f9d722b42e615de3827ce118616f3acc71
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3897425
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Chris Dalton <chris@rive.app>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Chris Dalton <chris@rive.app>
2022-09-15 02:15:31 +00:00
Chris Dalton
8208e8a234 Generate stubs for ANGLE_shader_pixel_local_storage
Bug: angleproject:7279
Change-Id: I41548ad35c236b67372a12fecaa9a1b9c556d232
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3891972
Commit-Queue: Chris Dalton <chris@rive.app>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2022-09-14 21:37:50 +00:00
Kimmo Kinnunen
6937ea98cd Use base name of the generator script in various generated files
Increases compiler cache hits especially in cases where the file is run
during build.

Bug: angleproject:7642
Change-Id: I769dae2d7cca2cf1e238531f4cb356bad41b06dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3880323
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2022-09-08 23:30:36 +00:00
Jamie Madill
64f41972a9 Use canonical gl.xml and update enum to string function.
This replaces our copy of gl.xml with the upstream canonical copy.
Note that one patch is required before we can remove ANGLE's copy:

https://github.com/KhronosGroup/OpenGL-Registry/pull/538

Because the upstream version uses a new method of enum groups, we
also update our enum-to-string generator to use the new groups.
This new code includes many more enums and groups in the mapping.

Bug: angleproject:6461
Change-Id: I1c0ab44c36afce8db04c9661b377bbe5762c913e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856649
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-08-29 20:29:27 +00:00
Mohan Maiya
2d48a37079 Vulkan: Support passthrough of colorspace attributes
On Android, the EGL loader supports and implements the necessary
functionality for the following colorspace extensions -
 1. EGL_EXT_gl_colorspace_display_p3
 2. EGL_EXT_gl_colorspace_display_p3_linear
 3. EGL_EXT_gl_colorspace_display_p3_passthrough
 4. EGL_EXT_gl_colorspace_scrgb
 5. EGL_EXT_gl_colorspace_scrgb_linear

Add support for "EGL_ANGLE_colorspace_attribute_passthrough"
extension that allows vendors that support wide color gamut
to passthrough colorspace attribute values to the underlying
Vulkan implementation to be used during VkImage creation.

Bug: angleproject:7319
Test: PbufferColorspaceTest.CreateSurfaceWithColorspace*
Change-Id: Ibd78bb5fea4ede394f4dc5027c1d4a730746f2ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3855048
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2022-08-26 22:29:35 +00:00
Jamie Madill
f6842cc2cd Revert override for desktop GL extensions in gl.xml.
Instead override the supported APIs in registry_xml.py, which
will transfer to using the canonical gl.xml. Note these are
desktop-GL-only extensions that ANGLE exposes in GLES:

GL_ARB_sync
GL_NV_robustness_video_memory_purge

Bug: angleproject:6461
Change-Id: I25778149ecfc3cb4be0aca2104c08273c260c564
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3856648
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Jamie Madill <jmadill@chromium.org>
2022-08-25 20:23:05 +00:00
Jamie Madill
5d62c05e26 Use canonical Khronos registry XML files for auto-gen.
This switches ANGLE to use the upstream XML files for the CL, EGL
GLX and WGL APIs. Since gl.xml has a few more significant diffs
from the upstream version, that work will come in another CL.

This also removes an ANGLE EGL ext that was added upstream.

Bug: angleproject:6461
Change-Id: I29ead5edc13a4256d1f702c330a5d3d233502cd4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3854318
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-08-25 17:35:24 +00:00
Eddie Hatfield
d89c027e7c Add unimplemented GLX entry points to desktop GL
Test: Run glxgears and hit unimplemented in ANGLE

Bug: angleproject:7533
Change-Id: Ic7ed7506b6d0c5ef5022ae6899cbd6c4d351b178
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3852631
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2022-08-24 21:26:01 +00:00
Eddie Hatfield
c54ed79053 Get desktop GL conformance tests to build
The target for these tests is angle_deqp_gl_tests.

Bug: angleproject:7533
Change-Id: I290822671d99da020f9a6a1f02bee43987644bf9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3766435
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Eddie Hatfield <eddiehatfield@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2022-08-03 22:17:47 +00:00