From 4bd350297be6b017482b85c724c14bdb6febe1a4 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 12 May 2021 14:11:03 +0100 Subject: [PATCH] Don't include pass boundary draws in batch-postvs fetch --- renderdoc/driver/vulkan/vk_postvs.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/vulkan/vk_postvs.cpp b/renderdoc/driver/vulkan/vk_postvs.cpp index a1f33a94d..19a4ddeb2 100644 --- a/renderdoc/driver/vulkan/vk_postvs.cpp +++ b/renderdoc/driver/vulkan/vk_postvs.cpp @@ -3378,17 +3378,27 @@ struct VulkanInitPostVSCallback : public VulkanDrawcallCallback void VulkanReplay::InitPostVSBuffers(const rdcarray &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,