Add extensions to disable client arrays.
Chrome doesn't allow any client data in its command buffer. Add an ANGLE
extension to request a context that disallows client data.
BUG=602737
Change-Id: If9d5144daea3c629a73562396000df59a671aad3
Reviewed-on: https://chromium-review.googlesource.com/441986
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 1b4b9b9..7b80eb9 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -3957,8 +3957,9 @@
// An INVALID_OPERATION error is generated when a non-zero vertex array object
// is bound, zero is bound to the ARRAY_BUFFER buffer object binding point,
// and the pointer argument is not NULL.
- if (context->getGLState().getVertexArray()->id() != 0 &&
- context->getGLState().getArrayBufferId() == 0 && ptr != NULL)
+ bool nullBufferAllowed = context->getGLState().areClientArraysEnabled() &&
+ context->getGLState().getVertexArray()->id() == 0;
+ if (!nullBufferAllowed && context->getGLState().getArrayBufferId() == 0 && ptr != NULL)
{
context->handleError(
Error(GL_INVALID_OPERATION,