Optimize ValidateDrawAttribs: Part 3.
This is a small optimization for the WebGL compatibility mode.
Instead of scanning the list of attributes for a Transform feedback
conflict, it can quickly check a cached mask. This should save a lot
of cycles on the fast path.
Bug: angleproject:1391
Change-Id: Icb8d095493a629dbff0e93872357e5bf7c7458ae
Reviewed-on: https://chromium-review.googlesource.com/1011236
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 22314ac..d99c09e 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -1012,7 +1012,7 @@
void Context::bindVertexArray(GLuint vertexArrayHandle)
{
VertexArray *vertexArray = checkVertexArrayAllocation(vertexArrayHandle);
- mGLState.setVertexArrayBinding(vertexArray);
+ mGLState.setVertexArrayBinding(this, vertexArray);
}
void Context::bindVertexBuffer(GLuint bindingIndex,
@@ -2669,7 +2669,7 @@
// [OpenGL ES 3.0.2] section 2.10 page 43:
// If a vertex array object that is currently bound is deleted, the binding
// for that object reverts to zero and the default vertex array becomes current.
- if (mGLState.removeVertexArrayBinding(vertexArray))
+ if (mGLState.removeVertexArrayBinding(this, vertexArray))
{
bindVertexArray(0);
}