Add debug flag to skip freeing resources.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2021-08-06 12:57:10 +00:00
committed by Compute-Runtime-Automation
parent 0d11b51c6b
commit 8a506457d7
4 changed files with 16 additions and 1 deletions

View File

@@ -728,6 +728,9 @@ void DrmMemoryManager::removeAllocationFromHostPtrManager(GraphicsAllocation *gf
}
void DrmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation) {
if (DebugManager.flags.DoNotFreeResources.get()) {
return;
}
DrmAllocation *drmAlloc = static_cast<DrmAllocation *>(gfxAllocation);
this->unregisterAllocation(gfxAllocation);