mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-10 16:09:09 +00:00
Command buffers should go through ReleaseWrappedResource
This commit is contained in:
1 parent
89c4676f9c
commit
23ffd5df1b
1 file changed
+7
-2
@@ -1074,7 +1074,7 @@ DESTROY_IMPL(VkSwapChainWSI, DestroySwapChainWSI)
|
||||
VkResult WrappedVulkan::vkDestroyCommandBuffer(VkDevice device, VkCmdBuffer obj)
|
||||
{
|
||||
WrappedVkDispRes *wrapped = (WrappedVkDispRes *)GetWrapped(obj);
|
||||
GetResourceManager()->MarkCleanResource(wrapped->id);
|
||||
|
||||
if(wrapped->record)
|
||||
{
|
||||
if(wrapped->record->bakedCommands)
|
||||
@@ -1083,8 +1083,13 @@ VkResult WrappedVulkan::vkDestroyCommandBuffer(VkDevice device, VkCmdBuffer obj)
|
||||
wrapped->record->bakedCommands = NULL;
|
||||
}
|
||||
wrapped->record->Delete(GetResourceManager());
|
||||
wrapped->record = NULL;
|
||||
}
|
||||
return ObjDisp(device)->DestroyCommandBuffer(Unwrap(device), wrapped->real.As<VkCmdBuffer>());
|
||||
VkResult ret = ObjDisp(device)->DestroyCommandBuffer(Unwrap(device), wrapped->real.As<VkCmdBuffer>());
|
||||
|
||||
GetResourceManager()->ReleaseWrappedResource(obj);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user