mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
feature: support explicit memory locking
Added lockMemory in context to explicitly locking memory, Added a boolean flag in graphics_allocation to indicate the allocation is locked, and modified memory_operations_handler to add lock(). Change the logic to work correctly with makeResident() when lock() is called previously for the same memory region Related-To: NEO-8277 Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d41f508e43
commit
27a3307bb0
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -69,6 +69,10 @@ MemoryOperationsStatus AubMemoryOperationsHandler::makeResident(Device *device,
|
||||
return MemoryOperationsStatus::success;
|
||||
}
|
||||
|
||||
MemoryOperationsStatus AubMemoryOperationsHandler::lock(Device *device, ArrayRef<GraphicsAllocation *> gfxAllocations) {
|
||||
return makeResident(device, gfxAllocations);
|
||||
}
|
||||
|
||||
MemoryOperationsStatus AubMemoryOperationsHandler::evict(Device *device, GraphicsAllocation &gfxAllocation) {
|
||||
auto lock = acquireLock(resourcesLock);
|
||||
auto itor = std::find(residentAllocations.begin(), residentAllocations.end(), &gfxAllocation);
|
||||
|
||||
Reference in New Issue
Block a user