src/tests/gl_tests/PixelLocalStorageTest.cpp


Log

Author Commit Date CI Message
Chris Dalton f95cbef4 2025-09-07T17:50:37 Reland "Add a "noncoherent" layout qualifier to PLS" This is a reland of commit ef9c5ce43110f4f8ba56124bdee927944ce3ddd1 with an invalid assert removed. Original change's description: > Add a "noncoherent" layout qualifier to PLS > > Raster ordering can be expensive. If an app knows the geometry in a draw > does not overlap, it can mark the PLS planes as noncoherent and opt for > using barriers instead. > > Bug: angleproject:40096838 > Change-Id: I2d686c2e64f51940face186637a9fcadcc251bef > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6923300 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Commit-Queue: Chris Dalton <chris@rive.app> Bug: angleproject:40096838 Change-Id: I55077a973063427dfb0d510c87e75ec86ce8bb43 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6991929 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Brian Sheedy 44db20f2 2025-09-17T15:57:09 Revert "Add a "noncoherent" layout qualifier to PLS" This reverts commit ef9c5ce43110f4f8ba56124bdee927944ce3ddd1. Reason for revert: Causes issues on Apple silicon crbug.com/445727125 Original change's description: > Add a "noncoherent" layout qualifier to PLS > > Raster ordering can be expensive. If an app knows the geometry in a draw > does not overlap, it can mark the PLS planes as noncoherent and opt for > using barriers instead. > > Bug: angleproject:40096838 > Change-Id: I2d686c2e64f51940face186637a9fcadcc251bef > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6923300 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Commit-Queue: Chris Dalton <chris@rive.app> Bug: angleproject:40096838 No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ibc24bed27cec406b6e4ffa9aaa8fe3a2110b58ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6962955 Reviewed-by: Kenneth Russell <kbr@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Chris Dalton ef9c5ce4 2025-09-07T17:50:37 Add a "noncoherent" layout qualifier to PLS Raster ordering can be expensive. If an app knows the geometry in a draw does not overlap, it can mark the PLS planes as noncoherent and opt for using barriers instead. Bug: angleproject:40096838 Change-Id: I2d686c2e64f51940face186637a9fcadcc251bef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6923300 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Tom Sepez 6f0337a0 2025-08-28T23:13:22 Avoid some needless c_str() calls. Remove conversions from string -> char* -> string, as detected some time ago by a clang compiler plugin. Typically, this occurs when passing a c_str() result to a function that expects a string argument. Bug: b/412730353 Change-Id: I1d9c83e9ed5c4900eec266e71f534661f0f3d4d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6896657 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Tom Sepez <tsepez@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tom Sepez 25390156 2025-08-21T00:13:19 Suppress unsafe buffers on a file-by-file basis in src/ [1 of N] In this CL, we suppress many files but stop short of actually enabling the warning by not removing the line from the unsafe_buffers_paths.txt file. That will happen in a follow-on CL, along with resolving any stragglers missed here. This is mostly a manual change so as to familiarize myself with the kinds of issues faced by the Angle codebase when applying buffer safety warnings. -- Re-generate affected hashes. -- Clang-format applied to all changed files. -- Add a few missing .reserve() calls to vectors as noticed. -- Fix some mismatches between file names and header comments. -- Be more consistent with header comment format (blank lines and trailing //-only lines when a filename comment adjoins license boilerplate). Bug: b/436880895 Change-Id: I3bde5cc2059acbe8345057289214f1a26f1c34aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6869022 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 9812b972 2025-03-05T16:25:45 PLS: Validate rendering feedback loops of PLS planes Validate that active textures are not bound as PLS planes in WebGL compatibility mode using the same validation as for regular framebuffer attachments. Update the PLS spec to not generate an error for feedback loops but update the definition of feedback loops to include PLS planes. The WebGL spec is dependent on this definition and makes this feedback loop an error. Bug: angleproject:40096838 Change-Id: I597efef3685da7bfb2a9d149a9ec3bc9d01e6e4d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6330519 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Chris Dalton <chris@rive.app>
Alexey Knyazev 27cfdf8e 2025-04-24T00:00:00 PLS: Allow type conversions in state queries The OpenGL ES spec requires data conversions when a query command is issued that returns a data type different from the actual type of the requested state. * Updated PLS state queries to follow the main spec. * Removed PLS state query dependencies on interruptions. * Fixed non-robust command declarations in the extension spec. * Added missing extension support checks to robust commands. * Drive-by: Fixed invalid use of assertions in PLS tests. Fixed: angleproject:414361744 Fixed: angleproject:414506466 Change-Id: I573ab66d194d5666fd9c8845ac0ab262a714c5cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6507065 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev d08e9e9c 2025-04-18T00:00:00 Fix use of OpenGL ES 2.0 commands in ES 1.0 tests Bug: angleproject:409484297 Change-Id: I0186e23074ec7ac6cfae9d04645923d6acb163f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6487928 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 4c1c7c08 2025-04-18T00:00:00 Include entry point names in error messages Moved entry point name injection to ErrorSet::validationError to ensure that error messages handled via GL_KHR_debug always contain the corresponding entry point names. Updated affected tests. Fixed: angleproject:412384507 Change-Id: I9e898cadca0634505d70b36dbbb00feedb6c10b2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6480177 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev 96628296 2025-04-04T00:00:00 Fix GL_OES_texture_3D entry points validation * Added missing checks to the extension entry points to generate proper error messages. * Ensured that the extension entry points are invalid on unextended OpenGL ES 3.x contexts. * Fixed invalid usage of the extension entry points in PLS tests. Fixed: angleproject:409959473 Change-Id: If579e6171751dea1049e1ed85020f485d1e9deb2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6449807 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 76561acc 2025-04-04T00:00:00 Fix use of OpenGL ES 3.2 commands in tests Fixed tests that used OpenGL ES 3.2 commands instead of extensions when running on lower context versions. Bug: angleproject:409484297 Change-Id: I1d032a8ed4df429e564c24321101b4dfcd5d1ba8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6441554 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
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 f94b8ed1 2025-03-24T00:00:00 Allow PLS planes backed by cube map faces Adjusted extension validation and spec language. Bug: angleproject:40096838 Change-Id: I6e36fe63ed9d9d91a92298e3471b084b225ecfd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6394235 Reviewed-by: Chris Dalton <chris@rive.app> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton ea58cc5d 2025-03-21T10:06:18 PLS: Validate mip level bindings are within base/max range It is undefined behavior for imageLoad/imageStore to access a mipmap level outside the effective base/max range. Since PLS may be implemented with shader images, we need to require that the mip level bindings on active planes are within this range. Bug: angleproject:40096838 Change-Id: I539016d94db161f1af0ae1bd496a123b78fb51dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6382273 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton ac37e500 2025-03-18T14:07:28 Validate PLS texture slice collisions Generate errors when: * A single texture slice is bound to more than one active pixel local storage plane. * A single texture slice is simultaneously bound to an active pixel local storage plane and attached to an enabled drawbuffer. Bug: angleproject:40096838 Change-Id: I51f7260a36df94ac35deaaa2fbf7e81f56f06563 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6370082 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton 292bb458 2025-03-14T12:17:49 Cut MAX_COLOR_ATTACHMENTS_WITH_ACTIVE_PIXEL_LOCAL_STORAGE_ANGLE Since the number of real devices that support framebuffer fetch, but do not support draw_buffers_indexed, is effectively zero, MAX_COLOR_ATTACHMENTS_WITH_ACTIVE_PIXEL_LOCAL_STORAGE_ANGLE is an unnecessary complication. These hypothetical devices can fall back on shader images or just not support pixel local storage at all. This closes the door for WEBGL_shader_pixel_local_storage to ever be implemented on top of the ES2 extension that inspired it all, EXT_shader_pixel_local_storage, but WebGL can just use framebuffer fetch instead, or maybe even EXT_shader_pixel_local_storage2 some day. This dramatically simplifies the WEBGL_shader_pixel_local_storage extension. Bug: angleproject:40096838 Change-Id: I9c51f2ce000620f883cb7917d4e8618c8e9ee803 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6354657 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton ae71cc1c 2025-03-11T16:36:52 Don't destroy blend or color mask state in PLS The browser caches this state, so conditionally destroying it would invalidate the browser's cache. Instead, cache modifications to overridden PLS blend & color mask state in ContextPrivateState, and restore it upon ending PLS. Also update the spec to specify that FRAMEBUFFER_DEFAULT_WIDTH and FRAMEBUFFER_DEFAULT_HEIGHT may be overridden during PLS in ES 3.1. Bug: angleproject:40096838 Change-Id: Ic2c0aa6dc33ada7350e15e27bef22c79ca5f6c7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6350727 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Chris Dalton <chris@rive.app>
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 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>
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 35ffe55c 2025-03-09T15:00:27 Block framebuffer queries on overridden PLS state Generate an error from glGetFramebufferAttachmentParameteriv() when querying a color attachment that has been overridden by PLS. Bug: angleproject:40096838 Change-Id: I83e68c3527f034f9a24822cf4f57789f81b9b6af Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6338390 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 6c2737be 2025-03-06T13:09:44 Allow RASTERIZER_DISCARD while PLS is active Writes to pixel local storage can just be discarded as normal. The only special interaction we need is that BeginPixelLocalStorageANGLE always clears the PLS attachments, even if RASTERIZER_DISCARD is enabled. Bug: angleproject:40096838 Change-Id: I43d00af96b287134d73f08802cea58694fe7d717 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6332026 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Kimmo Kinnunen 82e25a32 2025-02-03T15:07:33 Make all " < 0" error messages consistent Use the form: Error is due to reason: <error message> Bug: angleproject:392938089 Change-Id: I9e72858cf76a46ab874ffc211afdae1eb93ca05d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6225600 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Kimmo Kinnunen 7d37d970 2025-01-30T13:47:59 Make error messages end in a dot Some messages had dot and some not. Fix by adding dot to all error message string literals. Best effort, for free form string literals, check ANGLE_CHECK invocation sites only. Bug: angleproject:392938089 Change-Id: Idedc3fe1d1e186fb91b5e54407df87f6830995a0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6218460 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi c75bd915 2024-12-10T23:01:44 Vulkan: Remove asyncCommandQueue It's been years and it never showed an advantage. In the meantime, performance without this feature seems close to native drivers (i.e. the feature has lost its appeal) and it's frequently a source of complication and bugs. Bug: angleproject:42262955 Bug: angleproject:42265241 Bug: angleproject:42265934 Bug: angleproject:42265368 Bug: angleproject:42265738 Bug: angleproject:42266015 Bug: angleproject:377503738 Bug: angleproject:42265678 Bug: angleproject:173004081 Change-Id: Id8d7588fdbc397c28c1dd18aafa1f64cbe77806f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6084760 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Chris Dalton 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>
Chris Dalton a05a0e15 2024-09-25T22:33:36 Validate PLS shaders against context state Add shader introspection for PLS uniforms and validate that they match context state during draw calls. Bug: angleproject:40096838 Change-Id: I76cdf8add03de8f8b0b3e772c15c0087c1d97e98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5893962 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton 966739ac 2024-09-19T23:49:06 Drop PLS support for EXT_shader_pixel_local_storage Supporting this backend drastically increased the complexity of the codebase, with little return. We don't support memoryless attachments on the web anyway, and since this extension requires us to literally draw the load/store operations, input attachments on Vulkan perform better. Once this implemention is completely removed, we will delete the PLS allow list, which isn't required for the other PLS implementations. Bug: angleproject:7279 Change-Id: Ibb036d36cbd33467e7a94398ce171cda7349e4f4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5874412 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Shahbaz Youssefi d193d51b 2024-06-17T22:46:08 Replace issue ids post migration to new issue tracker This change replaces anglebug.com/NNNN links. Bug: None Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 57524dc9 2024-06-06T00:00:00 Fix shader image level rebinding Added a test that interleaves two draw calls with rebinding the texture level of a shader image; fixed surface init. Vulkan: Fixed subresource serial generation. D3D11: Fixed dirty bit setting. Fixed: angleproject:7647 Bug: angleproject:8124 Change-Id: I4b5d095a1714f31a4f7b63f96dedb366faa17a03 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5611298 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev 2cbac2cf 2024-05-30T00:00:00 Disallow TEXTURE_3D for PLS Using 3D texture slices as PLS planes would require inefficient emulation on some backends. Bug: angleproject:8124 Bug: angleproject:8125 Change-Id: I8fcd4e686bf607deef27a8c091486a9012732f24 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5594092 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
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>
Shahbaz Youssefi a0fa06f6 2024-03-25T14:46:56 Translator: Disallow samplers in structs in interface blocks As disallowed by the spec: > Types and declarators are the same as for other uniform variable > declarations outside blocks, with these exceptions: > > * opaque types are not allowed Bug: chromium:328859176 Change-Id: Ib94977860102329e520e635c3757827c93ca2163 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5391986 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b3ab67d3 2024-03-14T15:06:02 tests: Remove unnecessary .get() from RAII objects Bug: chromium:40942995 Change-Id: I82509869bce3ad8f51811188fe04267f2de04786 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5370904 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya ab4aed3f 2024-01-29T10:59:58 Bugfix in PixelLocalStorageTest Add GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST to following tests - - PixelLocalStorageValidationTest - PixelLocalStorageCompilerTest - PixelLocalStorageTestPreES3 Bug: angleproject:7279 Change-Id: Ibd2e682be195fddff1cf638e37d12bcc740cf3a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5243831 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
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>
Chris Dalton 45f91a8c 2023-05-08T13:11:44 Deinitialize PLS planes when their texture is deleted The spec originally called for PLS planes to be converted to memoryless when their texture was deleted, but this is not compatible with WebGL, which does not support memoryless planes. Change the behavior to deinitialize them instead. This change requires the addition of a new observer message, angle::SubjectMessage::TextureIDDeleted, which PLS uses to deinitialize a plane when the app deletes its texture. Bug: chromium:1421437 Change-Id: I58fd91003747160f0a1abc1a8a7a87668890ba1f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4518565 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton 7aadc962 2023-05-05T19:28:17 Ban transform feedback and blend extensions with PLS Transform feedback can lead to render pass breaks in the Vulkan backend. EXT_blend_func_extended may restrict the number of draw buffers depending on API state, which can invalidate a PLS implementation. KHR_blend_equation_advanced does not allow multiple draw buffers, which is required by some PLS implementations. Bug: angleproject:7279 Change-Id: Id89f0e485ee65f55d802b121018f13b0028d8029 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4510716 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
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 1e166daf 2023-04-10T23:49:46 Finalize PLS support for non-2D texture types Commit to supporting GL_TEXTURE_2D_ARRAY and GL_TEXTURE_3D, and add tests. Suppress D3D11 and Metal for now, since shader image support for non-2D types needs some work on those backends. Drop support for cube maps, since those will cause complications on an implementation based on texelFetch. Bug: chromium:1421437 Bug: angleproject:8124 Bug: angleproject:8125 Change-Id: I403ae157b7d2609f2190a98c2576c92f73441412 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4415150 Reviewed-by: Kenneth Russell <kbr@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 513ca723 2023-03-13T14:30:20 Delete GL_LOAD_OP_DISABLE_ANGLE from PLS This load op makes the PLS spec and WebGL implementations unnecessarily complex. Bug: chromium:1421437 Change-Id: Iab02a8b02083899c6cc345ecb25b88c5871611c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4335148 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Chris Dalton f2e13539 2023-03-03T01:57:43 Implicitly enable PLS dependency extensions The ANGLE_shader_pixel_local_storage implementation makes internal use of various other extensions. These extensions must be implicitly enabled when ANGLE_shader_pixel_local_storage is in use. In this CL: * Convert ANGLE_shader_pixel_local_storage and ANGLE_shader_pixel_local_storage_coherent to requestable extensions. * Implicitly enable the dependency extensions, including each other, at the time either of these extensions is enabled. Bug: angleproject:7279 Bug: chromium:1421437 Change-Id: I26acbda776fe7045ea99d4f1e3df445e7a5cfd7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4306526 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
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>
Jamie Madill e21b95ed 2023-01-11T12:56:29 Fix bad ANGLE GL tests. These tests were calling GLES functions in the destructor, which would lead to nullptr deferences. This was only caught in TSAN for some reason. Bug: angleproject:7947 Change-Id: I47dd0edba19d029757c8ddb282ca06a7e1baab45 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4157174 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton eb1a13d8 2022-12-06T21:56:42 Improve PLS load and store op tokens Define more new tokens that are more clearly named, as opposed to recycling tokens that were meant for a different purpose. Bug: angleproject:7279 Change-Id: I840e5ea168235c49eec2693b2231c2d329027b0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4082057 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton a4db9477 2022-10-06T10:35:39 Implement pixel local storage with metal::read_write textures Metal's programmable blending feature isn't available on non-Apple Silicon, so on these devices we have to polyfill pixel local storage using read_write textures, which can also be coherent if raster_order_groups are supported. This change leverages the existing PLS transformation to images, and implements just enough shader image functionality in Metal to support the pixel local storage usecase. Missing shader image features are marked with UNIMPLEMENTED(). Bug: angleproject:7279 Bug: angleproject:7792 Bug: angleproject:7794 Bug: angleproject:7797 Bug: angleproject:7803 Change-Id: Ia96a714693d352d57351a1bae4f45437dde000e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3993363 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Shahbaz Youssefi 78e28cb8 2022-11-03T11:05:48 Vulkan: Remove glslang fallback ANGLE's SPIR-V generator is battle tested by now. Bug: angleproject:6210 Change-Id: I2ed88642e3ede435e3f906fbd701133be6873fb7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4002868 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
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 5e95a4d9 2022-10-07T00:52:38 Add an EXT_shader_pixel_local_storage impl of PLS Translates ANGLE_shader_pixel_local_storage shaders directly to EXT_shader_pixel_local_storage. Polyfills load/store operations using internal fullscreen draws. Since the ANGLE extension needs the ability to preserve all active PLS planes to textures, we can only support this extension when the backend context also has access to ES 3.1 shader images. Bug: angleproject:7279 Bug: angleproject:7771 Change-Id: Id348bde412efcc081ff29ee05ec59ad652f77569 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3966075 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@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>
Chris Dalton 2d31fe98 2022-09-22T21:04:22 Implement PLS on Apple Silicon Implements a subset of EXT_shader_framebuffer_fetch in the Metal translator that is sufficient to support pixel local storage. Metal's "programmable blending" feature is available on all Apple family GPUs beginning with version 2. Support for non-Apple GPUs will come later via readWrite textures, which can also be coherent by annotating them with [[raster_order_goup(0)]]. Bug: angleproject:7279 Change-Id: Ic74f6c0d21e87eb919e1f487163388d08d126857 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3916794 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Gregg Tavares <gman@chromium.org>
Chris Dalton b5514bb2 2022-09-21T20:47:00 Support pixel local storage on ES 3.0 Now that the application-facing API is implemented, we don't have to rely on ES 3.1 anymore. Expose and test the extension on ES 3.0. Bug: angleproject:7279 Change-Id: I5635620b9088201c20bafd283813092a329225d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3915327 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton a7dc51f2 2022-10-01T08:49:11 Add a framebuffer fetch implementation of PLS The framebuffer fetch implementation works by attaching PLS backing textures to the framebuffer, and then rewriting PLS uniforms as "inout" fragment variables. The compiler's existing machinery takes it from there and makes it work on GL and Vulkan, and soon Metal. EXT_shader_framebuffer_fetch is now the preferred backend for pixel local storage, but we also use EXT_shader_framebuffer_fetch_non_coherent if shader images can't be coherent. This is especially interesting for Vulkan, since noncoherent framebuffer fetch is possible without any extensions. Bug: angleproject:7279 Bug: angleproject:7683 Bug: angleproject:7684 Bug: angleproject:7724 Change-Id: I33f3b2c6df9a5709969d9165c448ea71b096c9e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3900142 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton 8b2aff28 2022-09-12T10:27:28 Implement the ANGLE_shader_pixel_local_storage API Implements the OpenGL ES API for ANGLE_shader_pixel_local_storage and adds thorough validation and testing as outlined in the spec. This feature is still implemented entirely in the frontend, but the extension now works end-to-end with a passing test suite, and can be used externally. Over time we can start gradually moving the implementation into backends as appropriate. Bug: angleproject:7279 Bug: angleproject:7647 Change-Id: I1c861a0fca96423be02e17bbe1fb7f57b99ea63f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3886462 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
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>
Chris Dalton 7822c9df 2022-09-10T14:17:21 Delete FramebufferPixelLocalClearValue{f,i,ui}vANGLE Instead, BeginPixelLocalStorageANGLE just accepts a buffer containing clear values. In WebGL, the clear data can be an array of Numbers. This makes the API smaller, simpler, and less stateful and bug-prone. Bug: angleproject:7279 Change-Id: I8b3fa4ae7f20ba3ad72beb01f275acf50eee803c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3888960 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov 34332f85 2022-09-13T13:54:14 Fix UninstantiatedParameterizedTestSuite errors on iOS. Some test suites are instantiated only on ES31 or Vulkan, which iOS doesn't support. Bug: angleproject:5417 Change-Id: Iea202934edb3804993dabd38f2629d4992eb2095 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3892013 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Chris Dalton d0fad24c 2022-08-30T23:24:06 Add noncoherent PLS tests Coherent pixel local storage is so widely supported now that we have a testing gap on the noncoherent version. This change adds backend features to disable the extensions we use for fragment synchronization and tests that disable them. Bug: angleproject:7279 Change-Id: If71a1a1016922cb9e3b68024dd2616483c700395 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3866163 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton 51de3837 2022-07-28T00:05:54 Enable PLS on D3D Bug: angleproject:7279 Change-Id: Ide498e6ebadc5cd567dc64cd1efed52e777aa32e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3790473 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Chris Dalton 4a636cdd 2022-07-20T22:44:30 Require all PLS formats to consume exactly 4 bytes of storage D3D 11.0 UAVs only support R32_FLOAT, R32_UINT, R32_SINT formats. EXT_shader_pixel_local_storage explicitly states that all PLS variables consume exactly 4 bytes. ESSL images can only have both read and write access if their format is r32f, r32i, r32ui. (We were able to circumvent this via aliasing, but it was a huge source of bugs.) There is a large precedent for only supporting 4 bytes of storage in the capabilities we use for PLS, so this CL removes support for all PLS storage formats that are not 4 bytes. It also implements an "R32" mode for PLS, that does manual packing and unpacking of r32* image formats. If the application wants larger formats, it can always define multiple PLS planes and piece them together. Next up we ought to be able to support rg16* types with more packing/unpacking. With aliasing gone, and with a bit of tweaking, the PLS tests now pass on the Pixel 4 GLES bot. Bug: angleproject:7279 Bug: angleproject:7388 Bug: angleproject:7524 Bug: angleproject:7527 Change-Id: I6b8f62c2428ade6cb5413e33360d734e55dda0eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3782579 Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton fa3d7d5c 2022-08-05T00:57:40 Make PLS coherent on Vulkan Uses the VK_EXT_fragment_shader_interlock extension to make the shader image implementation of PLS coherent on Vulkan. This extension is supported on AMD, Apple, NVIDIA, and Intel. Bug: angleproject:7279 Change-Id: Ic0253eb20932eb6be0b1f433ba454e48b57be2f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3813816 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Chris Dalton 861149c7 2022-08-03T15:43:29 Make PLS coherent on desktop OpenGL Implements ANGLE_shader_pixel_local_storage_coherent using fragment shader synchronization extensions: NV_fragment_shader_interlock INTEL_fragment_shader_ordering ARB_fragment_shader_interlock With these extensions combined, we get coherency all 3 big desktop vendors: NVIDIA, Intel, and AMD. Bug: angleproject:7279 Change-Id: Ie20b251fb772898e89994b799640f1f2806581eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3773990 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Chris Dalton d57ce815 2022-07-16T16:33:08 Use "readwrite" PLS images when possible We actually only need readonly/writeonly aliases on ESSL, non r32f/r32ui. For all other cases, this change updates the compiler to emit a single readwrite image. We also optimize this image with the "restrict" qualifier since PLS specifically disallows aliasing. Removing the aliased load and store also eliminates our issue with an Intel driver bug, and all the PLS tests now pass without any workarounds. Bug: angleproject:7279 Bug: angleproject:7398 Change-Id: I350b239793647da33add96509b8f4b1bbef02245 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3767537 Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton aa7e6751 2022-07-15T23:33:30 Automatically enable early_fragment_tests when PLS is declared When PLS is polyfilled by shader images, we need early_fragment_tests in order to match the same depth/stencil behavior as when it is implemented as framebuffer fetch. Bug: angleproject:7279 Change-Id: I37f5a8682cc96a14ef247d53ed243e4aceb15f39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3767535 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton 77aa34ae 2022-07-16T13:08:00 Add support for PLS as function arguments Bug: angleproject:7279 Change-Id: I89d5c02148cbdbbd02dc4840ffada2c96c2a849b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3767534 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton c460c299 2022-06-21T11:20:45 Implement GLSL additions for ANGLE_shader_pixel_local_storage Specs out, implements, and thoroughly tests the GLSL additions for ANGLE_shader_pixel_local_storage. Adds a simple transformation that rewrites PLS directly into shader images. Updates the existing PLS tests to use the newly built-in PLS features and ensures they continue passing. For now, applications call glBindImageTexture to configure their pixel local storage. The OpenGL ES API side of this extension will follow shortly. Bug: angleproject:7279 Change-Id: I141183069b5cbfcca01cbb77b5b36d3e5f834bf5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3761876 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton 15cc0013 2022-07-14T23:32:05 Add a GL_ANGLE_shader_pixel_local_storage extension Plumbs through "GL_ANGLE_shader_pixel_local_storage" and "GL_ANGLE_shader_pixel_local_storage_coherent" extension strings advertised by ANGLE and stubs out an initial spec document. This change doesn't add any new procedures or shader constructs, but it does allow the PLS tests to start checking for the real extension strings and requiring the GL_ANGLE_shader_pixel_local_storage extension. Bug: angleproject:7279 Change-Id: I36877fe4117185a2121f803288123cd69a447cf3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3739590 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton 86c735bf 2022-07-01T18:27:10 pls: Rename GL_DISABLED_ANGLE -> GL_DISABLE_ANGLE Match the other loadOps by using the imperative form. Bug: angleproject:7279 Change-Id: I9f3a33961f640ea5dff1da7dcea12517cfdcd461 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3741221 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Chris Dalton da984303 2022-05-13T21:05:48 Add a pls test for in-shader coherency Stores and loads in a single shader invocation should be coherent. Bug: angleproject:7279 Change-Id: I1a4af6fdbef21f5506bb40c9eb8f5e76c12dd6cd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3654267 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Chris Dalton 85b05601 2022-06-08T14:05:47 Add a pls test for load-only storage It's conceivable that an implementation may need to be careful to preserve the pls contents when a shader doesn't call pixelLocalStore(). Bug: angleproject:7279 Change-Id: I7b7fb25dced49902fd68685d2f5aa82219ced686 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3696503 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Auto-Submit: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Chris Dalton 4884e9de 2022-05-15T22:57:57 Add a pls test for maximum capacity Check that it works to render with the maximum supported data payload: GL_MAX_LOCAL_STORAGE_PLANES_ANGLE GL_MAX_LOCAL_STORAGE_BYTES_ANGLE GL_MAX_FRAGMENT_OUTPUTS_WITH_LOCAL_STORAGE_ANGLE Bug: angleproject:7279 Change-Id: Ifdaff726edee0378b06ce5562001ad3dfe29284b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3654974 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Chris Dalton <chris@rive.app> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Chris Dalton 2adb6327 2022-05-13T23:09:31 Add a pls test for memoryless storage Bug: angleproject:7279 Change-Id: I4a992d04efa06ac99472d5334a1ac50839a13d06 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3654973 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Auto-Submit: Chris Dalton <chris@rive.app> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Eddie Hatfield 89e38b57 2022-06-22T15:04:08 Refactor to use ANGLETest vs ANGLETestWithParam Bug: angleproject:6747 Change-Id: I72ad52d0268eae0e1a401f12f3e94cc5efa402f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719002 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Chris Dalton 329e1f9e 2022-06-04T02:30:56 Ensure pls results are secure even without barriers We can't guarantee the client will always use local storage barriers correctly, but we CAN guard local storage passes such that the results are only nondeterministic within predictable constraints. This CL adds a test to ensure local storage is still predictable without barriers, and that no data is random or leaked from other contexts. Bug: angleproject:7279 Bug: angleproject:7398 Change-Id: I70da58c8ba79b09f560315df3df956d1721ff6b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3654265 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Chris Dalton d55e0655 2022-06-06T20:24:55 Add pls tests for fragment reject utilities GL utilities for rejecting fragments should also prevent stores to pls. (Namely: discard, return from main, depth/stencil, viewport.) Bug: angleproject:7279 Bug: angleproject:7398 Change-Id: I91aac62fc7eeb703c7bc1ff1bc0c841700fd83d5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3696676 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Chris Dalton <chris@rive.app>
Chris Dalton 7c01db8f 2022-05-14T13:24:47 Add tests for loadOps in pixel local storage Bug: angleproject:7279 Change-Id: If060bae529d9af25cbc3e941d92fe32b2b254f22 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3652702 Auto-Submit: Chris Dalton <chris@rive.app> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Chris Dalton f1c21d68 2022-06-04T02:26:36 Add pixel local storage tests for all supported formats Bug: angleproject:7279 Change-Id: I92728112f243cccf4e4ab2c5f4c096dcc0536fc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3654266 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Chris Dalton a894cb94 2022-05-10T21:15:59 Bootstrap pixel local storage This CL creates a very simple prototype that implements pixel local storage in a thin layer on top of ES 3.1 shader images, and adds a single test. Assuming all goes well on the various devices and backends, the next steps will be: * Write many more tests. * Compiler support, switch to API-specific shader images. * Move the thin layer into ANGLE. * Thorough validation and error handling. * Add an implementation that uses render target attachments (e.g., EXT_shader_framebuffer_fetch). * Incremental, backend-specific optimizations as needed. Bug: angleproject:7279 Change-Id: I7f9f0a1fe2d61f570b4105a7380687038ae45f5d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3645786 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>