Cycles: Error enqueueing split kernels should no longer cause infinite loop

This commit is contained in:
Sergey Sharybin 2015-07-03 12:13:02 +02:00
parent 145ab8c49e
commit c864f5d140

@ -2849,7 +2849,8 @@ public:
/* Macro for Enqueuing split kernels. */ /* Macro for Enqueuing split kernels. */
#define GLUE(a, b) a ## b #define GLUE(a, b) a ## b
#define ENQUEUE_SPLIT_KERNEL(kernelName, globalSize, localSize) \ #define ENQUEUE_SPLIT_KERNEL(kernelName, globalSize, localSize) \
opencl_assert(clEnqueueNDRangeKernel(cqCommandQueue, \ { \
ciErr = clEnqueueNDRangeKernel(cqCommandQueue, \
GLUE(ckPathTraceKernel_, \ GLUE(ckPathTraceKernel_, \
kernelName), \ kernelName), \
2, \ 2, \
@ -2858,7 +2859,15 @@ public:
localSize, \ localSize, \
0, \ 0, \
NULL, \ NULL, \
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 ckPathTraceKernel_data_init kernel. */
ENQUEUE_SPLIT_KERNEL(data_init, global_size, local_size); ENQUEUE_SPLIT_KERNEL(data_init, global_size, local_size);