Fix descriptor write rollover to skip padding binds. Closes #2231

This commit is contained in:
baldurk
2021-04-12 19:48:39 +01:00
parent b9f9874c06
commit 1145447645
@@ -1243,6 +1243,13 @@ void WrappedVulkan::vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount,
binding++;
curIdx = 0;
// skip past invalid padding descriptors to get to the next real one
while(layoutBinding->descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
{
layoutBinding++;
binding++;
}
ref = GetRefType(layoutBinding->descriptorType);
}
@@ -1649,6 +1656,13 @@ void WrappedVulkan::vkUpdateDescriptorSetWithTemplate(
binding++;
curIdx = 0;
// skip past invalid padding descriptors to get to the next real one
while(layoutBinding->descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
{
layoutBinding++;
binding++;
}
ref = GetRefType(layoutBinding->descriptorType);
}