Revision: 44278
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44278
Author:   blendix
Date:     2012-02-20 14:19:34 +0000 (Mon, 20 Feb 2012)
Log Message:
-----------
Fix: cycles crash with multiple OpenCL platforms installed, tracked down by 
Sergey.

Modified Paths:
--------------
    trunk/blender/intern/cycles/device/device_opencl.cpp

Modified: trunk/blender/intern/cycles/device/device_opencl.cpp
===================================================================
--- trunk/blender/intern/cycles/device/device_opencl.cpp        2012-02-20 
14:18:14 UTC (rev 44277)
+++ trunk/blender/intern/cycles/device/device_opencl.cpp        2012-02-20 
14:19:34 UTC (rev 44278)
@@ -165,7 +165,7 @@
                        return;
                }
 
-               ciErr = clGetPlatformIDs(num_platforms, &cpPlatform, NULL);
+               ciErr = clGetPlatformIDs(1, &cpPlatform, NULL);
                if(opencl_error(ciErr))
                        return;
 
@@ -709,7 +709,7 @@
        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)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to