mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Fix clSVMAlloc function: use device from context
Related-To: NEO-4000 Change-Id: Iefad9d7a8908a584b98801bdbe13aa1e0be2e47f Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
dfc50f3a75
commit
73dad03c66
@@ -3971,15 +3971,13 @@ void *CL_API_CALL clSVMAlloc(cl_context context,
|
||||
"size", size,
|
||||
"alignment", alignment);
|
||||
void *pAlloc = nullptr;
|
||||
auto pPlatform = platform();
|
||||
auto pDevice = pPlatform->getDevice(0);
|
||||
|
||||
Context *pContext = nullptr;
|
||||
|
||||
if (validateObjects(WithCastToInternal(context, &pContext), pDevice) != CL_SUCCESS) {
|
||||
if (validateObjects(WithCastToInternal(context, &pContext)) != CL_SUCCESS) {
|
||||
TRACING_EXIT(clSVMAlloc, &pAlloc);
|
||||
return pAlloc;
|
||||
}
|
||||
auto pDevice = pContext->getDevice(0);
|
||||
|
||||
if (flags == 0) {
|
||||
flags = CL_MEM_READ_WRITE;
|
||||
|
||||
Reference in New Issue
Block a user