Bind all compatible descriptor sets, don't bail at the first one

* When descriptor sets are invalidated and we have stale bindings around
  we cannot bind them or it will lead to invalid behaviour and crashes.
* However it's possible for set 0 to be invalid/stale and set 1 to be
  valid and required, so we can't bail out at the first invalid set. We
  keep iterating and bind all valid compatible sets.
This commit is contained in:
baldurk
2017-07-06 16:04:23 +01:00
parent 01eb50089c
commit e3644c3174
+5 -1
View File
@@ -213,7 +213,11 @@ void VulkanRenderState::BindPipeline(VkCommandBuffer cmd, PipelineBinding bindin
m_CreationInfo->m_DescSetLayout[createdDescSetLayoutId];
if(descLayout != createdDescLayout)
break;
{
// this set is incompatible, don't rebind it. Assume the application knows the shader
// doesn't need this set, and the binding is just stale
continue;
}
}
// if there are dynamic buffers, pass along the offsets