From 6bd2a457b3ae469d069517f3c003129147ae9c37 Mon Sep 17 00:00:00 2001 From: baldurk Date: Sat, 23 Jan 2016 16:18:22 +0100 Subject: [PATCH] Fix overly-conservative buffer data fetch * This could be a big win in the case where a large object is instanced many times, we only fetch the data for the relevant instance output data, not ALL the output data. --- renderdoc/driver/vulkan/vk_replay.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/vulkan/vk_replay.cpp b/renderdoc/driver/vulkan/vk_replay.cpp index 590c87786..29758b54f 100644 --- a/renderdoc/driver/vulkan/vk_replay.cpp +++ b/renderdoc/driver/vulkan/vk_replay.cpp @@ -1894,7 +1894,7 @@ void VulkanReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorEndCommandBuffer(Unwrap(cmd)); RDCASSERT(vkr == VK_SUCCESS); - GetBufferData(cfg.position.buf, 0, 0, m_HighlightCache.data); + uint64_t maxIndex = cfg.position.numVerts; if(cfg.position.idxByteWidth == 0 || stage == eMeshDataStage_GSOut) { @@ -1920,19 +1920,30 @@ void VulkanReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vectorGetNextCmd(); @@ -1951,7 +1962,9 @@ void VulkanReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vector