refactor: Simplify handles destroy

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2025-04-24 09:53:43 +00:00
committed by Compute-Runtime-Automation
parent 8ec5688ca1
commit c1df81c9be

View File

@@ -778,10 +778,8 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation
[[maybe_unused]] auto status = tryDeferDeletions(nullptr, 0, input->getResourceHandle(), gfxAllocation->getRootDeviceIndex(), gfxAllocation->getAllocationType());
DEBUG_BREAK_IF(!status);
} else {
for (auto handle : input->getHandles()) {
[[maybe_unused]] auto status = tryDeferDeletions(&handle, 1, 0, gfxAllocation->getRootDeviceIndex(), gfxAllocation->getAllocationType());
DEBUG_BREAK_IF(!status);
}
[[maybe_unused]] auto status = tryDeferDeletions(input->getHandles().data(), static_cast<uint32_t>(input->getHandles().size()), 0, gfxAllocation->getRootDeviceIndex(), gfxAllocation->getAllocationType());
DEBUG_BREAK_IF(!status);
}
alignedFreeWrapper(input->getDriverAllocatedCpuPtr());