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/Framebuffer.cpp b/src/libANGLE/Framebuffer.cpp
index d7e61f8..8a310da 100644
--- a/src/libANGLE/Framebuffer.cpp
+++ b/src/libANGLE/Framebuffer.cpp
@@ -1263,7 +1263,7 @@
}
// The bitset will skip inactive draw buffers.
- for (GLuint drawIndex : angle::IterateBitSet(mState.mEnabledDrawBuffers))
+ for (size_t drawIndex : mState.mEnabledDrawBuffers)
{
const FramebufferAttachment *attachment = getDrawBuffer(drawIndex);
if (attachment && attachment->type() == GL_TEXTURE)