Commit af9dd608 by Frank Henigman Committed by Commit Bot

Fix UpdateAttribBindingByVertexAttribDivisor test.

Test should clear before drawing. With the clears added it became apparent the second draw wasn't working because an attrib was left in instanced mode after the first draw. BUG=angleproject:2672 Change-Id: I6c3ee7302d24babb80a9b9affcf357145bb03dcb Reviewed-on: https://chromium-review.googlesource.com/c/1306822Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
parent 7cba6be8
......@@ -499,10 +499,14 @@ TEST_P(InstancingTestES31, UpdateAttribBindingByVertexAttribDivisor)
glVertexBindingDivisor(instanceBinding, 1);
// Do the first instanced draw
glClear(GL_COLOR_BUFFER_BIT);
glDrawElementsInstanced(GL_TRIANGLES, static_cast<GLsizei>(mIndices.size()), GL_UNSIGNED_SHORT,
mIndices.data(), static_cast<GLsizei>(mInstances.size()) / 3);
checkQuads();
// Disable instancing.
glVertexBindingDivisor(instanceBinding, 0);
// Load the vertex position into the binding indexed positionLoc.
// Load the instance position into the binding indexed instancePosLoc.
glBindVertexBuffer(positionLoc, quadBuffer, 0, kFloatStride * 3);
......@@ -516,6 +520,7 @@ TEST_P(InstancingTestES31, UpdateAttribBindingByVertexAttribDivisor)
glVertexAttribDivisor(instancePosLoc, 1);
// Do the second instanced draw
glClear(GL_COLOR_BUFFER_BIT);
glDrawElementsInstanced(GL_TRIANGLES, static_cast<GLsizei>(mIndices.size()), GL_UNSIGNED_SHORT,
mIndices.data(), static_cast<GLsizei>(mInstances.size()) / 3);
checkQuads();
......
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