mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
refactor: Simplify handles destroy
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8ec5688ca1
commit
c1df81c9be
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user