mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-23 18:30:44 +00:00
De-race condition descriptor and memory releasing
This commit is contained in:
@@ -315,16 +315,13 @@ VkResult WrappedVulkan::vkFreeDescriptorSets(
|
||||
for(uint32_t i=0; i < count; i++)
|
||||
unwrapped[i] = Unwrap(pDescriptorSets[i]);
|
||||
|
||||
for(uint32_t i=0; i < count; i++)
|
||||
GetResourceManager()->ReleaseWrappedResource(pDescriptorSets[i]);
|
||||
|
||||
VkResult ret = ObjDisp(device)->FreeDescriptorSets(Unwrap(device), Unwrap(descriptorPool), count, unwrapped);
|
||||
|
||||
SAFE_DELETE_ARRAY(unwrapped);
|
||||
|
||||
if(ret == VK_SUCCESS)
|
||||
{
|
||||
for(uint32_t i=0; i < count; i++)
|
||||
GetResourceManager()->ReleaseWrappedResource(pDescriptorSets[i]);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,11 +122,12 @@ VkResult WrappedVulkan::vkFreeMemory(
|
||||
// we just need to clean up after ourselves on replay
|
||||
WrappedVkNonDispRes *wrapped = (WrappedVkNonDispRes *)GetWrapped(mem);
|
||||
m_MemoryInfo.erase(wrapped->id);
|
||||
VkResult res = ObjDisp(device)->FreeMemory(Unwrap(device), wrapped->real.As<VkDeviceMemory>());
|
||||
|
||||
VkDeviceMemory unwrappedMem = wrapped->real.As<VkDeviceMemory>();
|
||||
|
||||
GetResourceManager()->ReleaseWrappedResource(mem);
|
||||
|
||||
return res;
|
||||
return ObjDisp(device)->FreeMemory(Unwrap(device), unwrappedMem);
|
||||
}
|
||||
|
||||
VkResult WrappedVulkan::vkMapMemory(
|
||||
|
||||
Reference in New Issue
Block a user