mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Track descriptor sets per-cmd-buffer while reading
* This lets the usage actually have the right descriptor sets to check against. * It was lost as a result of a bad fix after copy-pasting removed the previous read-time tracking.
This commit is contained in:
@@ -2540,9 +2540,12 @@ void WrappedVulkan::AddUsage(VulkanDrawcallTreeNode &drawNode, vector<DebugMessa
|
||||
if(sh.module == ResourceId())
|
||||
continue;
|
||||
|
||||
ResourceId origPipe = GetResourceManager()->GetOriginalID(state.pipeline);
|
||||
ResourceId origShad = GetResourceManager()->GetOriginalID(sh.module);
|
||||
|
||||
// 5 is the compute shader's index (VS, TCS, TES, GS, FS, CS)
|
||||
const vector<VulkanRenderState::Pipeline::DescriptorAndOffsets> &descSets =
|
||||
(shad == 5 ? m_RenderState.compute.descSets : m_RenderState.graphics.descSets);
|
||||
const vector<BakedCmdBufferInfo::CmdBufferState::DescriptorAndOffsets> &descSets =
|
||||
(shad == 5 ? state.computeDescSets : state.graphicsDescSets);
|
||||
|
||||
RDCASSERT(sh.mapping);
|
||||
|
||||
@@ -2591,6 +2594,9 @@ void WrappedVulkan::AddUsage(VulkanDrawcallTreeNode &drawNode, vector<DebugMessa
|
||||
DescriptorSetInfo &descset = m_DescriptorSetState[descSets[bindset].descSet];
|
||||
DescSetLayout &layout = c.m_DescSetLayout[descset.layout];
|
||||
|
||||
ResourceId origId = GetResourceManager()->GetOriginalID(descSets[bindset].descSet);
|
||||
ResourceId layoutId = GetResourceManager()->GetOriginalID(descset.layout);
|
||||
|
||||
if(layout.bindings.empty())
|
||||
{
|
||||
msg.description =
|
||||
|
||||
@@ -340,6 +340,13 @@ private:
|
||||
{
|
||||
ResourceId pipeline;
|
||||
|
||||
struct DescriptorAndOffsets
|
||||
{
|
||||
ResourceId descSet;
|
||||
vector<uint32_t> offsets;
|
||||
};
|
||||
vector<DescriptorAndOffsets> graphicsDescSets, computeDescSets;
|
||||
|
||||
uint32_t idxWidth;
|
||||
ResourceId ibuffer;
|
||||
vector<ResourceId> vbuffers;
|
||||
|
||||
@@ -1208,9 +1208,10 @@ bool WrappedVulkan::Serialise_vkCmdBindDescriptorSets(
|
||||
layout = GetResourceManager()->GetLiveHandle<VkPipelineLayout>(layoutid);
|
||||
|
||||
// track while reading, as we need to track resource usage
|
||||
vector<VulkanRenderState::Pipeline::DescriptorAndOffsets> &descsets =
|
||||
(bind == VK_PIPELINE_BIND_POINT_GRAPHICS) ? m_RenderState.graphics.descSets
|
||||
: m_RenderState.compute.descSets;
|
||||
vector<BakedCmdBufferInfo::CmdBufferState::DescriptorAndOffsets> &descsets =
|
||||
(bind == VK_PIPELINE_BIND_POINT_GRAPHICS)
|
||||
? m_BakedCmdBufferInfo[m_LastCmdBufferID].state.graphicsDescSets
|
||||
: m_BakedCmdBufferInfo[m_LastCmdBufferID].state.computeDescSets;
|
||||
|
||||
// expand as necessary
|
||||
if(descsets.size() < first + numSets)
|
||||
|
||||
Reference in New Issue
Block a user