Optimize angle::BitSetIterator.
Adds a new custom bitset template to handle packing as many bits as
possible into a single variable. Intelligently select the right class
depending on platform features and bit sizes.
For now, always use a packed 64-bit set on 64-bit, instead of using
a 32-bit set for smaller bitsets.
BUG=angleproject:1814
Change-Id: I3ffef815c15515555833f6fc9302d8a4eee5423b
Reviewed-on: https://chromium-review.googlesource.com/471827
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/State.cpp b/src/libANGLE/State.cpp
index 408aa26..ac7daab 100644
--- a/src/libANGLE/State.cpp
+++ b/src/libANGLE/State.cpp
@@ -1370,9 +1370,9 @@
mDirtyObjects.set(DIRTY_OBJECT_VERTEX_ARRAY);
}
-const VertexAttribCurrentValueData &State::getVertexAttribCurrentValue(unsigned int attribNum) const
+const VertexAttribCurrentValueData &State::getVertexAttribCurrentValue(size_t attribNum) const
{
- ASSERT(static_cast<size_t>(attribNum) < mVertexAttribCurrentValues.size());
+ ASSERT(attribNum < mVertexAttribCurrentValues.size());
return mVertexAttribCurrentValues[attribNum];
}
@@ -2114,7 +2114,7 @@
void State::syncDirtyObjects(const Context *context, const DirtyObjects &bitset)
{
- for (auto dirtyObject : angle::IterateBitSet(bitset))
+ for (auto dirtyObject : bitset)
{
switch (dirtyObject)
{