forked from bartvdbraak/blender
Cycles: Correction to opencl whitelist check
Was using platform as a device id accidentally.
This commit is contained in:
parent
1c02a201ba
commit
3a2c0ccdd0
@ -3364,8 +3364,13 @@ void device_opencl_info(vector<DeviceInfo>& devices)
|
|||||||
clGetPlatformInfo(platform_ids[platform], CL_PLATFORM_NAME, sizeof(pname), &pname, NULL);
|
clGetPlatformInfo(platform_ids[platform], CL_PLATFORM_NAME, sizeof(pname), &pname, NULL);
|
||||||
string platform_name = pname;
|
string platform_name = pname;
|
||||||
|
|
||||||
|
/* add devices */
|
||||||
|
for(int num = 0; num < num_devices; num++) {
|
||||||
|
cl_device_id device_id = device_ids[num];
|
||||||
|
char name[1024] = "\0";
|
||||||
|
|
||||||
cl_device_type device_type;
|
cl_device_type device_type;
|
||||||
clGetDeviceInfo(device_ids[platform], CL_DEVICE_TYPE, sizeof(cl_device_type), &device_type, NULL);
|
clGetDeviceInfo(device_id, CL_DEVICE_TYPE, sizeof(cl_device_type), &device_type, NULL);
|
||||||
|
|
||||||
/* TODO(sergey): Make it an utility function to check whitelisted devices. */
|
/* TODO(sergey): Make it an utility function to check whitelisted devices. */
|
||||||
if(!(force_all_platforms ||
|
if(!(force_all_platforms ||
|
||||||
@ -3375,11 +3380,6 @@ void device_opencl_info(vector<DeviceInfo>& devices)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add devices */
|
|
||||||
for(int num = 0; num < num_devices; num++) {
|
|
||||||
cl_device_id device_id = device_ids[num];
|
|
||||||
char name[1024] = "\0";
|
|
||||||
|
|
||||||
if(clGetDeviceInfo(device_id, CL_DEVICE_NAME, sizeof(name), &name, NULL) != CL_SUCCESS)
|
if(clGetDeviceInfo(device_id, CL_DEVICE_NAME, sizeof(name), &name, NULL) != CL_SUCCESS)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user