Vertex management functions can take a State reference instead of pointers to attrib data.

BUG=angle:685

Change-Id: I0bfc26c53eb1358a023ac5d4ec20be06f9c90f4a
Reviewed-on: https://chromium-review.googlesource.com/219352
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index 9aa8a9e..cf19524 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -1396,10 +1396,8 @@
 // Applies the shaders and shader constants to the Direct3D 9 device
 Error Context::applyShaders(ProgramBinary *programBinary, bool transformFeedbackActive)
 {
-    const VertexAttribute *vertexAttributes = mState.getVertexArray()->getVertexAttributes();
-
     VertexFormat inputLayout[MAX_VERTEX_ATTRIBS];
-    VertexFormat::GetInputLayout(inputLayout, programBinary, vertexAttributes, mState.getVertexAttribCurrentValues());
+    VertexFormat::GetInputLayout(inputLayout, programBinary, mState);
 
     const Framebuffer *fbo = mState.getDrawFramebuffer();
 
@@ -1769,7 +1767,7 @@
         return error;
     }
 
-    error = mRenderer->applyVertexBuffer(programBinary, mState.getVertexArray()->getVertexAttributes(), mState.getVertexAttribCurrentValues(), first, count, instances);
+    error = mRenderer->applyVertexBuffer(mState, first, count, instances);
     if (error.isError())
     {
         return error;
@@ -1854,9 +1852,7 @@
     }
 
     GLsizei vertexCount = indexInfo.indexRange.length() + 1;
-    error = mRenderer->applyVertexBuffer(programBinary, vao->getVertexAttributes(),
-                                         mState.getVertexAttribCurrentValues(),
-                                         indexInfo.indexRange.start, vertexCount, instances);
+    error = mRenderer->applyVertexBuffer(mState, indexInfo.indexRange.start, vertexCount, instances);
     if (error.isError())
     {
         return error;