172 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
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
Roman Lavrov
b30c05deb1 Trace Interpreter: Add #include <algorithm>
ANGLE-Dawn roll failed with:
error: no member named 'lower_bound' in namespace 'std'

Bug: b/276742336
Change-Id: Ife3d83aaa2b9f29f3750e880a12dfccf3f8fe915
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4391765
Auto-Submit: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2023-04-04 14:43:04 +00:00
Roman Lavrov
c723d71fc8 Trace Interpreter: Improve StringToGLenum performance.
Binary search instead of linear.
This gets called a lot when parsing traces to be run by the trace
interpreter. I saw ~37 seconds parse time on Panther for
minecraft_bedrock trace, this CL makes that ~5 times faster.

Bug: b/276742336
Change-Id: Ide32c247b327f36c00f26951a90e4412d71db2b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4392892
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
2023-04-03 21:20:02 +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
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
Jamie Madill
fdada9ee81 Re-land: "Make SyncIDs a packed type."
This re-land fixes the sync map size tracking.

This prepares syncs to use a simple resource map like other
types, which will make life easier in the trace interpreter.

Bug: angleproject:7775
Change-Id: If2114c51d5b68503890eacbf549182823667fedc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178012
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2023-01-18 21:45:23 +00:00
Jamie Madill
8971a59284 Revert "Make SyncIDs a packed type."
This reverts commit 9de913077a.

Reason for revert: Fails win-trace, somewhat flakily.

Original change's description:
> Make SyncIDs a packed type.
>
> This prepares syncs to use a simple resource map like other
> types, which will make life easier in the trace interpreter.
>
> Bug: angleproject:7775
> Change-Id: Ic2867f6133256f5ce2320eb2b322c1059266b201
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103720
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Cody Northrop <cnorthrop@google.com>

Bug: angleproject:7775
Change-Id: I29534b14c973fa34a4cb7457d534cd6156f33cd2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178010
Auto-Submit: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-01-18 14:36:06 +00:00
Jamie Madill
9de913077a Make SyncIDs a packed type.
This prepares syncs to use a simple resource map like other
types, which will make life easier in the trace interpreter.

Bug: angleproject:7775
Change-Id: Ic2867f6133256f5ce2320eb2b322c1059266b201
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103720
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2023-01-17 21:30: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
Geoff Lang
6c53a56274 Add missing cstring include in gl_enum_utils.
Bug: angleproject:7752
Change-Id: I44ac0996673065b9633b35e4b07c5150a1ae3dcd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3970767
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2022-10-24 17:27:54 +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
cd10b6d25a Enum Utils: Add method to return enum value from string.
We'll use this in the trace interpreter to parse enum values.

Bug: angleproject:7752
Change-Id: I232a00baac2f74c9618029929bbb3e5822654046
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963366
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2022-10-20 22:50:24 +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
4bfb749ff2 Capture/Replay: Move shared trace code into src/common.
This will let them be accessible to the test harnesses. The
trace tests interpreter will need direct access to the classes
that we move in this CL.

This CL also moves the GLenum utils into the common folder,
where they were already used by some other tests.

Bug: angleproject:7752
Change-Id: I97ad607938ef29bc316f6d40098478e002ea8128
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963362
Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2022-10-20 14:18:58 +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
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
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
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