Context: Cache attributes masks.
This cache is updated in the following locations:
1. GLES1: clientActiveTexture.
2. GLES1: disableClientState/enableClientState.
3. Context: linkProgram/useProgram/programBinary.
4. Context: bindVertexArray.
5. Vertex Array: most state changes.
Improves performance by about 6% in the GL no-op test. Also includes
fixes for keeping the client memory attribs mask in sync. The cache
also includes a boolean if there are any enabled client attributes.
Bug: angleproject:1391
Change-Id: I93b6a2c8492355958fd5483f14b70535729091d6
Reviewed-on: https://chromium-review.googlesource.com/1147437
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/tests/gl_tests/WebGLCompatibilityTest.cpp b/src/tests/gl_tests/WebGLCompatibilityTest.cpp
index e55cba7..d3cffeb 100644
--- a/src/tests/gl_tests/WebGLCompatibilityTest.cpp
+++ b/src/tests/gl_tests/WebGLCompatibilityTest.cpp
@@ -4163,12 +4163,18 @@
ANGLE_GL_PROGRAM(program, kVS, kFS);
glUseProgram(program);
- GLBuffer buffer;
- glBindBuffer(GL_ARRAY_BUFFER, buffer);
glEnableVertexAttribArray(0);
glDrawArrays(GL_POINTS, 0, 1);
- // This should fail because it is trying to pull one vertex from an empty buffer.
+ // This should fail because it is trying to pull a vertex with no buffer.
+ EXPECT_GL_ERROR(GL_INVALID_OPERATION);
+
+ GLBuffer buffer;
+ glBindBuffer(GL_ARRAY_BUFFER, buffer);
+ glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, nullptr);
+
+ // This should fail because it is trying to pull a vertex from an empty buffer.
+ glDrawArrays(GL_POINTS, 0, 1);
EXPECT_GL_ERROR(GL_INVALID_OPERATION);
}