mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Resetting command pools should free in-flight recording pages
* Command buffers that have grabbed pages in their allocators should have those pages freed if the pool is reset and the command buffer is never ended.
This commit is contained in:
@@ -782,6 +782,16 @@ VkResult WrappedVulkan::vkResetCommandPool(VkDevice device, VkCommandPool cmdPoo
|
||||
if(Atomic::CmpExch32(&m_ReuseEnabled, 1, 1) == 1)
|
||||
GetRecord(cmdPool)->cmdPoolInfo->pool.Reset();
|
||||
|
||||
{
|
||||
VkResourceRecord *poolRecord = GetRecord(cmdPool);
|
||||
poolRecord->LockChunks();
|
||||
for(auto it = poolRecord->pooledChildren.begin(); it != poolRecord->pooledChildren.end(); ++it)
|
||||
{
|
||||
(*it)->cmdInfo->alloc.Reset();
|
||||
}
|
||||
poolRecord->UnlockChunks();
|
||||
}
|
||||
|
||||
return ObjDisp(device)->ResetCommandPool(Unwrap(device), Unwrap(cmdPool), flags);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user