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.
This commit is contained in:
baldurk
2020-08-12 15:15:33 +01:00
parent d274599880
commit 61c6d88b7d
@@ -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;