mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 00:47:13 +00:00
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:
committed by
Commit Bot service account
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user