mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
feature: Propagate error from makeResident to caller
Have makeResident return error to the caller, instead of always SUCCESS. This will allow interfaces like zeContextMakeMemoryResident to fail properly. Additionally, change the parsing of MemoryOperationsStatus from ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY to ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY, since when making resources resident, it is the device running out of memory, instead of the host. Related-To: LOCI-4443 Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ded9d7bff2
commit
37ed03a15c
@@ -28,11 +28,15 @@ DrmMemoryOperationsHandlerBind::~DrmMemoryOperationsHandlerBind() = default;
|
||||
|
||||
MemoryOperationsStatus DrmMemoryOperationsHandlerBind::makeResident(Device *device, ArrayRef<GraphicsAllocation *> gfxAllocations) {
|
||||
auto &engines = device->getAllEngines();
|
||||
MemoryOperationsStatus result = MemoryOperationsStatus::SUCCESS;
|
||||
for (const auto &engine : engines) {
|
||||
engine.commandStreamReceiver->initializeResources();
|
||||
this->makeResidentWithinOsContext(engine.osContext, gfxAllocations, false);
|
||||
result = this->makeResidentWithinOsContext(engine.osContext, gfxAllocations, false);
|
||||
if (result != MemoryOperationsStatus::SUCCESS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MemoryOperationsStatus::SUCCESS;
|
||||
return result;
|
||||
}
|
||||
|
||||
MemoryOperationsStatus DrmMemoryOperationsHandlerBind::makeResidentWithinOsContext(OsContext *osContext, ArrayRef<GraphicsAllocation *> gfxAllocations, bool evictable) {
|
||||
|
||||
Reference in New Issue
Block a user