Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-08-17 11:09:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-17 11:09:07 +0400
commit1b11428101d390e482f6a67adba27f42cda7f4a8 (patch)
tree087d15d1ca62ccf81cefbf3f35e30fe18a0184c9 /source/blender/compositor/intern/COM_WorkScheduler.cpp
parentd7cc2be2b7820a0967135e6bc7043e586a0c0dd3 (diff)
fix for crash in compositor/opencl, the error value of -1001 would read past the error-string array.
Diffstat (limited to 'source/blender/compositor/intern/COM_WorkScheduler.cpp')
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 1bac06fc4ab..330e61e7fea 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -313,7 +313,8 @@ void WorkScheduler::initialize(bool use_opencl)
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);