From 7b96647dac456450f4680c5fee9c1ccf186786d4 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 9 Nov 2022 18:02:46 +0000 Subject: [PATCH] When only returning used entries, skip entirely unused descriptor arrays --- renderdoc/api/replay/pipestate.inl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/renderdoc/api/replay/pipestate.inl b/renderdoc/api/replay/pipestate.inl index 032e182a6..23f69409c 100644 --- a/renderdoc/api/replay/pipestate.inl +++ b/renderdoc/api/replay/pipestate.inl @@ -1338,6 +1338,8 @@ rdcarray PipeState::GetReadOnlyResources(ShaderStage stage, firstIdx = (uint32_t)element.firstUsedIndex; count = std::min(count - firstIdx, size_t(element.lastUsedIndex - element.firstUsedIndex + 1)); + if(element.dynamicallyUsedCount == 0) + count = 0; ret.back().firstIndex = (int32_t)firstIdx; } @@ -1418,6 +1420,8 @@ rdcarray PipeState::GetReadOnlyResources(ShaderStage stage, firstIdx = (uint32_t)bind.firstUsedIndex; count = std::min(count - firstIdx, uint32_t(bind.lastUsedIndex - bind.firstUsedIndex + 1)); + if(bind.dynamicallyUsedCount == 0) + count = 0; } rdcarray &val = ret.back().resources; @@ -1548,6 +1552,8 @@ rdcarray PipeState::GetReadWriteResources(ShaderStage stage, firstIdx = (uint32_t)element.firstUsedIndex; count = std::min(count - firstIdx, size_t(element.lastUsedIndex - element.firstUsedIndex + 1)); + if(element.dynamicallyUsedCount == 0) + count = 0; ret.back().firstIndex = (int32_t)firstIdx; } @@ -1645,6 +1651,8 @@ rdcarray PipeState::GetReadWriteResources(ShaderStage stage, firstIdx = (uint32_t)bind.firstUsedIndex; count = std::min(count - firstIdx, uint32_t(bind.lastUsedIndex - bind.firstUsedIndex + 1)); + if(bind.dynamicallyUsedCount == 0) + count = 0; } rdcarray &val = ret.back().resources;