mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 21:40:41 +00:00
Handle immutable samplers correctly on writing, they are wrapped already
This commit is contained in:
@@ -317,6 +317,9 @@ class ResourceManager : public ResourceRecordHandler
|
||||
byte *blob;
|
||||
};
|
||||
|
||||
bool IsWriting() { return m_State >= WRITING; }
|
||||
bool IsReading() { return m_State < WRITING; }
|
||||
|
||||
///////////////////////////////////////////
|
||||
// Capture-side methods
|
||||
|
||||
|
||||
@@ -45,7 +45,14 @@ void DescSetLayout::Init(VulkanResourceManager *resourceMan, VulkanCreationInfo
|
||||
bindings[i].immutableSampler = new ResourceId[bindings[i].descriptorCount];
|
||||
|
||||
for(uint32_t s=0; s < bindings[i].descriptorCount; s++)
|
||||
bindings[i].immutableSampler[s] = resourceMan->GetNonDispWrapper(pCreateInfo->pBindings[i].pImmutableSamplers[s])->id;
|
||||
{
|
||||
// during writing, the create info contains the *wrapped* objects.
|
||||
// on replay, we have the wrapper map so we can look it up
|
||||
if(resourceMan->IsWriting())
|
||||
bindings[i].immutableSampler[s] = GetResID(pCreateInfo->pBindings[i].pImmutableSamplers[s]);
|
||||
else
|
||||
bindings[i].immutableSampler[s] = resourceMan->GetNonDispWrapper(pCreateInfo->pBindings[i].pImmutableSamplers[s])->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user