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,16 +2849,25 @@ 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, \ { \
GLUE(ckPathTraceKernel_, \ ciErr = clEnqueueNDRangeKernel(cqCommandQueue, \
kernelName), \ GLUE(ckPathTraceKernel_, \
2, \ kernelName), \
NULL, \ 2, \
globalSize, \ NULL, \
localSize, \ globalSize, \
0, \ localSize, \
NULL, \ 0, \
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);