Add support for write combined in unified memory

Related-To: NEO-3374
Change-Id: I610ad2d71b056f2bc5b8f4bda72e7f08a45cf59d
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2019-12-10 15:33:57 +01:00
committed by sys_ocldev
parent 2c84c143e6
commit 03252ee9fe
4 changed files with 121 additions and 5 deletions

View File

@@ -3457,6 +3457,11 @@ void *clHostMemAllocINTEL(
return nullptr;
}
if (isValueSet(unifiedMemoryProperties.allocationFlags.allAllocFlags, CL_MEM_ALLOC_WRITE_COMBINED_INTEL)) {
err.set(CL_INVALID_VALUE);
return nullptr;
}
return neoContext->getSVMAllocsManager()->createUnifiedMemoryAllocation(neoContext->getDevice(0)->getRootDeviceIndex(), size, unifiedMemoryProperties);
}
@@ -3531,6 +3536,11 @@ void *clSharedMemAllocINTEL(
}
unifiedMemoryProperties.device = device;
if (isValueSet(unifiedMemoryProperties.allocationFlags.allAllocFlags, CL_MEM_ALLOC_WRITE_COMBINED_INTEL)) {
err.set(CL_INVALID_VALUE);
return nullptr;
}
return neoContext->getSVMAllocsManager()->createSharedUnifiedMemoryAllocation(neoContext->getDevice(0)->getRootDeviceIndex(), size, unifiedMemoryProperties, neoContext->getSpecialQueue());
}