mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Don't reject valid desc writes with immutable samplers. Refs #260
* Previously we were rejecting/ignoring any descriptor write that didn't have a valid sampler and imageview. But if the layout has immutable samplers we can allow any write that just has the imageview, and lets sampler be NULL.
This commit is contained in:
@@ -426,6 +426,10 @@ bool WrappedVulkan::Serialise_vkUpdateDescriptorSets(Serialiser *localSerialiser
|
||||
if(!valid)
|
||||
return true;
|
||||
|
||||
const DescSetLayout &layout =
|
||||
m_CreationInfo.m_DescSetLayout
|
||||
[m_DescriptorSetState[GetResourceManager()->GetNonDispWrapper(writeDesc.dstSet)->id].layout];
|
||||
|
||||
switch(writeDesc.descriptorType)
|
||||
{
|
||||
case VK_DESCRIPTOR_TYPE_SAMPLER:
|
||||
@@ -438,7 +442,9 @@ bool WrappedVulkan::Serialise_vkUpdateDescriptorSets(Serialiser *localSerialiser
|
||||
{
|
||||
for(uint32_t i = 0; i < writeDesc.descriptorCount; i++)
|
||||
{
|
||||
valid &= (writeDesc.pImageInfo[i].sampler != VK_NULL_HANDLE);
|
||||
valid &= (writeDesc.pImageInfo[i].sampler != VK_NULL_HANDLE) ||
|
||||
(layout.bindings[writeDesc.dstBinding].immutableSampler &&
|
||||
layout.bindings[writeDesc.dstBinding].immutableSampler[i] != ResourceId());
|
||||
valid &= (writeDesc.pImageInfo[i].imageView != VK_NULL_HANDLE);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user