src/libGLESv2/entry_points_gles_ext_autogen.cpp


Log

Author Commit Date CI Message
Shufen Ma 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>
Panfeng Hou 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>
Alexey Knyazev 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>
Alexey Knyazev 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>
Alexey Knyazev 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>
Alexey Knyazev 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>
Alexey Knyazev 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>
Alexey Knyazev 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>
Alexey Knyazev 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>
Alexey Knyazev 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>
Alexey Knyazev 86ce0f0e 2025-04-24T00:00:00 Add EXT_multi_draw_arrays stubs Bug: angleproject:414506477 Change-Id: Idc3ca950b88c9632268922ec7a311936916c2a43 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6522405 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 618bc398 2025-04-24T00:00:00 Add EXT_draw_instanced stubs Bug: angleproject:416241733 Change-Id: I6dfb0ff1e941fdd33387e06920c97ba4232e8820 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6519383 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 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>
Alexey Knyazev 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>
Alexey Knyazev 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>
Alexey Knyazev ae70513d 2025-04-18T00:00:00 Remove NamedBufferStorageExternalEXT entry point OpenGL ES does not support DSA. Bug: angleproject:407932145 Change-Id: If5f544de2b43e05888415a4fc805ad6065d4408b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6495409 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kenneth Russell cdb34025 2025-04-25T12:09:14 Move robust APIs for PLS into robust_client_memory sections. These two entry points are at the intersection of GL_ANGLE_shader_pixel_local_storage and GL_ANGLE_robust_client_memory. Move them into the robust_client_memory section to simplify autogenerated validation. Rerun code generation. Fixed: angleproject:413597061 Change-Id: Icac160dbc7ab4088ee90471af60bb2e5ab3e1b87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6492427 Auto-Submit: Kenneth Russell <kbr@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 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>
Alexey Knyazev 595d79e4 2025-04-04T00:00:00 Do not expose GL_ARB_sync That extension does not exist in OpenGL ES. Fixed: angleproject:409717088 Change-Id: I82234f0051c2c646ef15c22e1a0da1704ef3a35b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6448233 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Chris Dalton 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>
Alexey Knyazev 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>
Roman Lavrov 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>
Chris Dalton 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>
Chris Dalton 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>
Chris Dalton 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>
Chris Dalton 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>
Chris Dalton 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>
Roman Lavrov 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>
Alexey Knyazev 26414249 2024-11-28T00:00:00 Remove GetTexLevelParameter* from ANGLE_texture_multisample These functions are always provided by the GL_ANGLE_get_tex_level_parameter frontend extension. Fixed: angleproject:382291448 Change-Id: I59b4ccc56478f2e0931d1f5bd665cfdd5a34391e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6072222 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Chris Dalton 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>
Igor Nazarov 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>
Panfeng Hou d57b1d30 2024-11-28T11:09:53 Vulkan: Support GL_OES_required_internalformat Only export 'GL_OES_required_internalformat' in GLES extension. Bug: angleproject:364069034 Change-Id: I6198b7b79fc2853c7585ebff183016ee110a25e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6055198 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Xinyu Fang 5d3d299d 2024-11-25T16:35:51 Expose the required GLES1.0/1.1 extensions in ANGLE Exposed below extensions: GL_OES_texture_mirrored_repeat GL_OES_blend_subtract Bug: angleproject:380704155 Change-Id: Ib095f9bfaabda92bb2c588d633f1512e118f066e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6038450 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Xin Yuan b6b826b3 2024-11-27T09:57:18 Add stubs for GL_EXT_EGL_image_storage_compression Bug: angleproject:352345943 Change-Id: I993a7908e868019852c0d682bf2131e46a2cf304 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6051521 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi c02e0184 2024-11-22T17:21:38 Add GL_ARM_rgba8 * It is a subset of GL_OES_rgb8_rgba8. Bug: angleproject:352352894 Change-Id: I07f031157344385c847cd229a85ebf59cc6dfcfc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6044333 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Neil Zhang 8a2b60b2 2024-11-06T17:13:16 Add stubs for GL_EXT_texture_storage_compression Bug: angleproject:352364583 Change-Id: I607c19c0c9bec7f0e3dd325e44b42e73f826b61c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5998012 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 028bb1cb 2024-10-03T00:00:00 Add EXT_texture_query_lod stubs Bug: angleproject:368275901 Change-Id: I34ab23630bc6c3d720acefa97e4c324f41fa61cb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5922877 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi aa61c076 2024-10-08T12:14:13 Autogen files for GL_ARM_shader_framebuffer_fetch_depth_stencil Bug: angleproject:352364582 Change-Id: I3e736195be3a21c2ae48b4ab2922f9ae7bfcbf32 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5916185 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Geoff Lang 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>
Shahbaz Youssefi 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>
Alexey Knyazev 0cce8fd3 2024-09-12T00:00:00 Add EXT_texture_shadow_lod stubs Bug: angleproject:365108862 Change-Id: Ib879c2994871a41ad680bfe487593ea8ccbba7cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5860118 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev e850656a 2024-08-29T00:00:00 Add EXT_separate_depth_stencil stubs Bug: angleproject:362780331 Change-Id: I378b5c9ff06a2c5e56d68ef93ed42e0351b5044e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5823195 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 0b888d50 2024-06-13T11:32:53 Add KHR_blend_equation_advanced_coherent * Added this extension to registry_xml.py. Bug: angleproject:42262258 Change-Id: I2d69982b9ec876e3c21346039ed78aa21b1a1896 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5634379 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Geoff Lang 92148c2c 2024-06-17T11:13:46 GL: Implement GL_EXT_clear_texture. This extension is useful because it allows clearing textures without changing the framebuffer. Chrome uses this on Android when it's available. Bug: angleproject:347047859 Change-Id: I765d9991c4549b3655446d9f51847d1095792dbd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5631810 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2d8e15f8 2024-05-31T14:25:12 Add stubs for GL_QCOM_tiled_rendering Bug: angleproject:343900918 Change-Id: I77d742949565ebfecb5f4446db3510af4f94033c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5588629 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi 8042ebdc 2024-05-31T17:06:56 Add OES_tessellation_shader Bug: b/344030760 Change-Id: I49c5dd870a09cd6b43beea13c70b8c1a4266875b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5595610 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Amirali Abdolrashidi edaaacd9 2024-05-31T17:30:34 Add OES_gpu_shader5 Bug: b/344031022 Change-Id: Ib11b5835b566e299ce6a7a47a4e4a46bcfd670ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5595608 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 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>
Alexey Knyazev 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>
Amirali Abdolrashidi ce6232fc 2024-05-21T11:15:51 Add KHR_robustness * From the spec, there are some differences between KHR_robustness and EXT_robustness (already in use). In this CL, the following are addressed: * Updating the EXT suffixes * Changing EXT to KHR for GLES * Removing EXT for GL * Adding GLGetnUniformuivKHR (no equivalent in EXT) * Added GL_KHR_robustness to the list of extensions. * The API implementations seem to be already in place. * Validation functions will be updated in a follow-up CL. Bug: angleproject:42262244 Change-Id: Ibbc1bc11ec08ac756f4a03d11f51ba1268d037a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5555984 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d9943e44 2024-04-09T23:53:48 Remove Program::syncState The last bit of responsibility still left in Program::syncState was to wait for post-link tasks for the sake of EGLBlobCacheTest tests. A new extension, GL_ANGLE_program_binary_readiness_query is created so that the wait can be done in the test itself. This extension is ultimately useful for applications as well, so they can avoid blocking the CPU by calling glGetProgramBinary prematurely. Bug: angleproject:8297 Change-Id: Ied6b755cb9b060198f82c7948bfd03441435a578 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5440302 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Steven Noonan c55c8ad2 2024-03-05T15:42:28 extension XML cleanup Add a bunch of missing extensions, commands, enums, and aliases to the extension XML files. These were missing when I generated a GL loader from the XML. Additionally, removing the unimplemented ANGLE_timer_query specification. Bug: angleproject:8432 Change-Id: I55b7393a313070719200c150a91b1751206ca2cb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5347156 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Auto-Submit: Steven Noonan <steven@uplinklabs.net> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya d0f5a662 2024-01-25T13:01:24 Bugfix in entry points for QCOM foveated extensions Change framebuffer and texture parameter type from GLuint to FramebufferID and TextureID types respectively. Bug: angleproject:8484 Change-Id: I822897b268f2dab56cee3f5776c07ad46a6dd052 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5238212 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya d093c3d3 2024-01-17T11:33:46 Add entry points for QCOM foveated extensions Add entry points for GL_QCOM_framebuffer_foveated and GL_QCOM_texture_foveated extensions Bug: angleproject:8484 Change-Id: I59053f9be76fbb8eaed344aa460ecb1e178ce7db Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5206990 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 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>
Shahbaz Youssefi 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>
Shahbaz Youssefi 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>
Shahbaz Youssefi 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>
Shahbaz Youssefi 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>
Alexey Knyazev 94ceedb7 2023-07-10T00:00:00 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>
Shahbaz Youssefi 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>
Shahbaz Youssefi 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>
Shahbaz Youssefi 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>
Shahbaz Youssefi 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>
Shahbaz Youssefi 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>
Shahbaz Youssefi 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>
Shahbaz Youssefi 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>
Igor Nazarov 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>
Steven Noonan a01a566c 2023-06-09T00:31:06 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>
Chris Dalton 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>
Alexey Knyazev b7a5714f 2023-03-31T00:00:00 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>
Shahbaz Youssefi 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>
Vikas Soni b5fa8728 2023-04-20T14:59:28 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>
Igor Nazarov 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>
Chris Dalton 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>
Chris Dalton 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>
Chris Dalton b468e4dd 2023-03-08T14:21:47 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>
Alexey Knyazev 52ba6071 2023-03-06T00:00:00 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>
Chris Dalton a65f6a9d 2023-03-07T16:11:44 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>
Alexey Knyazev 1174582a 2023-03-06T00:00:00 GL: Implement EXT_clip_control The extension is trivially exposed if the current context supports it. * Added packed clip control enums * Removed unused state query code * Aligned symbol names with the specs Bug: angleproject:8066 Change-Id: I9d106f39800658ecc75f4525ee93cb534dc49f9e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4306770 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev a2efea13 2023-03-01T00:00:00 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>
Alexey Knyazev 1ca860ac 2023-02-22T00:00:00 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>
Alexey Knyazev e2cf65ed 2023-02-22T00:00:00 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>
Alexey Knyazev dd1cf777 2023-02-16T00:00:00 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>
Sean Risser 0133b6f1 2023-01-20T16:02:27 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>
Alexey Knyazev 9bd37934 2023-01-12T00:00:00 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>
Alexey Knyazev 067ace47 2022-12-21T00:00:00 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>
Gregg Tavares be9e8e7b 2022-12-14T14:13:39 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>
Peng Huang 2805e164 2022-11-29T15:16:42 Fix EGLImage related race condition crash Bug: chromium:1383195 Change-Id: Ibd74126f19674dad9425d2c8f5b3a217cfd590e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4062912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Alexey Knyazev 27727e50 2022-11-21T00:00:00 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>
Chris Dalton 9bda9a79 2022-10-22T22:05:11 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>
Chris Dalton 3605b399 2022-10-20T17:00:02 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>
Chris Dalton 9f693aa3 2022-10-22T14:45:59 Implement an allow list for PLS In order to guarantee no data is lost while using the EXT_shader_pixel_local_storage extension, we need to restrict applications to a small subset of commands while pixel local storage is active. This CL implements the allow list for GL entrypoints using wildcard matching inside the code generator, and adds custom validation for the more specific restrictions that go into effect when PLS is active. Bug: angleproject:7279 Change-Id: I5dd48bd93c10e8775f32be32a4fcf17855eb2f0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3932552 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Jamie Madill 4bfb749f 2022-10-10T20:59:48 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>
Jamie Madill 8403e4c5 2022-10-10T20:59:29 EGL: Resource IDs for Surface, Context and EGL Image. This will make these classes play nicely with resource maps. As these objects are used in a lot of places, and simplified C can't handle unordered_map, it's necessary to index the maps by simple packed IDs in capture/replay code. This indirection will also have increased safety as we validate EGL resource ID handle values before accessing the memory directly. Also hides some of the other EGL capture methods behind helper methods to simplify the C code and hide assignments and other complex maps. Bug: angleproject:7758 Change-Id: Ibc7bb56430d3068bd38877c9dfb011979d4ea234 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957164 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Constantine Shablya e82eaff9 2022-09-22T16:01:06 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>
Shahbaz Youssefi de73f7cd 2022-09-14T22:27:28 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>
Chris Dalton 04f46f39 2022-09-12T10:15:16 Reland "Generate stubs for ANGLE_shader_pixel_local_storage" This is a reland of commit 8208e8a234d05b413d79e7a93b6a428adea41b33 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>
Chris Dalton 8c45e3c4 2022-09-15T01:07:47 Revert "Generate stubs for ANGLE_shader_pixel_local_storage" This reverts commit 8208e8a234d05b413d79e7a93b6a428adea41b33. 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>
Chris Dalton 8208e8a2 2022-09-12T10:15:16 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>