GL backend: fix baseVertex param to DrawIndexed.

Re-enable the appropriate test.

BUG=
Change-Id: I8b823b17259f7c588fda0be4fe86990d11a0a324
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5460
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Stephen White 2019-03-11 16:28:42 +00:00 committed by Commit Bot service account
parent 070052f6b7
commit 97ffc1a8aa
2 changed files with 4 additions and 7 deletions

View File

@ -622,18 +622,18 @@ namespace dawn_native { namespace opengl {
GLenum formatType = IndexFormatType(indexFormat);
if (draw->firstInstance > 0) {
glDrawElementsInstancedBaseInstance(
glDrawElementsInstancedBaseVertexBaseInstance(
lastPipeline->GetGLPrimitiveTopology(), draw->indexCount, formatType,
reinterpret_cast<void*>(draw->firstIndex * formatSize +
indexBufferBaseOffset),
draw->instanceCount, draw->firstInstance);
draw->instanceCount, draw->baseVertex, draw->firstInstance);
} else {
// This branch is only needed on OpenGL < 4.2
glDrawElementsInstanced(
glDrawElementsInstancedBaseVertex(
lastPipeline->GetGLPrimitiveTopology(), draw->indexCount, formatType,
reinterpret_cast<void*>(draw->firstIndex * formatSize +
indexBufferBaseOffset),
draw->instanceCount);
draw->instanceCount, draw->baseVertex);
}
} break;

View File

@ -132,9 +132,6 @@ TEST_P(DrawIndexedTest, Uint32) {
// Test the parameter 'baseVertex' of DrawIndexed() works.
TEST_P(DrawIndexedTest, BaseVertex) {
// TODO(jiawei.shao@intel.com): enable 'baseVertex' on OpenGL back-ends
DAWN_SKIP_TEST_IF(IsOpenGL());
RGBA8 filled(0, 255, 0, 255);
RGBA8 notFilled(0, 0, 0, 0);