mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Don't mark unused binds with 0 stageFlags
* It's a reasonable mistake for someone to have a bind they care about with 0 stageFlags
This commit is contained in:
@@ -595,7 +595,7 @@ void VulkanReplay::FetchShaderFeedback(uint32_t eventId)
|
||||
const DescSetLayout::Binding &bindData = layout.bindings[binding];
|
||||
|
||||
// skip empty bindings
|
||||
if(bindData.descriptorCount == 0 || bindData.stageFlags == 0)
|
||||
if(bindData.descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
|
||||
continue;
|
||||
|
||||
// only process array bindings
|
||||
|
||||
@@ -4038,6 +4038,7 @@ void WrappedVulkan::AddUsage(VulkanDrawcallTreeNode &drawNode, rdcarray<DebugMes
|
||||
if(slot.bufferInfo.buffer != ResourceId())
|
||||
id = slot.bufferInfo.buffer;
|
||||
break;
|
||||
case VK_DESCRIPTOR_TYPE_MAX_ENUM: break;
|
||||
default: RDCERR("Unexpected type %d", layout.bindings[bind].descriptorType); break;
|
||||
}
|
||||
|
||||
|
||||
@@ -1927,7 +1927,7 @@ void VulkanReplay::PatchReservedDescriptors(const VulkanStatePipeline &pipe,
|
||||
const DescSetLayout::Binding &bind = origLayout.bindings[b];
|
||||
|
||||
// skip empty bindings
|
||||
if(bind.descriptorCount == 0 || bind.stageFlags == 0)
|
||||
if(bind.descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
|
||||
continue;
|
||||
|
||||
// make room in the pool
|
||||
@@ -2123,7 +2123,7 @@ void VulkanReplay::PatchReservedDescriptors(const VulkanStatePipeline &pipe,
|
||||
const DescSetLayout::Binding &bind = origLayout.bindings[b];
|
||||
|
||||
// skip empty bindings
|
||||
if(bind.descriptorCount == 0 || bind.stageFlags == 0)
|
||||
if(bind.descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
|
||||
continue;
|
||||
|
||||
DescriptorSetSlot *slot = setInfo.currentBindings[b];
|
||||
|
||||
@@ -82,8 +82,8 @@ struct DescSetLayout
|
||||
// some elements could be untouched. We set stageFlags to 0 so the UI ignores these
|
||||
// elements
|
||||
Binding()
|
||||
: descriptorType(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER),
|
||||
descriptorCount(1),
|
||||
: descriptorType(VK_DESCRIPTOR_TYPE_MAX_ENUM),
|
||||
descriptorCount(0),
|
||||
stageFlags(0),
|
||||
immutableSampler(NULL)
|
||||
{
|
||||
|
||||
@@ -1663,6 +1663,7 @@ void VulkanReplay::SavePipelineState(uint32_t eventId)
|
||||
dst.bindings[b].descriptorCount = 1;
|
||||
dst.bindings[b].type = BindType::ConstantBuffer;
|
||||
break;
|
||||
case VK_DESCRIPTOR_TYPE_MAX_ENUM: dst.bindings[b].type = BindType::Unknown; break;
|
||||
default: dst.bindings[b].type = BindType::Unknown; RDCERR("Unexpected descriptor type");
|
||||
}
|
||||
|
||||
|
||||
@@ -455,7 +455,7 @@ void VulkanRenderState::BindDescriptorSet(WrappedVulkan *vk, const DescSetLayout
|
||||
const DescSetLayout::Binding &bind = descLayout.bindings[b];
|
||||
|
||||
// skip if this binding isn't used
|
||||
if(bind.descriptorCount == 0 || bind.stageFlags == 0)
|
||||
if(bind.descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
|
||||
continue;
|
||||
|
||||
// push.dstSet; // unused for push descriptors
|
||||
|
||||
Reference in New Issue
Block a user