Fix unwrap of inline uniform block descriptor writes

* We don't unwrap any of the data but we must still unwrap the descriptor set.
This commit is contained in:
baldurk
2020-09-25 10:51:12 +01:00
parent 8b2a521a91
commit 2ea17af719
@@ -100,10 +100,6 @@ VkWriteDescriptorSet WrappedVulkan::UnwrapInfo(const VkWriteDescriptorSet *write
{
VkWriteDescriptorSet ret = *writeDesc;
// nothing to unwrap for inline uniform block
if(ret.descriptorType == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT)
return ret;
byte *memory = GetTempMemory(sizeof(VkDescriptorBufferInfo) * writeDesc->descriptorCount);
VkDescriptorBufferInfo *bufInfos = (VkDescriptorBufferInfo *)memory;
@@ -112,6 +108,10 @@ VkWriteDescriptorSet WrappedVulkan::UnwrapInfo(const VkWriteDescriptorSet *write
ret.dstSet = Unwrap(ret.dstSet);
// nothing to unwrap for inline uniform block
if(ret.descriptorType == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT)
return ret;
RDCCOMPILE_ASSERT(sizeof(VkDescriptorBufferInfo) >= sizeof(VkDescriptorImageInfo),
"Structure sizes mean not enough space is allocated for write data");
RDCCOMPILE_ASSERT(sizeof(VkDescriptorBufferInfo) >= sizeof(VkBufferView),