summaryrefslogtreecommitdiff
path: root/tests/util
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2016-05-15 16:50:31 -0400
committerJan Vesely <jan.vesely@rutgers.edu>2016-05-17 13:35:51 -0400
commit123f007642f137429d3af9272e91d3ed5fe7ac41 (patch)
treebd9741f9d3905bb54954301f04c134dfa710c88a /tests/util
parent290650cf00dae9238804e552feb4751cc4090a58 (diff)
cl: add support for global offset
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
Diffstat (limited to 'tests/util')
-rw-r--r--tests/util/piglit-util-cl.c7
-rw-r--r--tests/util/piglit-util-cl.h4
2 files changed, 9 insertions, 2 deletions
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);