mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 14:36:35 +00:00
Handle getting post VS inputs when attribute offset larger than stride
i.e. storing de-interleaved data in a Vertex Buffer
This commit is contained in:
@@ -4598,7 +4598,19 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
|
||||
|
||||
offs += action->vertexOffset * stride;
|
||||
}
|
||||
// Handle the case of vertex attribute offset larger than the stride
|
||||
uint64_t extraAttributeLen = 0;
|
||||
for(uint32_t va = 0; va < state.vertexAttributes.size(); va++)
|
||||
{
|
||||
if(state.vertexAttributes[va].binding == binding)
|
||||
{
|
||||
uint64_t vaOffset = state.vertexAttributes[va].offset;
|
||||
if(vaOffset > stride)
|
||||
extraAttributeLen = RDCMAX(extraAttributeLen, vaOffset);
|
||||
}
|
||||
}
|
||||
|
||||
len += extraAttributeLen;
|
||||
len = RDCMIN(len, state.vbuffers[binding].size);
|
||||
|
||||
origVBs.push_back(bytebuf());
|
||||
|
||||
Reference in New Issue
Block a user