mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Handle OS-managed allocations in clGetMemAllocInfoINTEL
Change-Id: I9750bcc05f01aef3973cfac4f10e7d4d9d667bed Related-To: NEO-3524
This commit is contained in:

committed by
sys_ocldev

parent
d9e02697bf
commit
eea2a4451a
@ -3481,14 +3481,17 @@ cl_int clGetMemAllocInfoINTEL(
|
||||
}
|
||||
|
||||
auto unifiedMemoryAllocation = allocationsManager->getSVMAlloc(ptr);
|
||||
if (!unifiedMemoryAllocation) {
|
||||
if (!unifiedMemoryAllocation && paramName != CL_MEM_ALLOC_TYPE_INTEL) {
|
||||
return CL_INVALID_VALUE;
|
||||
}
|
||||
|
||||
GetInfoHelper info(paramValue, paramValueSize, paramValueSizeRet);
|
||||
switch (paramName) {
|
||||
case CL_MEM_ALLOC_TYPE_INTEL: {
|
||||
if (unifiedMemoryAllocation->memoryType == InternalMemoryType::HOST_UNIFIED_MEMORY) {
|
||||
if (!unifiedMemoryAllocation) {
|
||||
retVal = info.set<cl_int>(CL_MEM_TYPE_UNKNOWN_INTEL);
|
||||
return retVal;
|
||||
} else if (unifiedMemoryAllocation->memoryType == InternalMemoryType::HOST_UNIFIED_MEMORY) {
|
||||
retVal = info.set<cl_int>(CL_MEM_TYPE_HOST_INTEL);
|
||||
return retVal;
|
||||
} else if (unifiedMemoryAllocation->memoryType == InternalMemoryType::DEVICE_UNIFIED_MEMORY) {
|
||||
|
Reference in New Issue
Block a user