Add PackedEnumBitSet, use it for buffer binding validation
Includes angle::BitSetT changes from jmadill@chromium.org
BUG=angleproject:2169
Change-Id: I9f896613f5c6cdc91281cb9a00134f67291870d9
Reviewed-on: https://chromium-review.googlesource.com/804177
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 0cc6d0b..001c91a 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -2838,7 +2838,7 @@
return false;
}
- if (!ValidBufferType(context, target))
+ if (!context->isValidBufferBinding(target))
{
ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidBufferTypes);
return false;
@@ -4206,7 +4206,7 @@
return false;
}
- if (!ValidBufferType(context, target))
+ if (!context->isValidBufferBinding(target))
{
ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidBufferTypes);
return false;
@@ -4241,7 +4241,7 @@
return false;
}
- if (!ValidBufferType(context, target))
+ if (!context->isValidBufferBinding(target))
{
ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidBufferTypes);
return false;
@@ -4408,7 +4408,7 @@
bool ValidateBindBuffer(ValidationContext *context, BufferBinding target, GLuint buffer)
{
- if (!ValidBufferType(context, target))
+ if (!context->isValidBufferBinding(target))
{
ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidBufferTypes);
return false;