From 61c6d88b7de9862062800585d8bc8bd848cee1e0 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 12 Aug 2020 11:51:59 +0100 Subject: [PATCH] Update reftype on rollover from one binding to another * When we roll over from one binding to another due to descriptor count being larger than a single binding, we need to update the frame reftype since it might go from storage to sampled or vice-versa and so change from read-only to read-write. --- renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp index d67437ab3..d3c5c3a93 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp @@ -1111,6 +1111,8 @@ void WrappedVulkan::vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, layoutBinding++; binding++; curIdx = 0; + + ref = GetRefType(layoutBinding->descriptorType); } DescriptorSetSlot &bind = (*binding)[curIdx]; @@ -1224,6 +1226,8 @@ void WrappedVulkan::vkUpdateDescriptorSets(VkDevice device, uint32_t writeCount, dstlayoutBinding++; dstbinding++; curDstIdx = 0; + + ref = GetRefType(dstlayoutBinding->descriptorType); } // dst and src indices must roll-over independently @@ -1526,6 +1530,8 @@ void WrappedVulkan::vkUpdateDescriptorSetWithTemplate( layoutBinding++; binding++; curIdx = 0; + + ref = GetRefType(layoutBinding->descriptorType); } const byte *src = (const byte *)pData + entry.offset + entry.stride * d;