Fix handling of unbound descriptor sets, assume statically not used

This commit is contained in:
baldurk
2019-09-09 11:19:08 +01:00
parent 8fb2f359ff
commit aa791d3306
+2 -1
View File
@@ -1244,7 +1244,8 @@ void VulkanReplay::PatchReservedDescriptors(const VulkanStatePipeline &pipe,
// if the shader had no descriptor sets at all, i will be invalid, so just skip and add a set
// with only our own bindings.
if(i < pipeDescSetLayouts.size() && i < pipe.descSets.size())
if(i < pipeDescSetLayouts.size() && i < pipe.descSets.size() &&
pipe.descSets[i].pipeLayout != ResourceId())
{
// use the descriptor set layout from when it was bound. If the pipeline layout declared a
// descriptor set layout for this set, but it's statically unused, it may be complete