diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-02-20 18:19:34 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-02-20 18:19:34 +0400 |
commit | dc181ea7e46392fc1b9d7e5999e20d517b7db0d3 (patch) | |
tree | 332d430bef410bde332137d9429fdb857d256ff3 /intern/cycles | |
parent | 5c140486003a85a30b4e35c71ec6f03b8a02d76a (diff) |
Fix: cycles crash with multiple OpenCL platforms installed, tracked down by Sergey.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/device/device_opencl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp index 9a55f957895..c2eee04f3fe 100644 --- a/intern/cycles/device/device_opencl.cpp +++ b/intern/cycles/device/device_opencl.cpp @@ -165,7 +165,7 @@ public: return; } - ciErr = clGetPlatformIDs(num_platforms, &cpPlatform, NULL); + ciErr = clGetPlatformIDs(1, &cpPlatform, NULL); if(opencl_error(ciErr)) return; @@ -709,7 +709,7 @@ void device_opencl_info(vector<DeviceInfo>& devices) if(clGetPlatformIDs(0, NULL, &num_platforms) != CL_SUCCESS || num_platforms == 0) return; - if(clGetPlatformIDs(num_platforms, &platform_id, NULL) != CL_SUCCESS) + if(clGetPlatformIDs(1, &platform_id, NULL) != CL_SUCCESS) return; if(clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_GPU|CL_DEVICE_TYPE_ACCELERATOR, 0, NULL, &num_devices) != CL_SUCCESS) |