mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-10 00:31:00 +00:00
Don't report descriptor access for non-stage-visible descriptors
* If these are actually used it's an application error.
This commit is contained in:
@@ -844,6 +844,13 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
if(bind.bindArraySize > 1)
|
||||
continue;
|
||||
|
||||
// VkShaderStageFlagBits and ShaderStageMask are identical bit-for-bit.
|
||||
// this might be deliberate if the binding is never actually used dynamically, only
|
||||
// statically used bindings must be declared
|
||||
if((setLayoutInfos[bind.fixedBindSetOrSpace]->bindings[bind.fixedBindNumber].stageFlags &
|
||||
(VkShaderStageFlags)MaskForStage(refl->stage)) == 0)
|
||||
continue;
|
||||
|
||||
access.type = DescriptorType::ConstantBuffer;
|
||||
access.index = i;
|
||||
|
||||
@@ -877,6 +884,13 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
if(bind.bindArraySize > 1)
|
||||
continue;
|
||||
|
||||
// VkShaderStageFlagBits and ShaderStageMask are identical bit-for-bit.
|
||||
// this might be deliberate if the binding is never actually used dynamically, only
|
||||
// statically used bindings must be declared
|
||||
if((setLayoutInfos[bind.fixedBindSetOrSpace]->bindings[bind.fixedBindNumber].stageFlags &
|
||||
(VkShaderStageFlags)MaskForStage(refl->stage)) == 0)
|
||||
continue;
|
||||
|
||||
access.type = DescriptorType::Sampler;
|
||||
access.index = i;
|
||||
access.byteSize = bind.fixedBindSetOrSpace;
|
||||
@@ -893,6 +907,13 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
if(bind.bindArraySize > 1)
|
||||
continue;
|
||||
|
||||
// VkShaderStageFlagBits and ShaderStageMask are identical bit-for-bit.
|
||||
// this might be deliberate if the binding is never actually used dynamically, only
|
||||
// statically used bindings must be declared
|
||||
if((setLayoutInfos[bind.fixedBindSetOrSpace]->bindings[bind.fixedBindNumber].stageFlags &
|
||||
(VkShaderStageFlags)MaskForStage(refl->stage)) == 0)
|
||||
continue;
|
||||
|
||||
access.type = refl->readOnlyResources[i].descriptorType;
|
||||
access.index = i;
|
||||
access.byteSize = bind.fixedBindSetOrSpace;
|
||||
@@ -909,6 +930,13 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
if(bind.bindArraySize > 1)
|
||||
continue;
|
||||
|
||||
// VkShaderStageFlagBits and ShaderStageMask are identical bit-for-bit.
|
||||
// this might be deliberate if the binding is never actually used dynamically, only
|
||||
// statically used bindings must be declared
|
||||
if((setLayoutInfos[bind.fixedBindSetOrSpace]->bindings[bind.fixedBindNumber].stageFlags &
|
||||
(VkShaderStageFlags)MaskForStage(refl->stage)) == 0)
|
||||
continue;
|
||||
|
||||
access.type = refl->readWriteResources[i].descriptorType;
|
||||
access.index = i;
|
||||
access.byteSize = bind.fixedBindSetOrSpace;
|
||||
|
||||
@@ -1717,6 +1717,15 @@ bool VulkanReplay::FetchShaderFeedback(uint32_t eventId)
|
||||
return;
|
||||
}
|
||||
|
||||
// VkShaderStageFlagBits and ShaderStageMask are identical bit-for-bit.
|
||||
if((descLayouts[bindset]->bindings[bind].stageFlags &
|
||||
(VkShaderStageFlags)MaskForStage(key.stage)) == 0)
|
||||
{
|
||||
// this might be deliberate if the binding is never actually used dynamically, only
|
||||
// statically used bindings must be declared
|
||||
return;
|
||||
}
|
||||
|
||||
if(descLayouts[bindset]->bindings[bind].variableSize)
|
||||
{
|
||||
auto it = m_pDriver->m_DescriptorSetState.find(descSet);
|
||||
|
||||
Reference in New Issue
Block a user