Skip to content

Commit

Permalink
Fix sampler-only slots with immutable samplers in vulkan shader debug
Browse files Browse the repository at this point in the history
  • Loading branch information
AirGuanZ authored and baldurk committed Jan 30, 2023
1 parent 9eaabe5 commit b683815
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion renderdoc/driver/vulkan/vk_shaderdebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,14 @@ class VulkanAPIWrapper : public rdcspv::DebugAPIWrapper
{
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:
Expand Down

0 comments on commit b683815

Please sign in to comment.