mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:00:01 +08:00
fix: include all devices when creating OCL context from type
Related-To: NEO-15086, GSD-11201 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
04965470fb
commit
88820a414f
@@ -494,12 +494,12 @@ cl_context CL_API_CALL clCreateContextFromType(const cl_context_properties *prop
|
||||
}
|
||||
|
||||
DEBUG_BREAK_IF(numDevices <= 0);
|
||||
cl_device_id device = nullptr;
|
||||
std::vector<cl_device_id> devices(numDevices, nullptr);
|
||||
|
||||
retVal = clGetDeviceIDs(pPlatform, deviceType, 1, &device, nullptr);
|
||||
retVal = clGetDeviceIDs(pPlatform, deviceType, numDevices, devices.data(), nullptr);
|
||||
DEBUG_BREAK_IF(retVal != CL_SUCCESS);
|
||||
|
||||
ClDeviceVector deviceVector(&device, 1);
|
||||
ClDeviceVector deviceVector(devices.data(), numDevices);
|
||||
context = Context::create<Context>(properties, deviceVector, funcNotify, userData, retVal);
|
||||
} while (false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user