Commit 3caa6528 by Geoff Lang

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/295145Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 770f8f86
......@@ -394,7 +394,6 @@ void VertexArrayGL::updateAttribPointer(size_t attribIndex)
}
updateNeedsStreaming(attribIndex);
mAppliedAttributes[attribIndex] = attrib;
// If we need to stream, defer the attribPointer to the draw call.
if (mAttributesNeedStreaming[attribIndex])
......@@ -413,6 +412,7 @@ void VertexArrayGL::updateAttribPointer(size_t attribIndex)
{
mStateManager->bindBuffer(GL_ARRAY_BUFFER, 0);
}
mAppliedAttributes[attribIndex].buffer = attrib.buffer;
if (attrib.pureInteger)
{
......@@ -424,6 +424,12 @@ void VertexArrayGL::updateAttribPointer(size_t attribIndex)
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment