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:
Jake Turner
2025-03-07 10:53:35 +00:00
parent c78f827c9e
commit ff25ea31f6
+12
View File
@@ -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());