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:
parent
070052f6b7
commit
97ffc1a8aa
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue