Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: src/gpu/instanced/GLInstancedRendering.cpp

Issue 2342063002: simple fix? (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/instanced/GLInstancedRendering.cpp
diff --git a/src/gpu/instanced/GLInstancedRendering.cpp b/src/gpu/instanced/GLInstancedRendering.cpp
index 3d9058ec3e73aaac0403870990ac3c58445126f4..6be2d63309178a5def24909a56c9a494b329c329 100644
--- a/src/gpu/instanced/GLInstancedRendering.cpp
+++ b/src/gpu/instanced/GLInstancedRendering.cpp
@@ -242,19 +242,19 @@ void GLInstancedRendering::onDraw(const GrPipeline& pipeline, const InstanceProc
int emulatedBaseInstance = batch->fEmulatedBaseInstance;
for (int i = 0; i < numCommands; ++i) {
int glCmdIdx = batch->fGLDrawCmdsIdx + i;
- const GLDrawCmdInfo& cmdInfo = fGLDrawCmdsInfo[glCmdIdx];
this->flushInstanceAttribs(emulatedBaseInstance);
if (fDrawIndirectBuffer) {
GL_CALL(DrawElementsIndirect(GR_GL_TRIANGLES, GR_GL_UNSIGNED_BYTE,
(GrGLDrawElementsIndirectCommand*) nullptr + glCmdIdx));
} else {
+ const GLDrawCmdInfo& cmdInfo = fGLDrawCmdsInfo[glCmdIdx];
GL_CALL(DrawElementsInstanced(GR_GL_TRIANGLES, cmdInfo.fGeometry.fCount,
GR_GL_UNSIGNED_BYTE,
(GrGLubyte*) nullptr + cmdInfo.fGeometry.fStart,
cmdInfo.fInstanceCount));
- }
- if (!glCaps.baseInstanceSupport()) {
- emulatedBaseInstance += cmdInfo.fInstanceCount;
csmartdalton 2016/09/15 16:16:24 This needs to happen for the glDrawElementsIndirec
+ if (!glCaps.baseInstanceSupport()) {
+ emulatedBaseInstance += cmdInfo.fInstanceCount;
+ }
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698