From dc181ea7e46392fc1b9d7e5999e20d517b7db0d3 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 20 Feb 2012 14:19:34 +0000 Subject: Fix: cycles crash with multiple OpenCL platforms installed, tracked down by Sergey. --- intern/cycles/device/device_opencl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'intern') 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& 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) -- cgit v1.2.3