mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
handle a vertex buffer stride of 0
This commit is contained in:
@@ -5113,10 +5113,15 @@ void VulkanDebugManager::InitPostVSBuffers(uint32_t eventID)
|
||||
// the end of the buffer. The maximum valid index at all is the one that reads
|
||||
// off the end of ALL buffers (so we max it with any other maxindex value
|
||||
// calculated).
|
||||
maxIdx = RDCMAX(maxIdx, uint32_t( (bufsize - offs) / input.stride ));
|
||||
if(input.stride > 0)
|
||||
maxIdx = RDCMAX(maxIdx, uint32_t( (bufsize - offs) / input.stride ));
|
||||
}
|
||||
}
|
||||
|
||||
// in case the vertex buffers were set but had invalid stride (0), max with the number
|
||||
// of vertices too. This is fine since the max here is just a conservative limit
|
||||
maxIdx = RDCMAX(maxIdx, drawcall->numIndices);
|
||||
|
||||
// do ibuffer rebasing/remapping
|
||||
|
||||
idx16 = (uint16_t *)&idxdata[0];
|
||||
|
||||
Reference in New Issue
Block a user