Skip past any undefined descriptor binds when overflowing. Closes #2410

This commit is contained in:
baldurk
2021-11-15 12:02:24 +00:00
parent 9fff431f5a
commit 4d2afdeea7
@@ -776,6 +776,12 @@ void WrappedVulkan::ReplayDescriptorSetWrite(VkDevice device, const VkWriteDescr
{
layoutBinding++;
curIdx = 0;
// skip past invalid padding descriptors to get to the next real one
while(layoutBinding->descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
{
layoutBinding++;
}
}
valid &= (writeDesc.pImageInfo[i].sampler != VK_NULL_HANDLE) ||
@@ -844,6 +850,13 @@ void WrappedVulkan::ReplayDescriptorSetWrite(VkDevice device, const VkWriteDescr
layoutBinding++;
bind++;
curIdx = 0;
// skip past invalid padding descriptors to get to the next real one
while(layoutBinding->descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
{
layoutBinding++;
bind++;
}
}
(*bind)[curIdx].texelBufferView = GetResID(writeDesc.pTexelBufferView[d]);
@@ -864,6 +877,13 @@ void WrappedVulkan::ReplayDescriptorSetWrite(VkDevice device, const VkWriteDescr
layoutBinding++;
bind++;
curIdx = 0;
// skip past invalid padding descriptors to get to the next real one
while(layoutBinding->descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
{
layoutBinding++;
bind++;
}
}
bool sampler = true;
@@ -900,6 +920,13 @@ void WrappedVulkan::ReplayDescriptorSetWrite(VkDevice device, const VkWriteDescr
layoutBinding++;
bind++;
curIdx = 0;
// skip past invalid padding descriptors to get to the next real one
while(layoutBinding->descriptorType == VK_DESCRIPTOR_TYPE_MAX_ENUM)
{
layoutBinding++;
bind++;
}
}
(*bind)[curIdx].bufferInfo.SetFrom(writeDesc.pBufferInfo[d]);