Hash :
9a05a2b7
Author :
Date :
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>
//
// Copyright 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Unit tests for VertexArray and related classes.
//
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "common/bitset_utils.h"
#include "common/utilities.h"
#include "libANGLE/VertexArray.h"
using namespace gl;