Do not process descriptor access with desc buffers if possibly invalid

* Descriptor sets are neatly independent so it's possible to process them
  without needing any other state to be valid, but descriptor buffers can be
  partially set state and may also have invalidated state so it's not possible
  to process them unless we know we're on a correct action of the corresponding
  type.
This commit is contained in:
baldurk
2025-09-08 16:35:41 +01:00
parent 187698e636
commit 0d0a7cbb2f
+12
View File
@@ -2890,6 +2890,9 @@ rdcarray<DescriptorAccess> VulkanReplay::GetDescriptorAccess(uint32_t eventId)
rdcarray<DescriptorAccess> ret;
const ActionDescription *action = m_pDriver->GetAction(eventId);
const bool compute = action && bool(action->flags & ActionFlags::Dispatch);
if(state.graphics.pipeline != ResourceId())
ret.append(m_pDriver->m_CreationInfo.m_Pipeline[state.graphics.pipeline].staticDescriptorAccess);
@@ -2940,6 +2943,15 @@ rdcarray<DescriptorAccess> VulkanReplay::GetDescriptorAccess(uint32_t eventId)
access.descriptorStore = rm->GetOriginalID(descSets[setIdx].descSet);
}
}
else if(action == NULL || ((!compute && access.stage == ShaderStage::Compute) ||
(compute && access.stage != ShaderStage::Compute)))
{
// descriptor buffer state can be temporarily invalid due to multiple stage binding and be
// perturbed across stages if buffers are rebound without offsets or vice-versa, do not
// display descriptor access for descriptor buffers if no action is selected, or the access
// comes from the alternate pipeline
access.descriptorStore = ResourceId();
}
else if(bufSetIdx >= 0 || inlinebufSetIdx >= 0)
{
const rdcarray<VulkanStatePipeline::DescriptorAndOffsets> &descSets =