From 123f007642f137429d3af9272e91d3ed5fe7ac41 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Sun, 15 May 2016 16:50:31 -0400 Subject: cl: add support for global offset Signed-off-by: Jan Vesely Reviewed-by: Serge Martin --- tests/util/piglit-util-cl.c | 7 +++++-- tests/util/piglit-util-cl.h | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/util') diff --git a/tests/util/piglit-util-cl.c b/tests/util/piglit-util-cl.c index 51d680825..7e7d9850b 100644 --- a/tests/util/piglit-util-cl.c +++ b/tests/util/piglit-util-cl.c @@ -1263,14 +1263,15 @@ piglit_cl_set_kernel_buffer_arg(cl_kernel kernel, cl_uint arg_index, bool piglit_cl_enqueue_ND_range_kernel(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, + const size_t* global_offset, const size_t* global_work_size, const size_t* local_work_size) { cl_int errNo; errNo = clEnqueueNDRangeKernel(command_queue, kernel, work_dim, - NULL, global_work_size, local_work_size, - 0, NULL, NULL); + global_offset, global_work_size, + local_work_size, 0, NULL, NULL); if(!piglit_cl_check_error(errNo, CL_SUCCESS)) { fprintf(stderr, "Could not enqueue ND range kernel: %s\n", @@ -1284,6 +1285,7 @@ piglit_cl_enqueue_ND_range_kernel(cl_command_queue command_queue, bool piglit_cl_execute_ND_range_kernel(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, + const size_t* global_offset, const size_t* global_work_size, const size_t* local_work_size) { @@ -1292,6 +1294,7 @@ piglit_cl_execute_ND_range_kernel(cl_command_queue command_queue, if(!piglit_cl_enqueue_ND_range_kernel(command_queue, kernel, work_dim, + global_offset, global_work_size, local_work_size)) { return false; diff --git a/tests/util/piglit-util-cl.h b/tests/util/piglit-util-cl.h index e4730ccba..9fb4f9fda 100644 --- a/tests/util/piglit-util-cl.h +++ b/tests/util/piglit-util-cl.h @@ -704,6 +704,7 @@ piglit_cl_set_kernel_buffer_arg(cl_kernel kernel, * @param command_queue Command queue to enqueue operation on. * @param kernel Kernel to be enqueued. * @param work_dim Work dimensions. + * @param global_offset Global offset. * @param global_work_size Global work sizes. * @param local_work_size Local work sizes. * @return \c true on succes, \c false otherwise. @@ -712,6 +713,7 @@ bool piglit_cl_enqueue_ND_range_kernel(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, + const size_t* global_offset, const size_t* global_work_size, const size_t* local_work_size); @@ -721,6 +723,7 @@ piglit_cl_enqueue_ND_range_kernel(cl_command_queue command_queue, * @param command_queue Command queue to enqueue operation on. * @param kernel Kernel to be enqueued. * @param work_dim Work dimensions. + * @param global_offset Global offset. * @param global_work_size Global work sizes. * @param local_work_size Local work sizes. * @return \c true on succes, \c false otherwise. @@ -729,6 +732,7 @@ bool piglit_cl_execute_ND_range_kernel(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, + const size_t* global_offset, const size_t* global_work_size, const size_t* local_work_size); -- cgit v1.2.3