Commit 8d6d127acc1072488e5b57ba4e7e93da2d94bfda

Charlie Lao 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>