Fix sampler-only slots with immutable samplers in vulkan shader debug

This commit is contained in:
Z Guan
2023-01-30 17:46:00 +00:00
committed by Baldur Karlsson
parent 9eaabe516a
commit b68381598b
+8 -1
View File
@@ -254,7 +254,14 @@ public:
{
const DescriptorSetSlot &slot = curSlots[i];
switch(slot.type)
// When bind layout contains immutable samplers, sampler-only slots always have type
// DescriptorSlotType::Unwritten. Treat them as sampler slots in that case.
DescriptorSlotType slotType = slot.type;
if(bindLayout.immutableSampler &&
bindLayout.layoutDescType == VK_DESCRIPTOR_TYPE_SAMPLER)
slotType = DescriptorSlotType::Sampler;
switch(slotType)
{
case DescriptorSlotType::Sampler:
case DescriptorSlotType::CombinedImageSampler: