Don't include pass boundary draws in batch-postvs fetch

This commit is contained in:
baldurk
2021-05-12 14:11:03 +01:00
parent f7db7617b6
commit 4bd350297b
+12 -2
View File
@@ -3378,17 +3378,27 @@ struct VulkanInitPostVSCallback : public VulkanDrawcallCallback
void VulkanReplay::InitPostVSBuffers(const rdcarray<uint32_t> &events)
{
size_t first = 0;
for(; first < events.size(); first++)
{
const DrawcallDescription *drawcall = m_pDriver->GetDrawcall(events[first]);
if(drawcall->flags & DrawFlags::PassBoundary)
continue;
break;
}
// first we must replay up to the first event without replaying it. This ensures any
// non-command buffer calls like memory unmaps etc all happen correctly before this
// command buffer
m_pDriver->ReplayLog(0, events.front(), eReplay_WithoutDraw);
m_pDriver->ReplayLog(0, events[first], eReplay_WithoutDraw);
VulkanInitPostVSCallback cb(m_pDriver, events);
// now we replay the events, which are guaranteed (because we generated them in
// GetPassEvents above) to come from the same command buffer, so the event IDs are
// still locally continuous, even if we jump into replaying.
m_pDriver->ReplayLog(events.front(), events.back(), eReplay_Full);
m_pDriver->ReplayLog(events[first], events.back(), eReplay_Full);
}
MeshFormat VulkanReplay::GetPostVSBuffers(uint32_t eventId, uint32_t instID, uint32_t viewID,