[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59200] trunk/blender/source/blender/ compositor/intern/COM_WorkScheduler.cpp: fix for crash in compositor/opencl , the error value of -1001 would read past the error-string array.
Campbell Barton
ideasman42 at gmail.com
Sat Aug 17 09:09:07 CEST 2013
Revision: 59200
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59200
Author: campbellbarton
Date: 2013-08-17 07:09:07 +0000 (Sat, 17 Aug 2013)
Log Message:
-----------
fix for crash in compositor/opencl, the error value of -1001 would read past the error-string array.
Modified Paths:
--------------
trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
Modified: trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp 2013-08-17 05:33:55 UTC (rev 59199)
+++ trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp 2013-08-17 07:09:07 UTC (rev 59200)
@@ -313,7 +313,8 @@
cl_uint numberOfPlatforms = 0;
cl_int error;
error = clGetPlatformIDs(0, 0, &numberOfPlatforms);
- if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
+ if (error == -1001) { } /* GPU not supported */
+ else if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
if (G.f & G_DEBUG) printf("%d number of platforms\n", numberOfPlatforms);
cl_platform_id *platforms = (cl_platform_id *)MEM_mallocN(sizeof(cl_platform_id) * numberOfPlatforms, __func__);
error = clGetPlatformIDs(numberOfPlatforms, platforms, 0);
More information about the Bf-blender-cvs
mailing list