|   | 35b92525 | 2025-08-13T15:27:32 |  | Remove lock from GenVertexArrays/IsVertexArray
VertexArrays are per context anyway and is thread safe, so there is no
need for shared lock. This CL moves mVertexArrayMap from Context to
PrivateState so that it won't be accessed by other APIs.
Bug: b/433331119
Change-Id: I466a79762e887dbec78b796b52028420837cff59
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6977163
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com> | 
            
              |   | 02b53738 | 2025-09-08T08:55:23 |  | Trace/Replay: Fix context grouping issues
In tracing Harry Potter Magic Awakened, issues related to context
grouping were found affecting shader and program state. While these
objects are shared among all contexts, their state is not. This led to
race conditions in object lifetimes as well as incorrect states for
operations dependent on stader/program state.
Test: angle_trace_tests --gtest_filter=*harry_potter_magic_awakened
Bug: b/445208963
Change-Id: I8dbb22f72c917103f947cd34d088c4db0cd39731
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6950247
Commit-Queue: Mark Łobodziński <mark@lunarg.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com> | 
            
              |   | d8dc3cc2 | 2025-08-02T12:02:20 |  | Remove shared context lock from glVertexAttrib{I}Format
This CL removes shared context lock from glVertexAttribFormat() and
glVertexAttribIFormat() APIs, since they no longer access anything
outside VertexArrayPrivate. The main problem I had run into is
validation code. Before this CL, ValidateIntegerVertexFormat() needs
context's mStateCache for  mCachedVertexAttribTypesValidation and
mCachedIntegerVertexAttribTypesValidation. Given these two cached value
are constant after initialization, in this CL, I have moved them to
PrivateStateCache. PrivateStateCache argument is added to
ValidateVertexAttribFormat() and ValidateVertexAttribIFormat() to get
them access to mCachedIntegerVertexAttribTypesValidation.
Bug: b/433331119
Change-Id: Ifc3fbed32b4d3722c335dd2c393bc6519ed0b544
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6822032
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com> | 
            
              |   | ae4aead5 | 2025-07-24T16:35:38 |  | Remove sharedContextLock from glVertexAttrib{Divisor|Binding}
With prior CLs all the functions used by glVertexAttribDivisor*,
glVertexBindingDivisor and glVertexAttribBinding only access
VertexArrayPrivate. This CL removes shared context lock from these APIs.
Bug: b/433331119
Change-Id: Ib1632797c53d2cd7a31c21e93c0e69385c71a27f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6814157
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com> | 
            
              |   | fa29f604 | 2025-07-02T13:23:31 |  | Remove sharedContextLock from {Enable|Disable}VertexAttribArray
VertexArray objects are per context objects. In theory they do not need
to protected by shared context lock. The reason we are taking locks
because all these functions end up accessing Buffer object which are
shared. In prior CLs we have removed subject observer usage from
VertexArray which means VertexArray no longer accessed from other
thread. In prior CLs we also split VertexArray into two classes:
VertexArrayPrivate which has no buffer, and VertexArray which is
subclass from VertexArrayPrivate and owns buffer. In this CL,
glEnableVertexAttribArray and glDisableVertexAttribArray calls no longer
take shared context lock. ContextPrivateEnableVertexAttribArray and
ContextPrivateDisableVertexAttribArray are called from these two APIs
and they only have access to StatePrivate. State Private holds a
VertexArrayPrivate pointer, which means they do not have anyway to
access buffer objects. The main challenge I run into here is
mCachedActiveClientAttribsMask, mCachedActiveBufferedAttribsMask,
mCachedActiveDefaultAttribsMask, mCachedHasAnyEnabledClientAttrib,
mCachedNonInstancedVertexElementLimit,
mCachedInstancedVertexElementLimit. These StateCache variable needs to
be updated when these two APIs are called, and calculating these
variable needs access to buffer object. The solution here is adding a
bool mIsCachedActiveAttribMasksValid in the PrivateStateCache so that
instead of immediately update these mCached* variable, we just set
mIsCachedActiveAttribMasksValid to false. Then whenever any of these
mCached* variable is needed, we will check
mIsCachedActiveAttribMasksValid and calculate these cached variables. It
adds one if check when accessing these caches, but the other benefit is
that we may have avoided duplicated calculation when multiple states
changed.
Bug: b/433331119
Change-Id: I3227c72bc40501712db93fb3d540b835f07150b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4514436
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> | 
            
              |   | 6a03109f | 2025-07-09T18:24:31 |  | Refine getCompressionRate
As Vulkan spec states, vkGetImageSubresourceLayout should not be called
for the android swapchainimage when the image is not bound to memory.
Refine the path of getCompressionRate to make sure at least
swapchainimage[0] has been initialized when it is been called.
Bug: angleproject:433057375
Change-Id: I80b68874686940c0ef77df97b928b0e153c5bbf8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6774721
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 251ffe62 | 2025-07-15T17:37:30 |  | Vulkan: Add support for built-in gl_ShadingRateEXT
Add support for built-in gl_ShadingRateEXT of
GL_EXT_fragment_shading_rate
Bug: angleproject:420310117
Change-Id: Ie11b139a0371b5995f1533a85e02c590cd36109c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6733750
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 154e5711 | 2025-06-24T15:28:28 |  | Refine validation for GetQueryObjectuiv
Spec says that after a graphics reset has occurred on a context,
subsequent GL commands on that context (or any context which shares
with that context) will generate a CONTEXT_LOST error.
Exceptions to this behavior include:
Any commands which might cause a polling application to block
indefinitely will generate a CONTEXT_LOST error, but will also return
a value indicating completion to the application. Such commands
include:
- GetSynciv with pname SYNC_STATUS ignores the other parameters and
returns SIGNALED in values
- GetQueryObjectuiv with pname QUERY_RESULT_AVAILABLE ignores the
other parameters and returns TRUE in params
Bug: angleproject:427242336
Change-Id: I86fd6f93a2c2a4b60c6a1e19637ee6382fadac7b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6666083
Auto-Submit: Shufen Ma <Shufen.Ma@arm.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Charlie Lao <cclao@google.com> | 
            
              |   | 9a436772 | 2025-06-04T16:47:51 |  | Vulkan: Add entry points for GL_EXT_fragment_shading_rate
Bug: angleproject:420310117
Change-Id: I8a8efad6cad810b2cb0b600106f6496070495605
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6620340
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> | 
            
              |   | 92dec961 | 2025-05-15T00:00:00 |  | Enforce validation consistency for lockless entry points
Bug: angleproject:406922380
Change-Id: If4e6051d0ac465f4ae8abca0a62cad14d1d739b7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6624114
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> | 
            
              |   | 8dbb0997 | 2025-05-15T00:00:00 |  | Autogen support checks for ANGLE_base_vertex_base_instance
Bug: angleproject:409484297
Change-Id: Id730b55709e27910f2908294637e17cde9a791b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6597178
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org> | 
            
              |   | 79cef542 | 2025-05-15T00:00:00 |  | Autogen EGL image extension entry points
Bug: angleproject:409484297
Change-Id: I0e4a83c5e902f010a66fefa4fa6cc4169ab5529f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6596617
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 4c964bc7 | 2025-05-15T00:00:00 |  | Roll third_party/OpenGL-Registry/src/ 5bae8738b..200cea403 (74 commits)
https://chromium.googlesource.com/external/github.com/KhronosGroup/OpenGL-Registry/+log/5bae8738b23d..200cea4030cb
Additional changes:
* Removed obsolete workarounds for mismatching
  signatures between CreateShaderProgramvEXT
  and CreateShaderProgramv.
* Aligned GL backend bindings for GL_OVR_multiview
  entry points with the specs.
* Updated include/GLES2/gl2ext.h.
Bug: angleproject:409484297
Change-Id: Ifbb63dcc4bad312b22a368455a121e088b346fab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6596941
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 6462880b | 2025-05-15T00:00:00 |  | Autogen support checks for query extensions
Bug: angleproject:409484297
Change-Id: I91e6b7318c62868e65d48ceb380b7c2d53c447ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6596569
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org> | 
            
              |   | 392dc591 | 2025-05-15T00:00:00 |  | Remove GL_CHROMIUM_sync_query
Fixed: angleproject:420627279
Change-Id: I26dac7c55a7cf6b04121658144e1387be65d2569
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6593552
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org> | 
            
              |   | bdaf87cf | 2025-05-15T00:00:00 |  | Enforce validation consistency
Asserted that:
* Exactly one error is generated
  if validation fails.
* No error is generated
  if validation passes.
Supported only for entry points with
autogenerated context support checks.
Lockless entry points are excluded for now.
Bug: angleproject:406922380
Change-Id: I7549c8011768b1aa311d843b1658005ca3aba3b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6568559
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 1e45cbe3 | 2025-04-24T00:00:00 |  | Update entry points autogen template
Used the same template for the always
supported entry points as for entry
points with conditional support.
No functional changes.
Bug: angleproject:409484297
Change-Id: I2077dec903a3bb52a69085acf5781c0df9ea935c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6574234
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | d0616d54 | 2025-04-24T00:00:00 |  | Autogen support checks for multiview commands
Bug: angleproject:409484297
Change-Id: Ia86f30922480dd1d8793868581629669cc83719f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6547155
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> | 
            
              |   | 51dd4087 | 2025-04-24T00:00:00 |  | Autogen support checks for draw_elements_base_vertex commands
Also fixed command support conditions:
* With an exception of MultiDrawElementsBaseVertexEXT,
  command and extension suffixes must match. Updated
  tests to account for that.
* DrawElementsInstancedBaseVertex{EXT,OES} additionally
  require ES 3.0 or any of the instancing extensions.
* DrawRangeElementsBaseVertex{EXT,OES} additionally
  require ES 3.0. Updated tests to account for that.
* MultiDrawElementsBaseVertexEXT additionally
  requires GL_EXT_multi_draw_arrays.
Bug: angleproject:409484297
Change-Id: I50b72ebc7d66128bcfd5671334094b7e90cb329c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6524686
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> | 
            
              |   | df8a7047 | 2025-04-24T00:00:00 |  | Fix duplicate extension commands autogen
If a command exists in two or more extensions
with different suffixes but does not exist in
any core version, ensured that the command
declaration is added to context only once.
Bug: angleproject:414506477
Change-Id: I22e5290bd9b89da8fb8dc01647d29cf67d864b8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6519422
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 8b388145 | 2025-04-24T00:00:00 |  | Autogen support checks for robust client memory entry points
No functional changes.
Bug: angleproject:409484297
Change-Id: I9d27f8444b01b7881336ffcf3f480018efbe90e8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6519381
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 2d61c576 | 2025-04-24T00:00:00 |  | Autogen support checks for PLS entry points
No functional changes.
Bug: angleproject:409484297
Change-Id: I0224ecc29efde87c92c75a8120d0227c95775c1b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6512841
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 9e6f44bc | 2025-04-18T00:00:00 |  | Autogen support checks for extension entry points
As a side effect, added missing support checks
for the following extension entry points:
-  GL_ANGLE_memory_object_flags
  - TexStorageMemFlags2DMultisampleANGLE
  - TexStorageMemFlags3DANGLE
  - TexStorageMemFlags3DMultisampleANGLE
-  GL_EXT_buffer_storage
  - BufferStorageEXT
-  GL_EXT_external_buffer
  - BufferStorageExternalEXT
-  GL_EXT_robustness
  - GetnUniformfvEXT
  - GetnUniformivEXT
  - ReadnPixelsEXT
-  GL_EXT_separate_shader_objects
  - ProgramUniform4ivEXT
  - ProgramUniform4uivEXT
-  GL_MESA_framebuffer_flip_y
  - FramebufferParameteriMESA
  - GetFramebufferParameterivMESA
-  GL_OES_matrix_palette
  - CurrentPaletteMatrixOES
  - LoadPaletteFromModelViewMatrixOES
  - MatrixIndexPointerOES
  - WeightPointerOES
-  GL_OES_query_matrix
  - QueryMatrixxOES
-  GL_OES_texture_cube_map
  - GetTexGenf*OES
  - TexGen*OES
-  GL_QCOM_framebuffer_foveated
  - FramebufferFoveationConfigQCOM
  - FramebufferFoveationParametersQCOM
-  GL_QCOM_texture_foveated
  - TextureFoveationParametersQCOM
Bug: angleproject:409484297
Change-Id: I7fe05afe2a4575ae5d913bf9f60d5575404f808b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6494399
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 846dcf86 | 2025-04-18T00:00:00 |  | Autogen context version checks for 2.0 entry points
Bug: angleproject:409484297
Change-Id: I03b323ba5b8f9d45d41c0ff0188b3f7a7004722e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6490226
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> | 
            
              |   | 272ffbda | 2025-04-18T00:00:00 |  | Enhance entry point validation autogen scripts
Ensured that complete information about entry point
sources is available when generating context checks.
Bug: angleproject:409484297
Change-Id: I7a2546c11b212df2ddf194d26be6e0d31d108b29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6488171
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 56b62c62 | 2025-04-18T00:00:00 |  | Include entry point names in context lost error messages
Also added "likely" hints to valid context branches.
Bug: angleproject:412384507
Change-Id: I6fc2c4a5934b767f55742f4657fec7ae954f1387
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6479959
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 61bfe86c | 2025-04-04T00:00:00 |  | Autogen context version checks for 1.0 entry points
* Added missing extension support checks for
  glPointSizePointerOES and glDrawTex*OES.
* Removed incorrect validation
  from ValidateDepthRangex.
* Removed unused functions.
Bug: angleproject:409484297
Change-Id: I9c12be4c0ed60f943fa3c16a8e23693d8fb7a76f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6479833
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> | 
            
              |   | db12f43b | 2025-04-04T00:00:00 |  | Autogen context version checks for 3.0 entry points
* Added a missing version check for the
  GetBufferParameteri64v entry point.
* The following commands are now rejected
  on ES 2.0 even if the GL_OES_texture_3D
  extension is enabled:
  * CompressedTexImage3D
  * CompressedTexSubImage3D
  * CopyTexSubImage3D
  * TexImage3D
  * TexSubImage3D
Bug: angleproject:409484297
Change-Id: I82374157596fd292efbf67c6bb582eb874348b73
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6469895
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 9db4bf6e | 2025-04-04T00:00:00 |  | Autogen context version checks for 3.1 & 3.2 entry points
As a side effect, added missing version checks
for the following OpenGL ES 3.2 entry points:
* BlendEquationi
* BlendEquationSeparatei
* BlendFunci
* BlendFuncSeparatei
* ColorMaski
* Disablei
* DrawElementsBaseVertex
* DrawElementsInstancedBaseVertex
* DrawRangeElementsBaseVertex
* Enablei
* GetDebugMessageLog
* GetPointerv
* IsEnabledi
* MinSampleShading
* PopDebugGroup
* PrimitiveBoundingBox
* PushDebugGroup
Bug: angleproject:409484297
Change-Id: I6be7e3a4a8ba9b99595f4930d9c3a1fa1b4c6154
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6441552
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 0f356a34 | 2025-04-02T14:14:43 |  | Update invalidation commands to disable PLS
Previously, commands that flush or invalidate tiled memory were
specified to generate an error if issued while PLS was active.
Remove all provisions around Flush(), Finish() and ClientWaitSync(),
and add a test to ensure these commands have no effect on PLS.
The reason we can make this change now is because we no longer support
EXT_shader_pixel_local_storage, which previously prevented us from
allowing these 3 commands.
Update the invalidation commands to disable PLS instead. This is more in
line with the general design pattern of PLS. Update the wording of the
spec to reflect this better organization.
Also clean up some legacy code that was no longer used.
Bug: angleproject:40096838
Change-Id: I9687deaf17a583f8757ffcd050eda154b4e7a949
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6427324
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
Reviewed-by: Kenneth Russell <kbr@chromium.org> | 
            
              |   | eb52b568 | 2025-03-28T00:00:00 |  | Remove unsupported 1D and DSA entry points
OpenGL ES does not support 1D textures,
removed TexStorage1DEXT.
OpenGL ES does not support DSA, removed
EGLImageTargetTextureStorageEXT.
Added an explicit command blocklist.
Added hashes for *_vulkan_secondaries_* def files.
Fixed: angleproject:407932145
Change-Id: Iec34fa475f34a0fa832a49223c51ff1f87b1915d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6426049
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> | 
            
              |   | cbfa8e38 | 2025-03-31T09:51:33 |  | Add "likely" hints to common validation paths
This makes the hot path assembly more local. I can't tell if there is an
observable effect of just doing this on the regular build performance,
but this generally makes sense and reduces the assembly difference
with PGO builds.
Bug: b/383305597
Change-Id: Icb191e8e927217d9db4cb505d5cd6f76536403e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6416263
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Roman Lavrov <romanl@google.com> | 
            
              |   | b600a42c | 2025-03-13T15:18:40 |  | Remove the PLS allow list
All the interactions with render passes have been properly solved now,
and there is no longer a need for the allow list.
Bug: angleproject:40096838
Change-Id: I0219fb8824820e076c128f10f49c85f0f76270ef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6355312
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app> | 
            
              |   | fbb1829d | 2024-12-08T01:46:39 |  | Allow glClear while PLS is active
It just makes sure to not clear any draw buffers that may be in use for
pixel local storage.
Bug: angleproject:402810076
Bug: angleproject:40096838
Bug: angleproject:42266150
Change-Id: I60a573d5e9e5dbadce12d79e3f4b6fc57747e655
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6312336
Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app> | 
            
              |   | 97083463 | 2025-03-10T09:07:16 |  | Polish PLS interactions with xform feedback & QCOM_tiled_rendering
For the simplest integration with WebGL, it was decided that
glBeginTransformFeedback() and glStartTilingQCOM() should implicitly
disable PLS, whereas glBeginPixelLocalStorageANGLE() should fail if
either of these modes are active.
Bug: angleproject:40096838
Change-Id: I859a496c99c60c5b040c5eac542f43d85872eb30
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6339788
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app> | 
            
              |   | 4b39a6a9 | 2025-03-08T14:16:29 |  | Generate errors for framebuffer invals during PLS
Generate GL_INVALID_OPERATION for InvalidateFramebuffer,
InvalidateSubFramebuffer, and DiscardFramebufferEXT (and add them to the
PLS allow list so we can test the new validation).
This is part of a final preparation before deleting the allow list.
Bug: angleproject:40096838
Change-Id: If8ffb9c1998ca739798171ae4643a3c9ad3ee049
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6335750
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 1ead4cbd | 2025-03-07T09:49:21 |  | Allow texture modification commands while PLS is active
Just do a little extra validation and bounce modifications if they would
modify an active PLS plane.
Bug: angleproject:40096838
Change-Id: I6f27951f5d0ef5dfaf23b5a005a2d94a749e2c4f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6337703
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app> | 
            
              |   | 5b343e8f | 2025-03-11T11:35:08 |  | Vulkan: Remove support for Stadia
Bug: angleproject:42262714
Change-Id: Icae5fe828fe4e0bcd287d297df1bc586708ef86e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6344390
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org> | 
            
              |   | be98f841 | 2024-11-30T02:11:05 |  | Implicitly end PLS for framebuffer reads and writes
In preparation for removing the PLS allow list, convert more problematic
methods to the new paradigm of implicitly ending PLS instead of
generating errors.
Also simplify the disable logic for framebuffer modifications, and just
blindly disable PLS for framebuffer updates, regardless of whether it's
GL_READ_FRAMEBUFFER or GL_DRAW_FRAMEBUFFER.
Bug: angleproject:40096838
Change-Id: Ie4390a219f5f05ef0a3d00f405d4914592726283
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6077335
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | c0d806b4 | 2025-02-10T23:01:33 |  | CL: OpenCL support for ANGLE Capture/Replay
Implementation of OpenCL Capture/Replay tool in ANGLE.
Brief notes about the change:
- Most meaningful changes for the capture process are
  made in src/libANGLE/capture/
- Most meaningful changes for replay are made in
  util/capture/ and src/tests/perf_tests/
- Many autogenerated files are changed/added to allow
  the capture of OpenCL objects & calls
- The following applications were captured/replayed:
  benchmark_model, GeekBench Compute, GeekBench ML,
  AI-Benchmark, various OCL CTS tests
- End2end test added to capture_tests.
  CapturedTestCL.MultiFrameCL/ES3_Vulkan
Bug: angleproject:383841335
Change-Id: I55fdaa6cd6c7ba740aaa2351e4d29050059d6d1d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6102105
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com> | 
            
              |   | bbc0d702 | 2024-12-27T07:44:01 |  | Vulkan: Add entry points to lock the Vulkan queue
... which can be retrieved via EGL_ANGLE_device_vulkan.  Otherwise the
application is unable to use the VkQueue that is retrieved out of ANGLE
from other threads (such as Chromium's DrDC feature).
Bug: chromium:380295059
Change-Id: Ife80f54440777486f72fc61697a68fb0c2b2d0f7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6116046
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org> | 
            
              |   | 465299fb | 2025-01-06T16:49:15 |  | context_private_call.cpp -> context_private_call.inl.h
Most functions are trivial wrappers resulting in unnecessary forwarding
calls. Most are called exactly once from entry points autogen.
This _reduces_ the .so size by ~14KB and I'm seeing 1-2% better frame
time in my driver_overhead_2 tests on a mobile device.
Bug: b/383305597
Change-Id: I1f2a048e067c76993bacfbbce655fc1c898fdba7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6149814
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | cc841237 | 2024-11-29T13:45:50 |  | Accept framebuffer modifications while PLS is active
The only way for a WebGL implementation to know if PLS is actually
active is to call glGetIntegerv(PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE)
(because glBeginPixelLocalStorageANGLE() can fail). So the original
behavior of not allowing glBindFramebuffer() et. al. while PLS was
active created a state scenario that was expensive for the browser to
track.
Instead, just allow  glBindFramebuffer() et. al., and implicitly disable
PLS if they are called while it's active.
Bug: angleproject:40096838
Change-Id: Ibd303f9f9950fb5b7f1add2d41882e4379c51e62
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6060301
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 65d674b0 | 2024-12-02T18:36:11 |  | Vulkan: Must run UnlockedTailCall from flush and finish
`glFlush` and `glFinish` may call `WindowSurfaceVk::swapImpl()`
implicitly when the current Window Surface is in the single buffer mode.
The `WindowSurfaceVk::swapImpl()` in turn may add unlocked tail call in
order to perform CPU throttling. It seems, that CPU throttling is only
possible if also enable the `EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID`
attribute (using `VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR`).
Without this attribute (`VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR`)
`vkQueuePresentKHR()` performs implicit waiting for GPU, making ANGLE's
throttling uncessary (the serial is already finished).
This fix allows running the tail call from `glFlush` and `glFinish`
(because these APIs are not performance critical). Alternative solution
may instead perform the CPU throttling immediately if the
`WindowSurfaceVk::swapImpl()` is called from the
`WindowSurfaceVk::onSharedPresentContextFlush()`.
Additionally, added "ASSERT(!any())" at the beginning of each entry
point. This is to catch scenarios, if some API adds the unlocked tail
call and for some reason exit without checking the assert of running
the call.
Test: angle_end2end_tests --gtest_filter=EGLAndroidAutoRefreshTest.SwapCPUThrottling/ES3_Vulkan_NoFixture
Bug: angleproject:42266581
Change-Id: I418c552f6e95b4cfc01db738c9989533377f1050
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6063719
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> | 
            
              |   | 7070a9e9 | 2024-11-20T00:21:16 |  | Remove draw buffer validation clauses from PLS
It was cumbersome to implement all this validation browser side for
WebGL.
Rather than making it an error to update blend and color mask on
reserved PLS draw buffers, glBeginPixelLocalStorageANGLE() can just
implicitly disable blend, and enable the color mask on overridden draw
buffers. Later calls to enable blend or change the color mask on
overridden planes are silently ignored until
glEndPixelLocalStorageANGLE().
Bug: angleproject:40096838
Change-Id: Ic7e1c5113e7d3fad3b80d0178075df646540d743
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6045421
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app> | 
            
              |   | e5619a5c | 2024-10-15T18:27:00 |  | Use EGL sync global lock for all EGL*sync entrypoint calls
To free EGL sync operations from waiting for other EGL calls
to finish, we use a separate global lock for EGL*sync entrypoints.
Below angle::SimpleMutex are added to protect resources that may
have race condition due to being accessed by EGL*sync calls
and non EGL*sync calls at the same time:
1. Display::mContextMapMutex that protects Display::mState.contextMap
2. static angle::base::NoDestructor<angle::SimpleMutex>
anglePlatformDisplayMapMutex that protects static
angle::base::NoDestructor<ANGLEPlatformDisplayMap> displays
3. static angle::base::NoDestructor<angle::SimpleMutex>
devicePlatformDisplayMapMutex that protects static
angle::base::NoDestructor<DevicePlatformDisplayMap> displays
EGL_Terminate() entry point takes both global lock and
global egl sync lock. This is to protect Display::mSyncMap,
Display::mSyncPools, and Display::mSyncHandleAllocator being
get cleared by thread 1 calling eglTerminate, while they are
still accessed by thread 2 through a call such as eglCreateSync.
So that we won't have thread 2 finish validating the sync object with
syncID exists in Display::mSyncMap, but then find the
mSyncMap.find(syncID) returns a nullptr due to the mSyncMap
is cleared by thread 1. Same applies to EGL_LabelObjectKHR(),
EGL_ReleaseThread(), ThreadCleanupCallback().
EGL_Initialize() writes to Display::mInitialized. This is read
by EGL Sync API validation functions. EGL_Initialize() also takes
both global lock and global sync lock to prevent race conditions
between EGL_Initialize() and EGL Sync APIs.
When ANGLE_CAPTURE_ENABLED is enabled, fall back to global lock,
as the CaptureEGLCallToFrameCapture() touches many resources
(e.g. mMaxAccessedResourceIDs, mFrameCalls)
that could lead to race conditions without a global lock.
Bug: b/362604439
Change-Id: Ic0d54a4cd66743bcd0f48f41f247dd223cff2f5e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5933570
Reviewed-by: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Commit-Queue: Yuxin Hu <yuxinhu@google.com> | 
            
              |   | 492cf265 | 2024-09-27T13:44:22 |  | Stubs for GL_blob_cache_angle
Bug: chromium:370538323
Change-Id: Ib56b28c24305db8931f382b16a24975b7277fa7e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5900760
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | b16d105f | 2024-10-03T10:25:32 |  | Remove Desktop GL front-end support
For Desktop GL applications, please use Zink!
Bug: angleproject:370937467
Change-Id: Ie734634bb62a2e98c80e1b32d8b3d34624da3c04
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5905428
Reviewed-by: Geoff Lang <geofflang@chromium.org> | 
            
              |   | 4167a9a0 | 2024-08-29T23:38:05 |  | Don't lock the context mutex if no flush in eglClientWaitSync
Bug: b/362604439
Change-Id: Ic514bcb3824514b5fd82ebb14ab97286aeb6557c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5828262
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | fcf3a1c0 | 2024-07-02T16:33:28 |  | GL: Allow shader compilation with cached translated source
Write the translated shader source when serializing shaders. This does
not increase the size of the shader cache because Vulkan only uses the
compiledBinary field.
Spawn a ShaderTranslateTask for loading shaders so the GL backend can
compile the shader on the native driver.
Bug: angleproject:350779978
Change-Id: I14413a7ca2a0d99653a1082f2c8b4a94cf58626a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5672740
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org> | 
            
              |   | 147ba459 | 2024-05-30T00:00:00 |  | Allow polygonMode* commands with active PLS
Drive-by:
* Test that polygonOffsetClampEXT
  is allowed when PLS is active.
Fixed: angleproject:345253437
Change-Id: I5d9f60b3e70eaf8da19017a8b9d6c2592cb4f4f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5601849
Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 6968848e | 2024-05-30T00:00:00 |  | Remove PLS checks from GLES 1.x entry points
Fixed: angleproject:345125742
Change-Id: If845ddb654221cfb88c3f69bb98e07dbee8b6b39
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5598770
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | c8db5292 | 2024-05-31T19:35:32 |  | Remove locks from most glUniform* calls
Note: only the Vulkan backend claims to be thread safe.
glUniform1i and glUniform1iv are kept locked as they might set samplers,
which is more complicated.
glUniformBlockBinding is a more complex state change with notifications.
Other glUniform functions simply call setUniformImpl() or
setUniformMatrixfv() in the vulkan backend, which as
https://crrev.com/c/5588853 and https://crrev.com/c/5592968 show only
update mDefaultUniformBlocks and mDefaultUniformBlocksDirty. This should
be thread-safe as long as the application is not creating race
conditions itself such as by changing the same object in parallel.
This should yield a significant improvement in the driver_overhead_2
benchmark which is heavy on such calls.
Bug: angleproject:8666
Bug: b/335295728
Change-Id: Iad1577b9ab2eb57b6a4599ec6d70fa90eb518e8d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5588385
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 0e892a02 | 2024-05-30T14:07:47 |  | EGL: Move egl surface timing calls into tail calls.
eglGetCompositorTimingANDROID and eglGetFrameTimestampsANDROID can both
take a lot of driver time to execute proportional to ANGLE's
overhead.
Bug: angleproject:42266858
Change-Id: I9b991f74a261b45aeb2aaf133fca7d22cabc41f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5580877
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | f4140c76 | 2024-05-10T16:56:13 |  | Remove share group lock from glBindBuffer
This is a very hot function.  Removing the share group lock from this
function improves the driver_overhead_2 execution time by ~1ms on Pixel
6.
Bug: angleproject:8667
Change-Id: I9ea04f48aa1d2d0efec21407374393e88a1316e3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5533081
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com> | 
            
              |   | a70ef7fc | 2024-04-25T14:19:50 |  | Add EGL_ANGLE_no_error for disabling EGL validation.
Chrome makes many small EGL calls that can have proportionally
expensive validation.
Bug: angleproject:8434
Change-Id: I4f4d0e6eff64839f76a0f7bf48e5c94b8df9d809
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5491459
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 071e1e83 | 2024-05-08T10:33:49 |  | EGL: eglCreateSyncKHR uses a return value for the tail call
eglCreateSyncKHR was duplicated in two lists for using a tail
call and needing a return value tail call.
Bug: angleproject:8434, chromium:338902974
Change-Id: I9dffeaec3468e4ea3f5ed7d885e9ef418e8d8da5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5525854
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 038ad6c7 | 2024-04-23T13:23:04 |  | EGL: Use unlocked tail calls for surface, sync and img calls
EGL surface and sync calls can be expensive to do while holding the
global lock on EGL. They are safe because the parameters are captured
by value and the underlying EGL driver is also thread safe.
EGL image creation also tends to be expensive and is called freqently
by Chrome.
Bug: angleproject:8434
Change-Id: I7e554fe2e3700d98469de267f7bbff1e96358c78
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5478229
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org> | 
            
              |   | 884dc380 | 2024-04-24T16:46:01 |  | EGL: Make eglGetCurrent(Context|Surface|Display) lockless.
These functions access only egl::Thread state.
Bug: angleproject:8434
Change-Id: I3dd6cd1f4fd145613f0be824e4f6e13815422997
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5485526
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 318e5e02 | 2024-03-24T08:17:56 |  | Vulkan: Update EGL_EXT_buffer_age implementation
1. Buffer age is always 1 when swap behavior is EGL_BUFFER_PRESERVED.
2. WindowSurfaceVk::getBufferAge no longer acquires a swapchain image.
   See commit: b46cf6989f6fe8db5f0759001f633681a96fadde
3. It is valid to pass attributes of eglQuerySurface API to
   eglQuerySurface64KHR API
4. Add deadlock fix to eglQuerySurface64KHR
Bug: angleproject:3529
Bug: angleproject:6851
Tests: EGLLockSurface3Test.QuerySurfaceAndQuerySurface64Parity*
Tests: EGLBufferAgeTest.QueryBufferAge*
Change-Id: Idf3c4fc08364f671fb02e99111be2beb7a1d9f3d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5389461
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 82ba79ff | 2024-01-08T15:22:59 |  | OpenCL: Update CLtypes.h to cl_types.h
This change/enhancement is to keep codebase more consistent since
vulkan backend versions of this header use lowercase-snake_case for
file name.
Bug: angleproject:8501
Change-Id: I223712c72db06425d192ddfe7300e5475c341e38
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5233364
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | c2ad86bc | 2024-01-09T15:39:26 |  | eglGetError is now a lockless entrypoint
eglGetError returns last recorded error in a thread,
there is no need to lock the global mutex.
Bug: b/318921454
Change-Id: I9e5192becc67dc81b54abfb63d2b32283ebc69d8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5181881
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | c1aaa313 | 2023-11-29T18:54:06 |  | OpenCL: Updated autogen script for updated CL error handling
Part 3 of Issue 8435:
Updated entrypoint autogen script for CL to:
  - Remove errorCode param for all CL APIs returning CL objects
  - Init CL error TLS object for all CL APIs prior to calling ANGLE FE
Bug: angleproject:8435
Change-Id: I4f1784c0bda393d5f3126f205f17ec24662424ad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5075774
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | b46cf698 | 2023-11-30T11:00:18 |  | Vulkan: Fix Android deadlock with querying buffer age
Similar to eglSwapBuffers, eglQuerySurface with EGL_BUFFER_AGE_EXT can
cause a call to vkAcquireNextImageKHR.
Bug: angleproject:6851
Bug: b/313975825
Change-Id: If3f0521219cab9aba2aeb2b70958bf0f197bc96a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5077406
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | ade3dacd | 2023-11-06T21:56:41 |  | Do compile/link unlocked if not threaded (but thread-safe)
If GL_KHR_parallel_shader_compile is not supported, or it is not used to
do threaded compilation and link, this change lets the compile and link
jobs be done after releasing the share group lock.  With
multithreaded/multi-context applications, this allows the other context
(typically the main context) to make progress in the meantime.
A typical scenario where this optimization matters is games seamlessly
loading a new area of the game and performing compilation and link in a
separate context.  Before this change, the game would stutter as the
compile/link jobs prevent the main thread from drawing anything.  With
this change, the hitching is removed.
Bug: angleproject:8297
Change-Id: I702d84324a7442561b49677bf42c16d650304313
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5006640
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 5149d210 | 2023-10-02T22:27:11 |  | Vulkan: Deduplicate sync's clientWait logic
As a side effect, both GL_NV_fence's client wait and external fence
client wait is also done in an unlocked tail call.
Bug: angleproject:8340
Change-Id: Ia0b882cc67ecf7ac5b2a8f9dc9e721060cca3c9e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4908351
Reviewed-by: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | d919870f | 2023-09-14T16:00:07 |  | Vulkan: Do host image copy without holding the share group lock
When an application uploads texture data such as with `glTexSubImage2D`,
the share group lock is being hold while the data is being copied.
Without VK_EXT_host_image_copy, this is a copy to a staging buffer,
which may itself be expensive.  With VK_EXT_host_image_copy, the cost of
the copy is higher and so the lock would be held for a longer duration.
This is particularly harmful to applications that spawn a separate
thread for texture uploads (as the main thread is unable to make GL
calls).  This change moves the actual copy call to the tail of the call
after the share group lock has been released.  As a result:
- The upload thread may be a bit slower, but
- The copy does not interfere with the main thread, and
- The copy does not interfere with the GPU's rendering work.
As a result, games that load content seamlessly during gameplay should
experience less stutter during texture uploads.
Bug: angleproject:8341
Change-Id: I818c4389d4bf828847578da89414623e4b5e844e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864290
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 4b724130 | 2023-06-27T18:08:27 |  | Rename SharedContexMutex into ContexMutex
Follow up after:
    Replace (Single/Shared)ContextMutex classed with ContextMutex
Renamed build option:
    angle_enable_shared_context_mutex -> angle_enable_context_mutex
Renamed because there is no more SharedContexMutex class and
ContextMutex is now used for both Shared and not Shared Contexts.
Bug: angleproject:8226
Change-Id: I68eea84aa59441d9c5b19870910b2bb499311e08
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4650350
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> | 
            
              |   | ce263437 | 2023-09-11T12:25:28 |  | Vulkan: Perform CPU wait in clientWait outside the global lock
Leverage UnlockedTailCall and move the CPU side wait
during a clientWait outside of the global mutex lock.
Bug: angleproject:8340
Tests: FenceSyncTest.BasicOperations*
Tests: EGLSyncTest.EglClientWaitSync*
Change-Id: I8c05e62e74cc64d38bf8797d28faaf49135e71fc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851649
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com> | 
            
              |   | 9740b01b | 2023-09-08T16:30:08 |  | Enhance UnlockedTailCall run method
UnlockedTailCall::CallType is now std::function<void(void *)>
This is in preparation for upcoming changes where unlocked
tail calls need access to objects outside block and namespace
scope.
Bug: angleproject:8340
Tests: UnlockedTailCall*
Change-Id: Ida6822b701c5c11ce4b8f6e3aae53108755e2cad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852021
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com> | 
            
              |   | 74cf6a3a | 2023-07-12T14:44:17 |  | Ensure lockless entry point validations only access private data
Bug: angleproject:8224
Change-Id: I19e867923b088879f9f37d0a3b4ff8b681470be0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678352
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 9962f078 | 2023-07-11T15:39:50 |  | Pass only context-private state to private entry points
This change ensures that the implementation for these entry points
cannot access anything other than context-private state.
Bug: angleproject:8224
Change-Id: I988672b138d861db25e91d71ab8c34baa4e8ebee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678783
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org> | 
            
              |   | 40111c68 | 2023-07-11T14:21:21 |  | Rename context-local to context-private state
Bug: angleproject:8224
Change-Id: I1bb39475043f8fb14d683d11a038b4850692a8c6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4678781
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 04c0cc8d | 2023-07-06T21:58:06 |  | Simplify aliasing-exception logic in entry point generation
Bug: angleproject:8224
Change-Id: Ic54c233ab3d8a0f9a1ac803804aea770c6f7cc07
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4672145
Reviewed-by: Roman Lavrov <romanl@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 51320fab | 2023-07-06T16:01:58 |  | Make most GLES1 entry points lockless
These entry points only set context-local state and thus don't require
locking.
Bug: angleproject:8224
Change-Id: I80223340348d62a56109324ab3e4f935e53419b3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4670407
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | eb205e68 | 2023-07-06T13:34:28 |  | Make the glPatchParameteri entry point lockless
This entry points only sets context-local state and thus doesn't require
locking.
Bug: angleproject:8224
Change-Id: I17975a97aa7f68c3ddf2ef78069b8f519fdc4c1a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4670405
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com> | 
            
              |   | 7e0fb7e4 | 2023-07-05T17:20:23 |  | Make glIsEnabled* entry points lockless
These entry points only set context-local state and thus don't require
locking.
Bug: angleproject:8224
Change-Id: I6fe40bf4381e1d42248358f773ec9d5675883ada
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4666356
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 72c26926 | 2023-07-05T16:31:23 |  | Make pack/unpack and hint entry points lockless
These entry points only set context-local state and thus don't require
locking.
Bug: angleproject:8224
Change-Id: I5694d319df61a7a9df1766cf1f723b9a05208209
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4666352
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 208dfe28 | 2023-07-05T15:18:57 |  | Make glStencil* entry points lockless
These entry points only set context-local state and thus don't require
locking.
Bug: angleproject:8224
Change-Id: I612d8219ba038464173490b2c261e9e7b229c83f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4661702
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | c3c2f450 | 2023-07-05T14:52:10 |  | Make glBlend* entry points lockless
These entry points only set context-local state and thus don't require
locking.
Bug: angleproject:8224
Change-Id: Ie811c35ae7b65106db9af9f7531ad3a5e0bd4f8c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4661701
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 44395930 | 2023-07-05T11:59:23 |  | 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> | 
            
              |   | 9daac2b7 | 2023-07-05T11:36:46 |  | Make glEnable/Disable entry points lockless
These entry points only set context-local state and thus don't require
locking.
Bug: angleproject:8224
Change-Id: Id4eab729115bd75f82e1ec7a27355c821a7c4320
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4661697
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com> | 
            
              |   | be41fe29 | 2023-07-04T15:35:46 |  | Make glColor/DepthMask entry points lockless
These entry points only set state that is entirely accessed by the
owning context (context-local) and thus don't require locking.
glColorMask* functions also affect the cached context state (in
particular draw validity), so the relevant cached state is also modified
to support being locklessly modified.
Bug: angleproject:8224
Change-Id: I221b4efa25fc1c11419d1ac942f1c37e59ec92c0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4658173
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 4db13081 | 2023-07-04T14:40:31 |  | Make glClearColor/Depth/Stencil entry points lockless
These entry points only set state that is entirely accessed by the
owning context and thus don't require locking.
Bug: angleproject:8224
Change-Id: I6cddee865ffd38e228f8f87dd14adffb916e0fed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4658172
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 36c3e0f5 | 2023-01-17T17:42:59 |  | Implement "Shared Context Mutex" functionality.
Existing implementation uses single `GlobalMutex` for
- EGL calls
- GL calls for Contexts with concurrent access.
This CL introduces abstract `egl::ContextMutex` with two
implementations:
- SingleContextMutex;
- SharedContextMutex<Mutex>;
Note:
`std::mutex` is used in this commit. It is very easy to change mutex
type either at compile-time or at run-time (single type per Display).
When Context:
- is not Shared;
- does not use `EGLImage`s;
- does not use EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE
- does not use EGL_DISPLAY_SEMAPHORE_SHARE_GROUP_ANGLE
then it will be using `SingleContextMutex` with minimal overhead.
Before such Context is used as `shareContext` or uses `EGLImage`
its mutex replaced by `SharedContextMutex<Mutex>`.
The `GlobalMutex` is only used for EGL calls, while `egl::ContextMutex`
implementations for GL calls. Because some EGL calls use Context,
explicit `egl::ContextMutex` lock is required. This is implemented by
generating "egl_context_mutex_autogen.h" header, and insertion of
`ANGLE_EGL_SCOPED_CONTEXT_LOCK()` macro before `ANGLE_EGL_VALIDATE()`
in each EGL entry point. Implementation in "egl_context_lock_impl.h"
returns lock for required APIs. Special cases of `egl::ContextMutex`
lock handled separately. `std::unique_lock<>` is not used for
performance reasons.
`egl::ContextMutex` explicitly locked when capturing EGL calls.
Fixes EGLImage problem:
    https://chromium.googlesource.com/angle/angle/+/e18240d136d15e5cdfa4fa4a6355ca21c8d807b6
    Mark contexts as shared when importing EGL images.
Details:
- EGLImage inherits Context's mutex when created.
  Mutex is used when the EGLImage accessed or destroyed.
- When EGLImage is used in Context with other `egl::ContextMutex`,
  two mutexes are merged into one.
- After the mutex merge, Context Groups will remain separate,
  but will not be able to run in parallel.
Fixes race when checking `context->isShared()` in the
`SCOPED_SHARE_CONTEXT_LOCK()` macro. One Context may start executing GL
call while not "Shared", but become "Shared" inside the call. New
(second) "Shared" Context may immediately start using GL and potentially
corrupt some "Shared" state.
Possible performance benefit: allows parallel execution in some cases,
when single `GlobalMutex` would block.
Important note:
    Process of replacing the `SingleContextMutex` by
    `SharedContextMutex<Mutex>` is not 100% safe. This mean that
    original Context may still be using `SingleContextMutex` after
    activating `SharedContextMutex<Mutex>`. However, this was always
    the case before introduction of this CL. Old `Context::mShared`
    member update was not synchronized in any way at all. In other
    words, this solution does not 100% fix the original problem.
    For 100% safe solution `SingleContextMutex` should not be used
    (always pass `SharedContextMutex<Mutex>` to the `gl::Context`
    constructor). See `lockAndActivateSharedContextMutex()` for more
    details.
CL adds new build option:
    angle_enable_shared_context_mutex = true
Behavior with other build options:
- When:
    `angle_enable_shared_context_mutex`    is disabled or
    `angle_enable_share_context_lock`      is disabled or
    `angle_force_context_check_every_call` is enabled,
  Contexts will always have `SingleContextMutex`, however it will be
  only used in special cases. `SCOPED_SHARE_CONTEXT_LOCK()` will use
  `GlobalMutex` when applicable.
- Otherwise, `SCOPED_SHARE_CONTEXT_LOCK()` will use `egl::ContextMutex`.
Some GFXBench "1080p Driver Overhead 2 Offscreen" performance numbers.
Tested on S906B (Samsung Galaxy S22+) on old ANGLE base:
    https://chromium.googlesource.com/angle/angle/+/807c94ea85e046c6f279d081d99f0fb1bcf1191a
    Capture/Replay: Adjust tests do adhere to capture limits
Each test result is an average frame number from 6 runs.
    SingleContextMutex                            6579 ( +0.13%)
    (old) GetContextLock() (mShared is false)     6570
Forced `mShared = true` or NOT using `SingleContextMutex`.
    SharedContextMutex<std::mutex> FORCE          5061 (-22.97%)
    (old) GetContextLock() FORCE                  4766 (-27.46%)
Bug: angleproject:6957
Bug: chromium:1336126
Change-Id: Idcd919f9d4bf482b9ae489bd8b4415ec96048e32
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4374545
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 7d4c6d1d | 2023-05-09T12:19:54 |  | Allow glDelete* while PLS is active
Banning glDelete* is extremely dangerous. It will almost definitely
cause memory leaks in client code, and it makes JS garbage collection
needlessly complex.
Instead, specify that PLS is implicity deactivated if the client deletes
anything that is attached to the current draw framebuffer during a PLS
rendering pass.
Bug: chromium:1421437
Change-Id: I3a18ee6b5d5567431e6fa3eccea58cb049845502
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4521436
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app> | 
            
              |   | 7fd01d03 | 2023-04-19T00:54:24 |  | Vulkan: Throttle the CPU without holding the global lock
CPU throttling goes through CommandQueue and is thread-safe.  Performing
it in an unlocked tail call allows other unrelated EGL calls to go
through.
Bug: angleproject:8135
Change-Id: Idb3841be5d8ea8c4b76217f6707be26b28ea39c2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4444027
Reviewed-by: Igor Nazarov <i.nazarov@samsung.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com> | 
            
              |   | cd6a58f2 | 2023-04-18T12:45:10 |  | Vulkan: Make eglPrepareSwapBuffersANGLE less special
This function now uses the UnlockedTailCall mechanism so it doesn't
require as much special-case code generation.
This change does not fix the bug that this function is doing too much
work without holding any locks.  That will be done in a follow up.
Bug: angleproject:6851
Bug: angleproject:8133
Change-Id: I77f4d514ff4aeef85bc1cc59214f7caa23aca7df
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4443186
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | 1328f2f3 | 2023-04-17T16:43:12 |  | Vulkan: Destroy the surface without holding the EGL lock
This change defers surface destruction to the end of the entry point
that causes it so that it is done without holding the EGL lock.  This
works around a specific deadlock in Android.  On this platform:
- For EGL applications, parts of surface creation and destruction are
  handled by the platform, and parts of it are done by the native EGL
  driver.  Namely, on surface destruction, native_window_api_disconnect
  is called outside the EGL driver.
- For Vulkan applications, vkDestroySurfaceKHR takes full responsibility
  for destroying the surface, including calling
  native_window_api_disconnect.
Unfortunately, native_window_api_disconnect may use EGL sync objects and
can lead to calling into the EGL driver.  For ANGLE, this is
particularly problematic because it is simultaneously a Vulkan
application and the EGL driver, causing `vkDestroySurfaceKHR` to call
back into ANGLE and attempt to reacquire the EGL lock.
Since there are no users of the surface when calling
vkDestroySurfaceKHR, it is safe for ANGLE to destroy it without holding
the EGL lock.
Note that only eglDestroySurface and eglMakeCurrent may lead to the
destruction of a window surface.
Bug: b/275176234
Bug: angleproject:8127
Change-Id: I02dc52e53e150943457e3f503e7ef30469f96b05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4428754
Reviewed-by: Charlie Lao <cclao@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | e2baaff8 | 2023-04-06T00:11:23 |  | Prevent recursive GlobalMutex locking by ANGLE itself.
Instead of adding `ANGLE_SCOPED_GLOBAL_LOCK()` for `glEGLImage*` GLES
APIs, this CL uses new `SCOPED_GLOBAL_AND_SHARE_CONTEXT_LOCK()` macro
in place of `SCOPED_SHARE_CONTEXT_LOCK()`.
This will remove dependency on recursive mutex for ANGLE itself.
Recursive mutex is still required for Android Vulkan or in specific
cases when using layer libraries.
Bug: chromium:1383195
Change-Id: I0c379c45c046b0f5e5dd3ea64a45d33b0ad3ee43
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4404777
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> | 
            
              |   | ef20f191 | 2023-03-29T14:05:04 |  | Make the PLS allow list more permissive
Allow ClipControlEXT, FlushMappedBufferRange, Gen*, PolygonOffset*,
ProvokingVertexANGLE, and KHR_debug commands.
Allow caps DEPTH_CLAMP_EXT, CLIP_DISTANCE[0..7]_EXT.
Ban indexed caps besides BLEND, SCISSOR_TEST, SCISSOR_TEST_EXCLUSIVE_NV.
Clarify that the index restrictions on indexed caps only apply to BLEND.
Bug: chromium:1421437
Change-Id: Ibdb0acaebfa992ad37c928481d5ecb10496f22e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4382502
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Chris Dalton <chris@rive.app> | 
            
              |   | 3b57e999 | 2023-04-17T15:38:47 |  | Scope global lock in entry points
This change is a no-op.  It's in preparation for adding calls at the end
of the entry point after the lock is unlocked.
Bug: angleproject:8127
Change-Id: I4cd79ff8e5f20f87f36040afbd1ed9f16406d519
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4436589
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com> | 
            
              |   | be3d7e6b | 2023-03-30T14:35:18 |  | Remove redundant g_SurfaceMutex.
This mutex become redundant after recent CL:
    https://chromium.googlesource.com/angle/angle/+/23ad4fa2be35aed303cbb8c2d632a04714354ef0
    Don't hold global surface lock during AcquireNextImage
Every place in the code where `ANGLE_SCOPED_GLOBAL_SURFACE_LOCK()`
is used also uses `ANGLE_SCOPED_GLOBAL_LOCK()`.
Bug: angleproject:6851
Change-Id: I464b6ca74743c9ee9fa23caad216f0e26c480655
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4385293
Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com> | 
            
              |   | a491bbe3 | 2023-03-18T19:05:08 |  | 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> | 
            
              |   | cba2a0d5 | 2023-02-16T19:48:30 |  | Keep MemoryBarrier macro defined
Macro was originally undefined in crrev.com/c/361291.
Undefining it breaks UWP build with newer compilers.
Keeping the macro defined doesn't affect libGLESv2 exported symbols,
so it looks like there is no need to undefine it.
Bug: chromium:1380553
Change-Id: I6476aa015949e5f2639160fac80db39da710bfb7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4262071
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org> | 
            
              |   | 278b5d02 | 2023-02-17T10:39:40 |  | EGL: Enable wayland types with autogen
Types with "wl_" indicate wayland types, use as is.
Bug: angleproject:8027
Change-Id: If3c5d062272038c3a8773796a233af2305f3ed98
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4265015
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> | 
            
              |   | a52c0a6c | 2023-02-06T16:01:27 |  | Capture/Replay: Add and handle new resource type for EGLSync
So far calls involving EGLSync were not tracking the actual
sync objects, and this may lead to race conditions in
multi-threaded and multi-context scenarios.
This CL adds the type EGLSyncID and some specialized code
handling of egl::Sync to distinguish EGLSync from the already
existing GLSync objects in order to track them separately.
Bug: angleproject:7911
Change-Id: I91b188a41069bc0620f51c55ee516d23b55bdd38
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4200095
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com> | 
            
              |   | f7b5d5d1 | 2022-12-15T10:52:07 |  | Capture/Replay: Remove inline variable declarations.
This makes parsing easier for the "simplified C" interpreter.
We introduce a resource ID buffer as a way to manage a list
of resource IDs to replace the inline resource lists.
Turns on the Among Us trace in the interpreter tests.
Bug: angleproject:7775
Change-Id: I1bb9c0e9b087965a18691bc99b2e9947610b9eaf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4128719
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org> | 
            
              |   | fdada9ee | 2022-12-13T14:52:53 |  | 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> | 
            
              |   | 8971a592 | 2023-01-18T14:35:09 |  | Revert "Make SyncIDs a packed type."
This reverts commit 9de913077a5fcc3d2f2e327b56bbe30efe2fde96.
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> |