src/libANGLE


Log

Author Commit Date CI Message
Mohan Maiya d44244ca 2025-07-03T11:36:37 Vulkan: Simplify default uniform WriteDescriptorDescs ProgramExecutableVk fully encapsulates interaction with DescriptorSetDescBuilder with https:://crrev.com/c/6702410 which allows us to keep WriteDescriptorDescs members private. Remove mDefaultUniformWriteDescriptorDescs and reuse mDefaultUniformAndXfbWriteDescriptorDescs for both emulated and extension based XFB codepaths Bug: angleproject:426412564 Change-Id: Icf76440b6efbda93eb8d48c36591a99ccd1a5750 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6705152 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya ce289330 2025-07-01T19:41:46 Vulkan: Simplify descriptor set management - Descriptor logic is contained in ProgramExecutableVk and doesn't leak into ContextVk - Reduces CPU overhead by not having to constantly copy and resize the DescriptorSetDescBuilder - Simplifies decoupling of descriptor set of uniform buffers from that of other shader resources Bug: angleproject:426412564 Change-Id: Ic0926d0d466ea21f611c2b2c7b844e0bb9027c1b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6702410 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Neil Zhang 8a9fe208 2025-06-20T16:32:11 Vulkan: Fixed rate compression not work as expected on Android On Android C++ compiler do more optimization and results different with Linux, re-write code to correct the issue. Bug: angleproject:352364583 Change-Id: I1863d2d255cd831d4ca9dd866c85e419f410bd9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6687014 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Neil Zhang <Neil.Zhang@arm.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Jisun Lee 18091004 2025-06-19T16:50:58 GLES1: Skip updating vertex attrib array when binding zero texture Previously, when usecases bind the zero texture, the vertex attrib array was disabled. This made the following bound textures lose the vertex attrib data. In this change, updating vertex attrib array in prepareForDraw() is skipped when the application binds zero texture but does not activate the corresponding texture unit. Also GLES1 tests using zero texture are added to make sure vertex attrib array is enabled correctly. Test: angle_end2end_tests --gtest_filter=DrawTextureTest.* Bug: b/426740680 Change-Id: Ic5aad0a60c9d987edcb1d05cdb6b68dd93eac309 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6659335 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Tim Van Patten 2e9de3c7 2025-07-07T16:58:18 ValidateGetTexLevelParameterBase: Support GL_MEMORY_SIZE_ANGLE ANGLE supports the extension GL_ANGLE_memory_size, which adds the new parameter GL_MEMORY_SIZE_ANGLE. However, the parameter value is not supported in ValidateGetTexLevelParameterBase(), so any calls using it always fail with GL_INVALID_ENUM. The parameter is supposed to be tested by MemorySizeTest.BasicUsageTexture/*, but the portion of the test validating GL_MEMORY_SIZE_ANGLE is never executed because it requires an OpenGL ES 3.1+ context, but the test is only instantiated for GLES 2.0 and 3.0. Based on all the above: 1. Add support for GL_MEMORY_SIZE_ANGLE to ValidateGetTexLevelParameterBase(), requiring GLES 2.0+ and the extension memorySizeANGLE is enabled. 2. Instantiate MemorySizeTest to run on GLES 2.0, 3.0, 3.1, and 3.2, so the entire test is run on devices that support GLES 3.1+ contexts. Bug: b/409384875 Test: angle_end2end_tests --gtest_filter=MemorySizeTest.* Change-Id: I70c5721c5da18cb8edbc9a7e18038d5d9fb486da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6710993 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kramer Ge 52005af1 2025-07-02T16:11:30 Define angle_use_gbm=false when !angle_has_build angle_use_gbm is not defined when !angle_has_build. This causes build to fail. Define it to false in this case. Bug: angleproject:425569857 Change-Id: I8ba66f528b3052725467aeafe046900ec06b8989 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6701310 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Kramer Ge <fangzhoug@chromium.org>
Charlie Lao 2269011c 2025-06-30T14:08:11 Remove BitSet::to_ulong and BitSetArray::to_ulong BitSet::to_ulong() is a bit redundant with bits(), and has a risk of losing upper bits on windows platform where unsigned long is 32 bit. This CL removes the usage of it and replaced with bits(). BitSetArray::to_ulong() method only captures up to 64 bits, all other bits are dropped silently which is wrong. This CL fix this and serialize it as a vector of uint64_t. BitSetArray::to_ulong() is removed in this CL. Bug: angleproject:42264163 Change-Id: I663b2cdacc0e930ee616e333131e831ec124a9d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6691283 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Geoff Lang 2f8193ec 2025-06-25T13:17:47 Validate buffers bound for transform feedback are not modified. The ES spec says it is undefined to write to a buffer that is currently being used for transform feedback output but recommends generating an error. Generate INVALID_OPERATION in this case. Bug: chromium:427162086 Change-Id: I727d18c2035509fe2e5d60680eb5198e40a60e33 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6673310 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Charlie Lao 9a05a2b7 2025-06-23T16:24:13 Reland "Vulkan: Avoid some loops in VertexArray::onBufferChanged" This reverts commit 5df85793c602d64d47ef68e29542313be4116bc0. Reason for revert: the regression bug is fixed Some of the functionality related code has been merged into previous CL. This CL now mostly clean up. The old subject/observer code is been deleted from VertexArray. Bug: angleproject:400711938 Original change's description: > Revert "Vulkan: Avoid some loops in VertexArray::onBufferChanged" > > This reverts commit 8d6d127acc1072488e5b57ba4e7e93da2d94bfda. > > Reason for revert: https://issues.chromium.org/427064102 > > Bug: angleproject:400711938 > Original change's description: > > Vulkan: Avoid some loops in VertexArray::onBufferChanged > > > > Before this CL, VertexArray::onBufferChanged() loops over > > bufferBindingMask bits and calls onSubjectStateChange. In this CL, > > VertexArray::onSubjectStateChange is embedded into > > VertexArray::onBufferChanged(). DIRTY_BIT_ELEMENT_ARRAY_BUFFER and > > DIRTY_BIT_ELEMENT_ARRAY_BUFFER_DATA is re-arranged so that we can map > > bufferBindingMask directly to VertexArray::mDirtyBits. This especially > > useful when one buffer is bound to multiple indices in the VertexArray. > > > > This CL also removes angle::ObserverInterface from VertexArray, since it > > no longer observes anything. > > > > ASSERT is added in gl::Buffer::mContentsObservers to ensure it only > > contains BufferTexture, since vertexArray is no longer using the > > subject/observer. > > > > Bug: angleproject:400711938 > > Change-Id: Ie6e7159d7a89f0da5e1b7ca0a9dbe60a1e6c682f > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6569638 > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Commit-Queue: Charlie Lao <cclao@google.com> > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Bug: angleproject:400711938 > Change-Id: I3b8e77db7b3d06b9ed875bfe7787904ac753da11 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6664161 > Commit-Queue: Charlie Lao <cclao@google.com> > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Bug: angleproject:400711938 Change-Id: If7989b26701dcccbb8e49c42d388c0217e2d0b7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6663536 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao 2ac49bb6 2025-07-01T12:11:12 Reland "Vulkan: Move VertexArray::ElementBuffer away from observer" This reverts commit 79ac1a8cd767a32cce6401203e20c4bd4ca4d539. Reason for revert: the regression bug is fixed in PS6 The regression bug with the original CL is caused by when we bind a vertex array without element buffer rebind, we missed to reset mIndexRangeInlineCache. The other bug is that VertexArray::mDiryBits is 64 bit but VertexArrayBufferBindingMask is 16 bit, in VertexArray::setDependentDirtyBits(), bufferBindingMask.to_ulong() << DIRTY_BIT_BUFFER_DATA_0 is only producing the 32 bit value on windows platform due to unsigned long is 32 bit value. bits() is used and bit shift is operated on to uint64_t here to avoid dropping high bits on windows. Two tests are added that reproduce the regression bug caused by the original CL. Bug: angleproject:400711938 Original change's description: > Revert "Vulkan: Move VertexArray::ElementBuffer away from observer" > > This reverts commit 3f012a43ee2c101543785720eedfeaa80708479d. > > Reason for revert: https://issues.chromium.org/427064102 > > Bug: angleproject:400711938 > Original change's description: > > Vulkan: Move VertexArray::ElementBuffer away from observer > > > > Right now, VertexArray's element buffer is always observing buffer's > > change. In previous CLs, we have moved vertex array away from > > subject/observer usage. This CL moves element buffer away from > > subject/observer as well. Since the gl::Buffer tracks buffer's binding > > to each context's current vertex array's binding point, > > kElementArrayBufferIndex is added to VertexArrayBufferBindingMask bits > > so that the element buffer is tracked exactly the same as other vertex > > array buffer bindings. The VerextArray code has been modified to handle > > this special bit, since element buffer has its own binding point > > VertexArrayState::mElementArrayBuffer as opposed to > > VertexArrayState::mVertexBindings. After this CL, VertexArray object > > should be completely off subject/observer usages. > > > > Bug: angleproject:400711938 > > Change-Id: I662ddfabc95034bdc7734939c944ab033f41801c > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6552160 > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Commit-Queue: Charlie Lao <cclao@google.com> > > Bug: angleproject:400711938 > Change-Id: I9487ba8b108baaeda1c8a27189dba64f77616774 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6663539 > Commit-Queue: Charlie Lao <cclao@google.com> > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Bug: angleproject:400711938 Change-Id: I3f47ad1238c41f12b5cbd7a59b84be3fce1e9562 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6664004 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
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>
Mohan Maiya bb3f79dc 2025-06-26T16:59:48 Reorder shader resource dirty bits Process storage and atomic buffer dirty bits before uniform dirty bits. This helps the vulkan backend avoid duplicate work when multiple shader resources are dirty Bug: angleproject:426412564 Change-Id: Ibab3da44ee32d22078df851bfed4967d1c2a605e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6680035 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Zhuang Xu 3c8b492e 2025-06-26T09:39:29 Add histogram for DirectX device removal Bug: dawn:423964507 Change-Id: I22d40ede209797e759f4b4f9e4b86785df33dbe5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6665860 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Avi Drissman d28c6adf 2025-06-19T09:41:26 Modernize for macOS 12 macOS 12 is the minimum OS requirement, so remove the "main port" workaround and do other modernization. Bug: b/40250210 Change-Id: I9638014732f0589fc6171c0fe617b3c563f00c28 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6655558 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexey Knyazev 56e9bfff 2025-06-19T00:00:00 GL: Remove obsolete macOS workarounds Bug: angleproject:427600175 Change-Id: I8bfc062b71f1a34de09cbf76b504293ccd081fe0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6676022 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Kramer Ge dcc715ee 2025-06-19T15:35:53 Enable EGL_PLATFORM_GBM_KHR platform with device selection FunctionsEGL.cpp: - Allow EGL_PLATFORM_GBM_KHR platform and explicit device selection. - Skip getPreferredDisplay if an explicit device is specified. Display.cpp: - Use DisplayEGL impl with EGL_PLATFORM_GBM_KHR. - Wayland can use GBM platform, and OPENGLES. angle.gni: - Rename ozone_platform_gbm to ozone_platform_drm since its deprecated. Bug: angleproject:425569857, b/396434686 Change-Id: I9493118f9dc95f78ebe46277bb4fcfeb7a29d465 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6663699 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kramer Ge <fangzhoug@chromium.org>
Igor Nazarov d5babf99 2025-06-23T12:46:51 Vulkan: Fix unhandled deferred clears after glGetMultisamplefv Issue was introduced in the commit that implemented deferred clears. The `glGetMultisamplefv()` synchronizes draw framebuffer which defers possibly staged clears. Since API is not handling deferred clears they are left untouched, causing the ASSERT. This change fixes the issue by not deferring clears for the `glGetMultisamplefv()` command during flushing staged updates of dirty framebuffer attachments. Changes: - Add `gl::Command::GetMultisample` enumeration for clarity. - Add `gl::CommandBlitBuffer::CommandBlitBufferDepthStencil` enumeration to improve code readability. - Add `command` parameter into `gl::State::syncDirtyObject()` method to use actual command enum instead of `Other`. - Remove `previousDeferredClears` local variable and update ASSERT in the `FramebufferVk::syncState()` method. New assert ensures empty `mDeferredClears` instead of just checking dirty attachments, since it is easy to make all attachments dirty making old and new assertions act the same. - Replace logic in `FramebufferVk::syncState()` that decides whether need to defer attachments or not with switch-case. This makes the logic more clear regarding handling individual commands and simplify updating this handling in the future. Except of the bug fix with `GetMultisample` command, handling of other command is uncached. - Remove `flushDeferredClears()` from `FramebufferVk::readPixels()` because `mDeferredClears` are not expected (now it's more clear after the refactoring). And even if there are `mDeferredClears` (in case of a bug or after API failure), `flushDeferredClears()` only flushes clears for the draw framebuffer, while checking `mDeferredClears` of the read framebuffer. This is a problem in case if read and draw framebuffers are not the same. Bug: angleproject:40644727 Test: angle_end2end_tests --gtest_filter=TextureMultisampleTest.GetMultisamplefvAfterClear/* Test: angle_end2end_tests --gtest_filter=EGLSurfaceTest.GetMultisamplefvAfterClear/* Change-Id: I376a62de52de5e17dbc63cc7ddb0506741a69266 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6661958 Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya b3ec3a5f 2025-06-23T14:51:13 Track active uniform and storage buffer blocks Track active uniform and storage buffer block indices so we can process updates to only active buffer blocks Bug: angleproject:426412564 Change-Id: I54fa6fbe795073887646d672303d231ed4317b65 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6663825 Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Alexey Knyazev beae1b4a 2025-06-19T00:00:00 Metal: Remove obsolete workarounds Removed Intel-specific Metal workarounds that are not used on macOS 12 and later. Removed a redundant version check. Bug: angleproject:427600175 Change-Id: I34c7e53108f7e030512c9436ab2b9ae38ad17946 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6672312 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Charlie Lao 79ac1a8c 2025-06-23T11:11:10 Revert "Vulkan: Move VertexArray::ElementBuffer away from observer" This reverts commit 3f012a43ee2c101543785720eedfeaa80708479d. Reason for revert: https://issues.chromium.org/427064102 Bug: angleproject:400711938 Original change's description: > Vulkan: Move VertexArray::ElementBuffer away from observer > > Right now, VertexArray's element buffer is always observing buffer's > change. In previous CLs, we have moved vertex array away from > subject/observer usage. This CL moves element buffer away from > subject/observer as well. Since the gl::Buffer tracks buffer's binding > to each context's current vertex array's binding point, > kElementArrayBufferIndex is added to VertexArrayBufferBindingMask bits > so that the element buffer is tracked exactly the same as other vertex > array buffer bindings. The VerextArray code has been modified to handle > this special bit, since element buffer has its own binding point > VertexArrayState::mElementArrayBuffer as opposed to > VertexArrayState::mVertexBindings. After this CL, VertexArray object > should be completely off subject/observer usages. > > Bug: angleproject:400711938 > Change-Id: I662ddfabc95034bdc7734939c944ab033f41801c > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6552160 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Charlie Lao <cclao@google.com> Bug: angleproject:400711938 Change-Id: I9487ba8b108baaeda1c8a27189dba64f77616774 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6663539 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Charlie Lao 5df85793 2025-06-23T11:08:49 Revert "Vulkan: Avoid some loops in VertexArray::onBufferChanged" This reverts commit 8d6d127acc1072488e5b57ba4e7e93da2d94bfda. Reason for revert: https://issues.chromium.org/427064102 Bug: angleproject:400711938 Original change's description: > Vulkan: Avoid some loops in VertexArray::onBufferChanged > > Before this CL, VertexArray::onBufferChanged() loops over > bufferBindingMask bits and calls onSubjectStateChange. In this CL, > VertexArray::onSubjectStateChange is embedded into > VertexArray::onBufferChanged(). DIRTY_BIT_ELEMENT_ARRAY_BUFFER and > DIRTY_BIT_ELEMENT_ARRAY_BUFFER_DATA is re-arranged so that we can map > bufferBindingMask directly to VertexArray::mDirtyBits. This especially > useful when one buffer is bound to multiple indices in the VertexArray. > > This CL also removes angle::ObserverInterface from VertexArray, since it > no longer observes anything. > > ASSERT is added in gl::Buffer::mContentsObservers to ensure it only > contains BufferTexture, since vertexArray is no longer using the > subject/observer. > > Bug: angleproject:400711938 > Change-Id: Ie6e7159d7a89f0da5e1b7ca0a9dbe60a1e6c682f > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6569638 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Charlie Lao <cclao@google.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:400711938 Change-Id: I3b8e77db7b3d06b9ed875bfe7787904ac753da11 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6664161 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Mohan Maiya 2fd033d0 2025-05-22T04:21:11 Vulkan: Optimize updates to uniform buffers ... when only the offset is modified. Most of the work done when handling dirty uniforms can be skipped since the buffer bindings haven't changed Bug: angleproject:386749841 Tests: UniformBufferTest31.UniformBufferBindingRangeChange*Vulkan Change-Id: Ic811bd71f0f2993f88ce9bcf93f9e8e46dfc6d99 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6581359 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Yuxin Hu 5220e634 2025-06-16T11:14:22 Fix glCopyImageSubData validation check part 2 For compressed texture, we also need to check if the copy subregion starting points (offset) are aligned with the compressed block. This change also moves *FillsEntireMip check to the ValidateCompressedRegion() function, as it is easier to do a per-dimension check. Bug: b/419048313 Bug: angleproject:42264179 Bug: angleproject:42265887 Change-Id: I0f415e575bbc77bdf5178e2b5fc1260c43e7de4b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6648198 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Amirali Abdolrashidi 6bb47e67 2025-06-17T13:42:47 Vulkan: Limit finalizing foreign image layouts Currently, any submission results in finalizing all foreign images. However, if the submission is only limited to the outside render pass command buffer, this would result in oldLayout VVL errors (01197), as it would be too early to finalize the layout of such images at those times. At this time, this type of submission can occur if the size of buffer-to-image updates exceeds the following threshold: kMaxBufferToImageCopySize In this change, finalizing the foreign image layouts would only occur when all commands are being submitted. * In ContextVk::submitCommands(), finalizeAllForeignImages() is now called only when the submission type is Submit::AllCommands. * Added new submit tests for foreign images to ImageTest: * UploadForeignUntilSubmitDoesNotBreakRenderPass * CopyToForeignUntilSubmitDoesNotBreakRenderPass Bug: b/425987310 Change-Id: Ia345e176be79017ba18ef52a57256eeeb298e39a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6653602 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Geoff Lang 5d124404 2025-06-17T17:04:12 WebGPU: Fix bind groups leaking in CommandBuffer. Wrap all per-submission member variables in a struct so that we can reset everything at once using the default constructor. This avoids similar leaks in the future. Bug: chromium:413078308 Change-Id: I3f926c82905b73b27d6b751cfe2878a41ced916a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6652290 Reviewed-by: Matthew Denton <mpdenton@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Kai Ninomiya 41144603 2025-06-06T10:56:03 WebGPU: Handle Dawn breaking change in CreateInstance Needed in order to update Dawn to match the standard webgpu.h, here: https://dawn-review.googlesource.com/c/dawn/+/245242 Bug: chromium:414868137 Change-Id: I2bdf5bd5747a8da8ed0612a99d70eee8a3d09ecb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6652516 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Auto-Submit: Kai Ninomiya <kainino@chromium.org>
Charlie Lao 59281334 2025-05-22T17:13:22 Vulkan: Reduce kMaxEmptySlots for SharedDescriptorSetCacheKey There is report that addKey is still showing up in simpleperf. This CL breaks addKeyImpl into three functions so that SharedFramebufferCacheKey will still have the same behavior. SharedDescriptorSetCacheKey is changed to track 64 cache key at maximum, and updateEmptySlotBits() is never called in SharedDescriptorSetCacheKey. This means the shared cache key tracking is further limited to usage case where a buffer/texture is only involved in less than 64 descriptorSets. Otherwise we will not track the remaining DescriptorSets, which means if this buffer is released, the corresponding descriptorSet will not immediately destroyed, and we will rely on cache eviction code to take care of DS growing problem. Bug: b/384839847 Change-Id: I99abd17966446377babace6d06cc8f380a71c084 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6581492 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Geoff Lang dea162cc 2025-06-09T15:43:05 WebGPU: Finalize command blocks when starting a new one The command buffer abstraction would not finalize blocks of commands when creating a new block, leading to possible infinite loops when processing the commands. Bug: chromium:413078308 Change-Id: Idf4e95a5ccc71f3ddc9a4202e5e000c0e2cd5f87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6629473 Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Mohan Maiya 9d70781f 2025-06-17T07:06:37 Vulkan: Bugfix in TextureVk::initImage(...) Account for compute based mipmap generation during initImage Bug: angleproject:405840226 Tests: ImageTestES3.SourceAHBTargetTexture2DGenerateMipmap* Change-Id: Ic2f6c4576ec8ff464a5d60c4a49aeb87be3a5785 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6650712 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Amirali Abdolrashidi 9e000857 2025-02-04T16:12:47 Vulkan: Utilize VkBufferUsageFlags2 for bufferview * Added the following struct to bufferview createInfo in case of VK_KHR_maintenance5 support: VkBufferUsageFlags2CreateInfoKHR * Limited VVL 08779 to platforms without KHR_maintenance5 support. Bug: angleproject:394353300 Change-Id: I46beac693cda3216afc497c8ed74cbf51b72e549 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6231512 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Matthew Denton 243ebfa7 2025-06-16T16:07:06 WebGPU: Allow glReadPixels from non-base mip levels. Before, the WebGPU backend always read from the base level of the texture attached to the current framebuffer. Bug: angleproject:42267090 Change-Id: Ibe5b8575f6fa90c1942ba566485b6175ee10f808 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6634558 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Matthew Denton <mpdenton@chromium.org>
Aurora Zhang dfefcbc6 2025-06-09T16:30:55 glGetProgramiv should return the properties in effect glProgramParameteri can set values to GL_PROGRAM_BINARY_RETRIEVABLE_HINT. However, this setting will not be in effect until the next time glLinkProgram or glProgramBinary has been called successfully. Also, glGetProgramiv returns the properties currently in effect for program. Therefore, we need to add a variable to record the ineffective value and copy it at the stage of glLinkProgram or glProgramBinary. Bug: angleproject:421219220 Change-Id: Ib564e6df03d34f3fc7389f926795cb3e64cbf687 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6606372 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Aurora Zhang <Aurora.Zhang@arm.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen 94ee620d 2025-05-22T10:07:05 Metal: Allow optimization of simple loops Reimplement the feature to avoid undefined behavior of infinite loops. Add EnsureLoopForwardProgress rewrite pass that inserts a volatile variable access to all loops that it cannot analyze as being finite. Detect loops of form `for (; i <op> x; ++i)` as being finite. The <op> can be any of <,<=,>,>=,==, != operator. The i can be int or uint. The ++i can be -- or ++, -=1, +=1. This assumes that backends using the feature emit signed int arithmetic with defined wraparound semantics. Uses volatile write instead of asm("") due to asm not forcing the behavior in some compiler versions. The volatile variable access is defined in C++ as forward progress, and by inheritance this works in MSL. Later commits may remove injectAsmStatementIntoLoopBodies if ensureLoopForwardProgress is appropriate for all use-cases. Bug: angleproject:418918522 Change-Id: Ic9c29f57044b792195386483208632354d24c854 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6575051 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Yuxin Hu 79ec8b34 2025-06-12T14:32:42 Fix glCopyImageSubData validation check When checking if the copy subregion meets the compressed texture alignment requirements, we should consider if the copy subregion covers the entire width and height of texture level. It is not required to make texture size aligned with compressed texture block size when creating the texture image (e.g. width and height do not have to be multiple of 6 when calling glTexStorage2D for GL_COMPRESSED_RGBA_ASTC_6X6 textures). If the copy subregion width and height equals to the width and height of the texture level, even if they are not aligned with the compressed texture block size, the copy is allowed. This is currently covered by fillsEntireMip check. However, fillsEntireMip enforces copy subregion width, height, and depth all equal to the texture level width, height, and depth, where we should not check depth because we don't enforce depth alignment for compressed texture. For example, for a 2D texture array that has dimension of 32*16*2 in current level, a copy region with width=32, heigh=16, depth=1 should be considered as fillsEntireMip. In the spec, it says: "The source and destination subregions must be contained entirely within the specified level of the corresponding image objects". Right now we only check if width and height are within the image bounds, this change adds a check to make sure depth is also within the image bounds. Bug: b/419048313 Change-Id: I6e5339cfdfd5785f935a059638c22c9646c12162 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6634232 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shufen Ma c53c908c 2025-06-11T15:36:48 Refine GetProgramiv validation An INVALID_OPERATION error is generated if TESS_CONTROL_OUTPUT_- VERTICES is queried for a program which has not been linked successfully, or which does not contain objects to form a tessellation control shader. An INVALID_OPERATION error is generated if TESS_GEN_MODE, TESS_GEN_SPACING, TESS_GEN_VERTEX_ORDER, or TESS_GEN_POINT_MODE are queried for a program which has not been linked successfully, or which does not contain objects to form a tessellation evaluation shader. Bug: angleproject:424050946 Change-Id: I9d6110d2783efb21efbcb62d9da7b35590c89f61 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6637010 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Shufen Ma <Shufen.Ma@arm.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov 10b7414f 2025-06-12T17:03:51 Vulkan: Do not skip VUID-vkQueueSubmit-pSignalSemaphores-00067 ... when "VK_EXT_swapchain_maintenance1" is disabled. Problem only happened in shared present mode and is now fixed by VVL: 69b41e6fbe16619526daa861444cbb3eb8fcedce layers: Do not report in-use error for shared present mode Bug: angleproject:408190758 Change-Id: I4453de01ee239a0cb4cfd0269adfcb283a00866b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6641915 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Matthew Denton 005336e4 2025-06-11T17:17:16 WGPU: Basic texture cubes Allows uploading to texture cube faces and sampling from them in shaders using samplerCube. Bug: angleproject:420782526 Change-Id: I45d4370fcc418f39afb225114d13632a78c7c200 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6593999 Reviewed-by: Liza Burakova <liza@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Yuxin Hu 5d63c8d5 2025-06-11T13:01:25 Reformat VVL error message Update the VVL error message to use the new format. Remove the unused VVL error. Bug: angleproject:42264926 Bug: angleproject:42263911 Bug: angleproject:42265079 Bug: angleproject:42264496 Change-Id: I151960942c1bbf346693f250ec57f01fa3432784 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6634225 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Jisun Lee d8c15499 2025-05-27T03:46:24 Vulkan: Clear depth and stencil unresolve separately To take into account two situations. 1. LoadOp for depth and stencil attachments are set differently. 2. depth and stencil unresolves could be different between the previous render pass and the current render pass. Bug: angleproject:42266019 Change-Id: I9e069b3972f86abb84eee6280919e6bba2901225 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6590197 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shashank Sharma c6b3440b 2025-06-06T23:34:33 Vulkan: Add G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 support. Add support for YCBCR_P010 format. Bug: b/408996471 Change-Id: I899533b604e5b2fd0ad1fb1e940dd1f119179794 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6628658 Reviewed-by: Solti Ho <solti@google.com> Auto-Submit: Shashank Sharma <shawshanks@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Amirali Abdolrashidi c39f4a5c 2025-06-05T15:35:06 Vulkan: Update border color assignment for stencil In texture border clamp, if the border color is assigned together stencil mode (both using glTexParameter()), its red component is used to set up a border color to be used in each backend: * (Set up in AdjustBorderColor()) In the Vulkan backend, this is used when updating SamplerDesc, which is then used later to set up the custom border color: * (VkSamplerCustomBorderColorCreateInfoEXT) According to the spec, in case of undefined format, integer border color, and stencil image, the implementation is required to use either the first or the second component of the custom color, although it is recommended to use the first. However, at the moment, only the first component is being populated, while using the second component is also valid. * Added feature: usesSecondComponentForStencilBorderColor * Added bit to SamplerDesc: mUsesSecondComponentForStencil * It is set based on the feature flag above and the texture format. * When setting the custom border color info, the second component will be used based on the above flag. * Added test suites to test this on ES31 and ES32: TextureBorderClampTestES3*.CustomBorderColorWithStencil* * Updated capture params for glTexParameterIuivEXT(). * Suppressed the ES32 version for the following: * P4 * Linux/NVIDIA (due to out-of-date driver) Bug: b/390710636 Change-Id: Ie50c19e8ea66da40dc8b8db49d7e622a582637a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6626416 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Aurora Zhang 65159c4e 2025-06-05T15:05:46 Update pipeline desc when sample count changes * If the sample count changes when calling glFramebufferTexture2DMultisampleEXT, we need to update pipeline desc to ensure it is the same as the API requires. * Add a new end2end test to verify. Bug: angleproject:422611722 Change-Id: I7de7d3d17513cf03f5e24baa2db83633a229b4b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6623419 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Aurora Zhang <Aurora.Zhang@arm.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya c45e7c83 2025-05-22T04:14:52 Vulkan: Optimize uniform and storage buffer updates Maintain a map between buffer block index and its DescriptorDesc index in WriteDescriptorDescs and look up the map instead of repeatedly calculating it when updating DescriptorDesc Bug: angleproject:386749841 Change-Id: I74d14f6205f07992fae1e338697998d04de1c563 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6603986 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Jeff Vigil a7877665 2025-06-02T08:13:30 Fix drm format and modifier handling Move functions to private Change case on methods to lowercase per style guide Change related methods to use set instead of vector, this saves a copy from set to vector. Initialize formats before supportsDmaBufFormat because queryDmaBufModifiers can be called before queryDmaBufFormats and need to initialize at supportsDmaBufFormats. Bug: angleproject:412730346 Change-Id: I8575bee6e7a6a09d9065ed81acff899e73004764 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6610088 Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.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>
Mavis Deng 65091427 2025-06-05T14:08:01 Query draw buffer should return NONE for no surface default FB When querying the draw buffer state via glGetIntegerv(GL_DRAW_BUFFER) on the default framebuffer with no surface bound, GL_NONE should be returned. Bug: angleproject:422631118 Change-Id: Iad2f1662692b0a92563e4cfd7fe09437cb40f0c7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6619453 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Mavis Deng <mavis.deng@arm.com> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya db962407 2025-06-03T08:00:43 Vulkan: Optimize FramebufferVk::getSamples() Cache value of samples during syncState(...) and return this value on subsequent queries Bug: angleproject:386749841 Change-Id: I21fb2221187c7b2159fed1b271da642ba2552348 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6619019 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Alexey Knyazev f6b40bc8 2025-05-15T00:00:00 Add a missing compile macro Bug: angleproject:406922380 Change-Id: If2d4cc1472b490b3507591f0a6ac940369df5ccb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6624377 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8c48b502 2025-06-05T02:09:54 Vulkan: Fix deferred clear vs robust init vs invalidate The DIRTY_OBJECT_DRAW_ATTACHMENTS bit, when handled, goes over framebuffer attachments and requests that they be cleared. This is done only with robust init. The DIRTY_OBJECT_DRAW_FRAMEBUFFER bit, when handled, results in staged updates to be applied to the attachments. When syncDirtyObjects is called, the above bits are handled. If we end up in a situation where DIRTY_OBJECT_DRAW_ATTACHMENTS is set, but not DIRTY_OBJECT_DRAW_FRAMEBUFFER, the following happens with Vulkan: - Handle DIRTY_OBJECT_DRAW_ATTACHMENTS - TextureVk::initializeContents - ImageHelper::stageResourceClearWithFormat - Observer message to TextureVk->Texture->Framebuffer->Context - Context sets DIRTY_OBJECT_DRAW_FRAMEBUFFER - However syncDirtyObjects does not notice this bit, as it has cached the dirty objects and is in the middle of looping over them In the above scenario, the call that results in syncDirtyObjects does not process the draw framebuffer (if not already dirty for some other reason), meaning the clear is not applied _before_ the current operation but after it (whenever framebuffer is synced next). In this change, I attempted to ensure that if DIRTY_OBJECT_DRAW_ATTACHMENTS is ever dirty, DIRTY_OBJECT_DRAW_FRAMEBUFFER is also dirty. There were a few operations that could theoretically lead to this which are fixed by this change. The particular one that revealed the bug was State::syncDirtyObject syncing only the FRAMEBUFFER bit and leaving the ATTACHMENTS bit for the unsuspecting following operation. The aforementioned assertion is not included in this change however, as it revealed one unresolved issue with the d3d backend where DIRTY_OBJECT_DRAW_ATTACHMENTS is not set, but processing DIRTY_OBJECT_DRAW_ATTACHMENTS sets it while dirty bits are being processed. Bug: b/381284577 Change-Id: If3c35fbade069ae75f66dd6d4df5d73882a08a93 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6621059 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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>
Mohan Maiya ef31b3ed 2025-06-04T12:00:04 Vulkan: Selectively dirty DIRTY_BIT_SAMPLE_SHADING When program executable changes dirty DIRTY_BIT_SAMPLE_SHADING bit if either the current or previous program enabled per sample shading Bug: angleproject:386749841 Change-Id: I82aa7df29473e455aa68dfba9fefdb1bc712a78d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6622156 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jiaqi Li 88ea74bf 2025-05-30T14:17:09 Add another condition to call copyBufferDataToImage directly To directly copy from a buffer, it's necessary that the buffer does not need conversion. Add this condition to the check function. Add related end2end test. Bug: angleproject:421288695 Change-Id: Id57df32f91a8f385bc07b2788149cc4478ccbab4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6605140 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Jiaqi Li <Jiaqi.Li@arm.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Xiang Wang e877e655 2025-06-02T17:02:36 Reland "Suppress VUID-VkRenderPassBeginInfo-renderPass-00904" This reverts commit 8c75960e034a09bad67ece528c99e202bed69b64. Reason for revert: retry dry-run without revert Bug: b/303441816 Original change's description: > Revert "Suppress VUID-VkRenderPassBeginInfo-renderPass-00904" > > This reverts commit f8f9847771fa86589da29527c806d89e6f92c7a9. > As the issue is no longer reproducible on a P25 device with > latest ANGLE. > > Bug: b/303441816 > Change-Id: Iae86b3f4e30609cd5b1aedb4293192b06be71919 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6614157 > Commit-Queue: Xiang Wang <xwxw@google.com> > Reviewed-by: Yuxin Hu <yuxinhu@google.com> > Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Bug: b/303441816 Change-Id: Ib447a5af33bd17f891a8db99766fc8f275162a6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6614164 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Xiang Wang <xwxw@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Xiang Wang 8c75960e 2025-05-30T16:06:54 Revert "Suppress VUID-VkRenderPassBeginInfo-renderPass-00904" This reverts commit f8f9847771fa86589da29527c806d89e6f92c7a9. As the issue is no longer reproducible on a P25 device with latest ANGLE. Bug: b/303441816 Change-Id: Iae86b3f4e30609cd5b1aedb4293192b06be71919 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6614157 Commit-Queue: Xiang Wang <xwxw@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Serdar Kocdemir b1359277 2025-05-14T22:53:36 Declare lavapipe device type Fixes 'Unknown GPU architecture' warning when using lavapipe driver with guest side ANGLE enabled on the emulators. Also treats lavapipe similar to swiftshader for test coverage purposes. Bug: b/417791087 Test: run goldfish emulator with '-gpu lavapipe' Change-Id: I40002ce191aa49f08d887c066321c4d0c27f2738 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6547537 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Yuxin Hu f000acf8 2025-05-28T12:37:20 Vulkan: Remove suppressed VVL errors that no longer applies on bots All the devices on bots support VK_ATTACHMENT_STORE_OP_NONE. To pass the bot, we no longer need to suppress the VVL errors that only occur on devices where VK_ATTACHMENT_STORE_OP_NONE is not supported. Remove the error messages from the suppression list. Bug: angleproject:42264496 Bug: angleproject:42265159 Change-Id: I47bfcb6cff77ae68b1755e8e0105411f31f713e0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6598217 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Tingwei Guo ef29d42e 2025-05-22T15:52:49 Support ASTC decode mode extensions in ANGLE Added support for GL_EXT_texture_compression_astc_decode_mode and GL_EXT_texture_compression_astc_decode_mode_rgb9e5 in ANGLE. Also added corresponding end-to-end tests for ASTC decode mode queries, including ASTC decode mode queries and rendering with ASTC texture formats with different decode modes on GL_TEXTURE_2D works. Bug: angleproject:419403188 Change-Id: I0f2dced8468c4e25597740d1de346b2f699bb81e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6575285 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com>
Mohan Maiya 58f21f8f 2025-05-29T07:53:02 Vulkan: Optimize ProgramExecutableVk::bindDescriptor(...) Cache valid descriptor set indices in a bitset, this helps eliminate branches within loops and makes for more readable code Bug: angleproject:386749841 Change-Id: I06fbf529ceb6c8ece9313b3b5e9edd6c6b63542b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6601733 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Charlie Lao <cclao@google.com>
Geoff Lang 433906d7 2025-05-29T16:22:18 WebGPU: Protect against null compilation info. compilationInfo is an optional parameter of this callback. Bug: chromium:413078308 Change-Id: I12770c566b3daad5eaf8d6c8b66e464a85da06f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6596988 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Kai Ninomiya 7ddc219f 2025-05-28T22:25:37 WebGPU: Handle Dawn breaking change in QueueWorkDoneCallback Needed in order to update Dawn to match the standard webgpu.h, here: https://dawn-review.googlesource.com/c/dawn/+/243697 Bug: chromium:414868699 Change-Id: Ib52c0e32b685ef3f9f05fe1fe549ab16e8eec610 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6600550 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Kai Ninomiya <kainino@chromium.org>
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 7855312a 2025-05-15T00:00:00 Adjust multi draw validation * Fixed validation of negative drawcount for all MultiDraw*ANGLE entry points. * Added missing extension checks to MultiDraw*BaseInstanceANGLE entry points. Fixed: angleproject:420956723 Change-Id: I3a058471446cd96a883970d4e38ba5af2fa07a8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6597176 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@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 392dc591 2025-05-15T00:00:00 Remove GL_CHROMIUM_sync_query Fixed: angleproject:420627279 Change-Id: I26dac7c55a7cf6b04121658144e1387be65d2569 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6593552 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Robic Sun 88f1a668 2025-05-20T10:35:36 Query sample count by getting image format props ANGLE should query the image format properties to set TextureCaps.sampleCounts based on internalformats. Bug: angleproject:418815176 Change-Id: I7718121008acd9bb9bbb9964af5842646d7a689a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6564528 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com> Auto-Submit: Robic Sun <Robic.Sun@arm.com> Reviewed-by: Charlie Lao <cclao@google.com>
Mohan Maiya 90668ecf 2025-05-25T10:51:52 Vulkan: Reset uniform buffer dirty bit on program change When a program changes all of its non-texture shader resources are invalidated, there is no need to re-invalidate uniform buffers. Bug: angleproject:386749841 Change-Id: I7e941784c40046cef3a2ce297e6941a963b3a8dc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6583476 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Yuxin Hu eafcbbf9 2025-05-27T11:24:17 Vulkan: Reformat VVL error message Remove the VVL skip messages that no longer apply. Set the messageContents1 and messageContents2 to nullptr for ease of clean up later. Bug: angleproject:399191283 Change-Id: I6d4477a6c401e6b7d2915b1fc574413be31fdc9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6594251 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Yuxin Hu <yuxinhu@google.com>
Yuxin Hu 6542fea9 2025-05-07T17:28:45 Vulkan: Fix SpirV Error in Tessellation Control Shader When feature varyingsRequireMatchingPrecisionInSpirv is enabled, in the generated SpirV, if the shader output varying precision needs to be adjusted, we create a new shader varying to replace the original shader output varying, and save the original shader output varying to the replacement shader output varying at the end of the function. However, this does not work for tessellation control shader, because the SpirV generated will perform following equivalent peudo code: layout (vertices=3) out; in mediump float tc_in[]; out mediump float tc_out[]; highp float original_out[]; void main() { original_out[gl_InvocationID] = tc_in[gl_InvocationID]; // some other code in between tc_out = original_out; } The last line will attempt to write to all indice of tc_out. However, according to the spec, "each tessellation control shader invocation may write only to those outputs corresponding to its output patch vertex. Tessellation control shader must use the special variable gl_InvocationID as the vertex number index when writing to per-vertex output variables." This change fixes the problem by keeping the precision of tessellation control shader output as it is, and adjust the precision of tessellation evaluation shader input instead. Bug: b/42266751 Change-Id: I398545e2cbbf703c716d6738f1ba278baac4171f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6521225 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Kimmo Kinnunen 27a1b2c9 2025-03-13T09:10:54 Metal: Fix crash with 3d tex, alpha, depth Fix a crash when generating mipmaps for a 3d texture that has mipmaps with w,h == 1, i.e. depth > max(2*w, 2*h). Bug: angleproject:419755713 Change-Id: I7bf7f1f71c03b2bf6f8a30df30dc77ad06d433fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6580167 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Geoff Lang dac0ef51 2025-05-27T18:36:56 WebGPU: Add a feature to avoid wgpuInstanceWaitAny Synchronous waiting is not available in Chrome's renderer process yet. Add a temporary feature to avoid some WaitAny calls and just log errors instead. Bug: angleproject:413078308 Change-Id: I67e54dfcfc093fd250da8cc616c05d44b78c8d64 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6593531 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Mavis Deng 2a18fdbf 2025-05-21T16:14:51 Fix sync issue between XFB output and UBO input For the following scenario, where the first draw writes to the transform feedback buffer and the second draw reads from the same buffer as UBO, it is necessary to end the render pass between the two draws and add a barrier. // xfb write glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb); glBeginTransformFeedback(); glDrawArrays(); glEndTransformFeedback(); // Draw with same buffer as UBO glBindBuffer(GL_UNIFORM_BUFFER, xfb); glDraw(); Bug: angleproject:418568423 Change-Id: Ia294d174111c6104b55762590ec26056ee759b53 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6572198 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 7470cae4 2025-05-15T00:00:00 GL: Do not emulate EXT_base_instance If a driver does not support the corresponding commands, do not expose the extension at all, regardless of the enabled features. Bug: angleproject:355645824 Change-Id: Ideaae32e401c169690ca3aca6e437443a4b038f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6580170 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f0c46b2a 2025-05-25T10:44:23 WebGPU: Do not set autoresizingMask on the iOS Metal Layer autoresizingMask is not a member on iOS builds. This mirrors the window surface in the Metal backend. Bug: angleproject:342213844 Change-Id: I8b5cfbb2b7f7af4f3284ddd7055e68e762c77883 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6584993 Reviewed-by: Colin Blundell <blundell@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4b375fe5 2025-05-23T18:44:54 WebGPU: Fix NoOpErrorScope constructor. We would always build with asserts enabled on our bots and missed that this constructor did not match the ErrorScope constructor. Bug: angleproject:342213844 Change-Id: Ieb73e6e1b0a0359b0ad336f14b7b9580c2ecc00b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6580169 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 61e383dc 2025-05-23T18:41:57 WebGPU: Fix build on iOS and ChromeOS. Make sure we return a NativeWindowSystem in all branches. Build the Metal window surface on iOS. Bug: chromium:419793882 Change-Id: Ic829c83b71c18df9907ef729320377d82958f6ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6580168 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 275745ff 2025-05-23T12:59:03 Vulkan: Fix warning about shared present mode support An incorrect warning was issued about shared present mode being requested without support for it, even if shared present mode was _not_ being requested. Bug: b/412446258 Change-Id: I33f4ea9bcbd09695375010da93a68b375cfc8c8e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6578819 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuxin Hu 525757d6 2025-05-22T16:32:32 Vulkan: Reformat VVL Error Message Change the error message to use the extraProperties field. Set the messageContents1 and messageContents2 to nullptr for ease of clean up later. Bug: angleproject:394598470 Change-Id: I0b7aec0b7e9a6e5206c89caae712e76db3338c4e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6581371 Auto-Submit: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Kimmo Kinnunen 150f1242 2025-03-11T18:34:37 Metal: Provoking vertex conv. reads out of buffer The provoking vertex helper would encode the addresses of index count and primitive count variables, not their values. This would cause the provoking vertex conversion shader to read overly many indices. Not testable easily from the API, as the excessive read is hard to test. Would cause context loss on the existing tests when run with validation. Bug: angleproject:419755715 Change-Id: Id81ecc66513c0eac1e95d11937f12d9bebb5e11e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6578202 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Roberto Rodriguez 571450df 2025-05-15T16:24:12 Depth value not clamped for clearBufferfi and clearBufferfv Clamp depth values to [0,1] for calls to glClearBufferfi and glClearBufferfv. Bug: angleproject:418030862 Change-Id: I6f5393da863a17c5fd1d78f1b800df0e61d3dc60 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6552161 Reviewed-by: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang c1e806de 2025-05-22T15:59:01 WebGPU: Allow providing an external WGPUDevice. Update EGL_ANGLE_platform_angle_webgpu with a new parameter which allows initializing DisplayWgpu with a pre-existing WGPUDevice. The adapter and instance are queried from this device. Bug: angleproject:42266898, angleproject:414827222 Change-Id: I3159ebe19750e75c5cf9aa395332f48385fdb4d9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6578196 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 3cf7a604 2025-05-17T19:39:08 WebGPU: Add extensions for importing external textures Add EGL_ANGLE_device_webgpu which exposes the adapter and device used by ANGLE internally. Add EGL_ANGLE_webgpu_texture_client_buffer which allows importing external WGPUTexture handles if they share the same device as ANGLE (queried from EGL_ANGLE_device_webgpu). Bug: angleproject:418022112 Change-Id: I0683d36b84a0f8e0e9b68a5ec0d3aa8b7a95152c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6553063 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Charlie Lao 8d6d127a 2025-05-20T12:26:56 Vulkan: Avoid some loops in VertexArray::onBufferChanged Before this CL, VertexArray::onBufferChanged() loops over bufferBindingMask bits and calls onSubjectStateChange. In this CL, VertexArray::onSubjectStateChange is embedded into VertexArray::onBufferChanged(). DIRTY_BIT_ELEMENT_ARRAY_BUFFER and DIRTY_BIT_ELEMENT_ARRAY_BUFFER_DATA is re-arranged so that we can map bufferBindingMask directly to VertexArray::mDirtyBits. This especially useful when one buffer is bound to multiple indices in the VertexArray. This CL also removes angle::ObserverInterface from VertexArray, since it no longer observes anything. ASSERT is added in gl::Buffer::mContentsObservers to ensure it only contains BufferTexture, since vertexArray is no longer using the subject/observer. Bug: angleproject:400711938 Change-Id: Ie6e7159d7a89f0da5e1b7ca0a9dbe60a1e6c682f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6569638 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 3f012a43 2025-05-14T17:11:06 Vulkan: Move VertexArray::ElementBuffer away from observer Right now, VertexArray's element buffer is always observing buffer's change. In previous CLs, we have moved vertex array away from subject/observer usage. This CL moves element buffer away from subject/observer as well. Since the gl::Buffer tracks buffer's binding to each context's current vertex array's binding point, kElementArrayBufferIndex is added to VertexArrayBufferBindingMask bits so that the element buffer is tracked exactly the same as other vertex array buffer bindings. The VerextArray code has been modified to handle this special bit, since element buffer has its own binding point VertexArrayState::mElementArrayBuffer as opposed to VertexArrayState::mVertexBindings. After this CL, VertexArray object should be completely off subject/observer usages. Bug: angleproject:400711938 Change-Id: I662ddfabc95034bdc7734939c944ab033f41801c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6552160 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
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>
Geoff Lang 3c0b2787 2025-05-17T19:36:42 WebGPU: Implement EGLImages Implement EGLImages for WebGPU. Cube maps, and non-zero mip sources are not supported yet. Bug: angleproject:418022112 Change-Id: I59955aee907167a1829f870b7d0730a6269d814c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6557130 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Charlie Lao 937cf23c 2025-05-13T16:11:47 Vulkan: Remove VertexArrayBufferContentsObservers When vertex array needs to convert buffer's data, right now it uses Subject/Observer to subscribe notifications from buffers about the data change. Since we always dirty all binding point when we bind VertexArray, or app has to rebind buffer to vertex array if its on the other context, this notification really is only needed for the current context's vertex array. In prior CLs we already moved notification from buffer to the current context's vertex array away from Subject/Observer usage pattern. This CL did similar things to VertexArrayBufferContentsObservers::mContentsObservers. VertexArrayBufferContentsObservers has been deleted in this CL. Each VertexArrayImpl now tracks the need of content observer with a bit mask of each bindingIndex (which is tracked by mContentsObserverBindingsMask). When a buffer's content changes, gl::Buffer will retrieve this bit mask from backend and pass it to the current gl::Context, which sends to current VertexArray object, which then set proper DATA dirty bits on VertexArray based on the binding bit mask. If back end think it does not need any data conversion, then the bit mask is zero and nothing will be done. This further removes dependence on subject observer, which enables us to avoid taking shared context lock for glEnableVertexAttribArray and glDisableVertexAttribArray. Bug: angleproject:400711938 Change-Id: Ieb0c09c042a560dd121242b63ec24478482399b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6549157 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang dc43c3ba 2025-05-17T19:28:20 WebGPU: Implement Renderbuffers Implement the RenderbufferWgpu class. Add the concept of a non-owned webgpu::ImageHelper for supporting EGLImage in the future. Fix some missing texture formats that now get tested with dEQP. Bug: angleproject:418022112 Change-Id: Ie1239ec581e62044e7c8723fc33cb7565d50575c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6557129 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang f537c6d9 2025-04-28T17:30:13 Allow passing a DawnProcTable to DisplayWgpu. Bug: angleproject:42266898, angleproject:414827222 Change-Id: Ibf381461881244c9a874f2d24d3248995ea0760c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6496389 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Matthew Denton <mpdenton@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org>
Geoff Lang 70b90f22 2025-05-09T16:51:31 WebGPU: Use the C API only from the proc table Define WGPU_SKIP_DECLARATIONS so that errors are generated when using the global c or cpp functions. The default proc table getter requires the cpp API is visible. Hide this in a new wgpu_proc_utils so the rest of the WebGPU backend cannot see those APIs. Bug: angleproject:342213844 Change-Id: Ia1e9bfd25b0bb538cebeaa0efe7b9d2eeabc990d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6534317 Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Alexey Knyazev 720f6bbe 2025-05-15T00:00:00 Fix attribute and uniform name validation * Fixed null name error messages to refer to correct parameters. * BindUniformLocation * Added name checks for null and all reserved prefixes. * Fixed error code for reserved prefixes. * GetAttribLocation & GetUniformLocation * Moved reserved prefixes check to the Context. * Fixed and expanded tests. Fixed: angleproject:418986804 Change-Id: I62760b3010fd38ee2e31e4ff88d9910647b329dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6568552 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Geoff Lang 3158d638 2025-05-06T17:08:56 WebGPU: Store the WebGPU proc table in wrappers Instead of relying on the global WebGPU functions, pass the proc table to the object wrappers. Bug: angleproject:342213844 Change-Id: I79a5e819ffac5b366fed0a159a6cef116b5e82b3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6514676 Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Yuxin Hu b4d39a07 2025-05-19T11:07:08 Reformat VVL Error Message Tests failed in this manual roll https://chromium-review.googlesource.com/c/angle/angle/+/5689521 no longer runs into the SYNC-HAZARD-WRITE-AFTER-WRITE VVL error. Remove the VVL error from the skipped VVL error list. Bug: angleproject:352094384 Change-Id: I8b0a4baebd7276fc6d42e0357a3b6f49adb0b4f4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6564666 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Alexey Knyazev 5fd79e6a 2025-05-15T00:00:00 Remove unused parameter from ValidateGetVertexAttribBase Bug: angleproject:409484297 Change-Id: I98fdfe8dbaeb6bc08a0c0a7a4a032850fcbdd37f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6558251 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Xinyu Fang c601f0e7 2025-04-08T17:56:22 Add extra validation of null pointers for certain APIs Bug: angleproject:409110245 Change-Id: I25dfdbdc52cdb0d7d2a91d773a0f3600e370f139 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6440146 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Mavis Deng 30479104 2025-04-28T16:01:46 Add support for GL_EXT_texture_norm16 in glCopyImageSubDataEXT Add the following compatible norm16 formats in EXT_copy_image: RGBA16_EXT RGBA16_SNORM_EXT Bug: angleproject:412517249 Change-Id: I4939705915940dacaf3168acf1a7cc7abb0870ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6490613 Reviewed-by: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Mavis Deng <mavis.deng@arm.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Matthew Denton 56becf05 2025-05-16T16:58:34 WGPU: texSubImage2D() should mark textures as dirty TextureWgpu now observes its ImageHelper's edits to staged subresources and notifies its observers (Texture) that it has changed, ensuring TextureWgpu::syncState() is called before draw if glTextSubImage2D() was called earlier. Also ends the current render pass when flushing subresource updates, otherwise if the texture is being used by the current webgpu::CommandBuffer (staged render pass commands), the texture may be updated before the staged commands are actually submitted to the GPU. Bug: angleproject:389145696 Change-Id: I07db566fca970e877a0d3faa3ceb02f8425c799a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6502676 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Yuxin Hu e6231b0f 2025-05-16T10:29:46 Reformat VVL Error Message catalyst_black trace no longer runs into the SYNC-HAZARD-WRITE-AFTER-READ VVL error mentioned in http://anglebug.com/42266390. Remove the VVL error from the skipped error list. Bug: angleproject:42266390 Change-Id: I7e3055e61632e1de42dc24233724f73beefef653 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6557942 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Yuxin Hu <yuxinhu@google.com>
Matthew Denton 4a5e20f2 2025-05-15T11:20:31 WGPU: Round uniform buffers to the alignment of a uniform struct The default uniforms are packed into a struct, and structs in WGPU's uniform address space are always aligned to 16. I.e. RequiredAlignOf (struct S, uniform) = roundUp(16, AlignOf(S)) and AlignOf(S) is at most 16. The uniform buffer should be sized to include all bytes of the struct including the padding bytes at the end. Fixes bugs like "The shader uses more bytes of the buffer (224) than the layout's minBindingSize (212)" Bug: angleproject:376553328 Change-Id: I7e52e81a6a6f45470d14e891888627ac6d0d9c02 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6549155 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>