Only update the synced parts of mAppliedAttributes.
Members such as divisor are not synced in
VertexArrayGL::updateAttribPointer so assigning the whole attribute causes
the divisor to not be synced.
BUG=angleproject:1136
Change-Id: I947a144f81ae67953947e363debd1d1cff78207a
Reviewed-on: https://chromium-review.googlesource.com/295145
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/gl/VertexArrayGL.cpp b/src/libANGLE/renderer/gl/VertexArrayGL.cpp
index e43cb7a..4fc9a65 100644
--- a/src/libANGLE/renderer/gl/VertexArrayGL.cpp
+++ b/src/libANGLE/renderer/gl/VertexArrayGL.cpp
@@ -394,7 +394,6 @@
}
updateNeedsStreaming(attribIndex);
- mAppliedAttributes[attribIndex] = attrib;
// If we need to stream, defer the attribPointer to the draw call.
if (mAttributesNeedStreaming[attribIndex])
@@ -413,6 +412,7 @@
{
mStateManager->bindBuffer(GL_ARRAY_BUFFER, 0);
}
+ mAppliedAttributes[attribIndex].buffer = attrib.buffer;
if (attrib.pureInteger)
{
@@ -424,6 +424,12 @@
mFunctions->vertexAttribPointer(static_cast<GLuint>(attribIndex), attrib.size, attrib.type,
attrib.normalized, attrib.stride, attrib.pointer);
}
+ mAppliedAttributes[attribIndex].size = attrib.size;
+ mAppliedAttributes[attribIndex].type = attrib.type;
+ mAppliedAttributes[attribIndex].normalized = attrib.normalized;
+ mAppliedAttributes[attribIndex].pureInteger = attrib.pureInteger;
+ mAppliedAttributes[attribIndex].stride = attrib.stride;
+ mAppliedAttributes[attribIndex].pointer = attrib.pointer;
}
void VertexArrayGL::syncState(const VertexArray::DirtyBits &dirtyBits)