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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-10-29 18:37:38 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-10-29 18:37:38 +0300
commit6005bb58464361871fb6cd37275799e1aa225a54 (patch)
tree410549b6aa79fd20dbfb3f67e258b1705956b876 /extern/clew/src/clew.c
parent324d20bc643d3b80c861669b26820725f7f367a8 (diff)
OpenCL wrangler: Update to latest version to fix issues with -1001 error code
Diffstat (limited to 'extern/clew/src/clew.c')
-rw-r--r--extern/clew/src/clew.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/extern/clew/src/clew.c b/extern/clew/src/clew.c
index 8c9316d3c9c..e3adabd829c 100644
--- a/extern/clew/src/clew.c
+++ b/extern/clew/src/clew.c
@@ -378,5 +378,15 @@ const char* clewErrorString(cl_int error)
, "CL_INVALID_DEVICE_PARTITION_COUNT" // -68
};
+ static const int num_errors = sizeof(strings) / sizeof(strings[0]);
+
+ if (error == -1001) {
+ return "CL_PLATFORM_NOT_FOUND_KHR";
+ }
+
+ if (error > 0 || -error >= num_errors) {
+ return "Unknown OpenCL error";
+ }
+
return strings[-error];
}