Crash fix for non-indexed meshes

This commit is contained in:
baldurk
2015-12-03 13:14:15 +01:00
parent 3c8fe0e44a
commit c06aeebd3a
+7 -5
View File
@@ -970,11 +970,6 @@ namespace renderdocui.Windows
ret.Topology = ret.PostVS.topo;
ret.IndexCount = ret.PostVS.numVerts;
uint stride = ret.PostVS.stride;
if (stride != 0 && (input.Drawcall.flags & DrawcallFlags.UseIBuffer) == 0)
ret.IndexCount = Math.Min(ret.IndexCount, (uint)ret.Buffers[0].Length / stride);
}
ret.Indices = null;
@@ -1064,8 +1059,15 @@ namespace renderdocui.Windows
}
if (ret.PostVS.buf != ResourceId.Null)
{
ret.Buffers[0] = r.GetBufferData(ret.PostVS.buf, ret.PostVS.offset, (maxIndex + 1) * ret.PostVS.stride);
uint stride = ret.PostVS.stride;
if (stride != 0 && (input.Drawcall.flags & DrawcallFlags.UseIBuffer) == 0)
ret.IndexCount = Math.Min(ret.IndexCount, (uint)ret.Buffers[0].Length / stride);
}
return ret;
}
else if (input.Buffers != null && m_Output != null)