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:
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];
}