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/validationES.cpp b/src/libANGLE/validationES.cpp
index 5804c56..aabc42f 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -59,7 +59,7 @@
gl::Buffer *buffer = attrib.buffer.get();
if (!buffer)
{
- if (webglCompatibility)
+ if (webglCompatibility || !state.areClientArraysEnabled())
{
// [WebGL 1.0] Section 6.5 Enabled Vertex Attributes and Range Checking
// If a vertex attribute is enabled as an array via enableVertexAttribArray but
@@ -205,6 +205,9 @@
case GL_BIND_GENERATES_RESOURCE_CHROMIUM:
return queryOnly && context->getExtensions().bindGeneratesResource;
+ case GL_CLIENT_ARRAYS_ANGLE:
+ return queryOnly && context->getExtensions().clientArrays;
+
case GL_FRAMEBUFFER_SRGB_EXT:
return context->getExtensions().sRGBWriteControl;
@@ -3484,6 +3487,11 @@
"indices must be a multiple of the element type size."));
return false;
}
+ }
+
+ if (context->getExtensions().webglCompatibility ||
+ !context->getGLState().areClientArraysEnabled())
+ {
if (!elementArrayBuffer && count > 0)
{
// [WebGL 1.0] Section 6.2 No Client Side Arrays