diff --git a/renderdoc/driver/d3d11/d3d11_rendermesh.cpp b/renderdoc/driver/d3d11/d3d11_rendermesh.cpp index 7f80d8a7c..6fcec0f2f 100644 --- a/renderdoc/driver/d3d11/d3d11_rendermesh.cpp +++ b/renderdoc/driver/d3d11/d3d11_rendermesh.cpp @@ -225,10 +225,10 @@ void D3D11Replay::RenderMesh(uint32_t eventId, const vector &seconda // we source all data from the first instanced value in the instanced case, so make sure we // offset correctly here. - if(cfg.position.instanced) + if(cfg.position.instanced && cfg.position.instStepRate) offs[0] += cfg.position.vertexByteStride * (cfg.curInstance / cfg.position.instStepRate); - if(cfg.second.instanced) + if(cfg.second.instanced && cfg.second.instStepRate) offs[1] += cfg.second.vertexByteStride * (cfg.curInstance / cfg.second.instStepRate); {