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-07-03 13:13:02 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-03 13:13:38 +0300
commitc864f5d14044781cf66bf686a845435d78d0154f (patch)
tree7a267372861e31e02f322e4987efd98380125132 /intern/cycles/device/device_opencl.cpp
parent145ab8c49efe0de188a55f4c682dd5fcf916f105 (diff)
Cycles: Error enqueueing split kernels should no longer cause infinite loop
Diffstat (limited to 'intern/cycles/device/device_opencl.cpp')
-rw-r--r--intern/cycles/device/device_opencl.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 4dd92c3337a..11c16b5f29e 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -2849,16 +2849,25 @@ public:
/* Macro for Enqueuing split kernels. */
#define GLUE(a, b) a ## b
#define ENQUEUE_SPLIT_KERNEL(kernelName, globalSize, localSize) \
- opencl_assert(clEnqueueNDRangeKernel(cqCommandQueue, \
- GLUE(ckPathTraceKernel_, \
- kernelName), \
- 2, \
- NULL, \
- globalSize, \
- localSize, \
- 0, \
- NULL, \
- NULL))
+ { \
+ ciErr = clEnqueueNDRangeKernel(cqCommandQueue, \
+ GLUE(ckPathTraceKernel_, \
+ kernelName), \
+ 2, \
+ NULL, \
+ globalSize, \
+ localSize, \
+ 0, \
+ NULL, \
+ NULL); \
+ opencl_assert_err(ciErr, "clEnqueueNDRangeKernel"); \
+ if(ciErr != CL_SUCCESS) { \
+ string message = string_printf("OpenCL error: %s in clEnqueueNDRangeKernel()", \
+ clewErrorString(ciErr)); \
+ opencl_error(message); \
+ return; \
+ } \
+ } (void) 0
/* Enqueue ckPathTraceKernel_data_init kernel. */
ENQUEUE_SPLIT_KERNEL(data_init, global_size, local_size);