fix: handle failure on getting CL_MEM_ALLOCATION_HANDLE_INTEL info

Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-10-10 17:05:39 +00:00
committed by Compute-Runtime-Automation
parent 5558222337
commit 61f0c79c24
3 changed files with 62 additions and 2 deletions

View File

@@ -200,11 +200,15 @@ cl_int MemObj::getMemObjectInfo(cl_mem_info paramName,
srcParam = &refCnt;
break;
case CL_MEM_ALLOCATION_HANDLE_INTEL:
multiGraphicsAllocation.getDefaultGraphicsAllocation()->peekInternalHandle(this->memoryManager, internalHandle);
case CL_MEM_ALLOCATION_HANDLE_INTEL: {
auto retVal = multiGraphicsAllocation.getDefaultGraphicsAllocation()->peekInternalHandle(this->memoryManager, internalHandle);
if (retVal != 0) {
internalHandle = 0;
}
srcParamSize = sizeof(internalHandle);
srcParam = &internalHandle;
break;
}
case CL_MEM_USES_COMPRESSION_INTEL:
usesCompression = allocation->isCompressionEnabled();