Add PrimitiveMode packed GLenum.
Bug: angleproject:2574
Change-Id: I3d7bd7ca0d69a364a611dc04799ea34906fc4a6c
Reviewed-on: https://chromium-review.googlesource.com/1067114
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
diff --git a/src/libANGLE/validationES31.cpp b/src/libANGLE/validationES31.cpp
index 86c6f9b..d00c4de 100644
--- a/src/libANGLE/validationES31.cpp
+++ b/src/libANGLE/validationES31.cpp
@@ -410,7 +410,7 @@
return true;
}
-bool ValidateDrawIndirectBase(Context *context, GLenum mode, const void *indirect)
+bool ValidateDrawIndirectBase(Context *context, PrimitiveMode mode, const void *indirect)
{
if (context->getClientVersion() < ES_3_1)
{
@@ -468,10 +468,10 @@
return true;
}
-bool ValidateDrawArraysIndirect(Context *context, GLenum mode, const void *indirect)
+bool ValidateDrawArraysIndirect(Context *context, PrimitiveMode mode, const void *indirect)
{
- const State &state = context->getGLState();
- TransformFeedback *curTransformFeedback = state.getCurrentTransformFeedback();
+ const State &state = context->getGLState();
+ TransformFeedback *curTransformFeedback = state.getCurrentTransformFeedback();
if (curTransformFeedback && curTransformFeedback->isActive() &&
!curTransformFeedback->isPaused())
{
@@ -516,16 +516,19 @@
return true;
}
-bool ValidateDrawElementsIndirect(Context *context, GLenum mode, GLenum type, const void *indirect)
+bool ValidateDrawElementsIndirect(Context *context,
+ PrimitiveMode mode,
+ GLenum type,
+ const void *indirect)
{
if (!ValidateDrawElementsBase(context, mode, type))
{
return false;
}
- const State &state = context->getGLState();
- const VertexArray *vao = state.getVertexArray();
- Buffer *elementArrayBuffer = vao->getElementArrayBuffer().get();
+ const State &state = context->getGLState();
+ const VertexArray *vao = state.getVertexArray();
+ Buffer *elementArrayBuffer = vao->getElementArrayBuffer().get();
if (!elementArrayBuffer)
{
context->handleError(InvalidOperation() << "zero is bound to ELEMENT_ARRAY_BUFFER");