mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Use immutable samplers when checking for validity
* Fortunately the sampler element in the write is ignored when doing the actual update so it's safe to write these in before the validity check.
This commit is contained in:
@@ -708,6 +708,8 @@ bool WrappedVulkan::Serialise_InitialState(SerialiserType &ser, ResourceId id, W
|
||||
|
||||
uint32_t descriptorCount = layout.bindings[j].descriptorCount;
|
||||
|
||||
ResourceId *immutableSamplers = layout.bindings[j].immutableSampler;
|
||||
|
||||
DescriptorSetSlot *src = srcData;
|
||||
srcData += descriptorCount;
|
||||
|
||||
@@ -753,6 +755,13 @@ bool WrappedVulkan::Serialise_InitialState(SerialiserType &ser, ResourceId id, W
|
||||
for(uint32_t d = 0; d < descriptorCount; d++)
|
||||
dstImage[d] = src[d].imageInfo;
|
||||
|
||||
if(immutableSamplers)
|
||||
{
|
||||
for(uint32_t d = 0; d < descriptorCount; d++)
|
||||
dstImage[d].sampler =
|
||||
GetResourceManager()->GetCurrentHandle<VkSampler>(immutableSamplers[d]);
|
||||
}
|
||||
|
||||
writes[bind].pImageInfo = dstImage;
|
||||
// NULL the others
|
||||
dstBuffer = NULL;
|
||||
|
||||
Reference in New Issue
Block a user