summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vesely <jano.vesely@gmail.com>2018-11-21 23:20:15 -0500
committerJan Vesely <jan.vesely@rutgers.edu>2018-12-02 01:29:58 -0500
commited51ecceef27c4384c32c9339a1c26a47e755045 (patch)
treeb5df4dcc98554cb3098705dd4381a555ee8596e4
parenta96854e3406be69abca77e1e9ce63720e7a3c985 (diff)
cl: Add execution event parameter to piglit_cl_enqueue_kernel
Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Tested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
-rw-r--r--tests/cl/api/create-program-with-binary.c3
-rw-r--r--tests/cl/custom/buffer-flags.c2
-rw-r--r--tests/cl/custom/flush-after-enqueue-kernel.c3
-rw-r--r--tests/cl/custom/r600-create-release-buffer-bug.c9
-rw-r--r--tests/cl/custom/use-sub-buffer-in-kernel.c3
-rw-r--r--tests/util/piglit-util-cl.c9
-rw-r--r--tests/util/piglit-util-cl.h4
7 files changed, 22 insertions, 11 deletions
diff --git a/tests/cl/api/create-program-with-binary.c b/tests/cl/api/create-program-with-binary.c
index 618f4ec29..3f62cd88f 100644
--- a/tests/cl/api/create-program-with-binary.c
+++ b/tests/cl/api/create-program-with-binary.c
@@ -185,7 +185,8 @@ piglit_cl_test(const int argc,
size_t local_work_size = 1;
cl_command_queue queue = ctx->command_queues[i];
if (!piglit_cl_enqueue_ND_range_kernel(queue, kernel, 1, NULL,
- &global_work_size, &local_work_size)) {
+ &global_work_size, &local_work_size,
+ NULL)) {
fprintf(stderr, "Failed to execute binary kernel.");
piglit_merge_result(&result, PIGLIT_FAIL);
}
diff --git a/tests/cl/custom/buffer-flags.c b/tests/cl/custom/buffer-flags.c
index e4466bc9d..a46ce548b 100644
--- a/tests/cl/custom/buffer-flags.c
+++ b/tests/cl/custom/buffer-flags.c
@@ -130,7 +130,7 @@ buffer_test(piglit_cl_context *ctx,
printf("Running the kernel...\n");
if (!piglit_cl_enqueue_ND_range_kernel(context->command_queues[0],
- kernel, 1, NULL, &global, &local)) {
+ kernel, 1, NULL, &global, &local, NULL)) {
ret = PIGLIT_FAIL;
goto cleanup;
}
diff --git a/tests/cl/custom/flush-after-enqueue-kernel.c b/tests/cl/custom/flush-after-enqueue-kernel.c
index 8d3fc8ccd..f1246761e 100644
--- a/tests/cl/custom/flush-after-enqueue-kernel.c
+++ b/tests/cl/custom/flush-after-enqueue-kernel.c
@@ -92,7 +92,8 @@ piglit_cl_test(const int argc,
}
if (!piglit_cl_enqueue_ND_range_kernel(context->command_queues[0],
- kernel, 3, NULL, global_size, local_size)) {
+ kernel, 3, NULL, global_size, local_size,
+ NULL)) {
return PIGLIT_FAIL;
}
diff --git a/tests/cl/custom/r600-create-release-buffer-bug.c b/tests/cl/custom/r600-create-release-buffer-bug.c
index 535e57dbf..262fbce7e 100644
--- a/tests/cl/custom/r600-create-release-buffer-bug.c
+++ b/tests/cl/custom/r600-create-release-buffer-bug.c
@@ -75,7 +75,8 @@ piglit_cl_test(const int argc,
}
if (!piglit_cl_enqueue_ND_range_kernel(queue, kernel, 1, NULL,
- &global_size, &local_size)) {
+ &global_size, &local_size,
+ NULL)) {
return PIGLIT_FAIL;
}
@@ -85,7 +86,8 @@ piglit_cl_test(const int argc,
}
if (!piglit_cl_enqueue_ND_range_kernel(queue, kernel, 1, NULL,
- &global_size, &local_size)) {
+ &global_size, &local_size,
+ NULL)) {
return PIGLIT_FAIL;
}
@@ -99,7 +101,8 @@ piglit_cl_test(const int argc,
}
if (!piglit_cl_enqueue_ND_range_kernel(queue, kernel, 1, NULL,
- &global_size, &local_size)) {
+ &global_size, &local_size,
+ NULL)) {
return PIGLIT_FAIL;
}
diff --git a/tests/cl/custom/use-sub-buffer-in-kernel.c b/tests/cl/custom/use-sub-buffer-in-kernel.c
index 74c085882..57aed3258 100644
--- a/tests/cl/custom/use-sub-buffer-in-kernel.c
+++ b/tests/cl/custom/use-sub-buffer-in-kernel.c
@@ -99,7 +99,8 @@ piglit_cl_test(const int argc,
}
if (!piglit_cl_enqueue_ND_range_kernel(queue, kernel, 1, NULL,
- &global_size, &local_size)) {
+ &global_size, &local_size,
+ NULL)) {
return PIGLIT_FAIL;
}
clFinish(queue);
diff --git a/tests/util/piglit-util-cl.c b/tests/util/piglit-util-cl.c
index 28217724c..f4def259c 100644
--- a/tests/util/piglit-util-cl.c
+++ b/tests/util/piglit-util-cl.c
@@ -1322,13 +1322,14 @@ 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)
+ const size_t* local_work_size,
+ cl_event *ev)
{
cl_int errNo;
errNo = clEnqueueNDRangeKernel(command_queue, kernel, work_dim,
global_offset, global_work_size,
- local_work_size, 0, NULL, NULL);
+ local_work_size, 0, NULL, ev);
if(!piglit_cl_check_error(errNo, CL_SUCCESS)) {
fprintf(stderr,
"Could not enqueue ND range kernel: %s\n",
@@ -1347,13 +1348,15 @@ piglit_cl_execute_ND_range_kernel(cl_command_queue command_queue,
const size_t* local_work_size)
{
int errNo;
+ cl_event ev;
if(!piglit_cl_enqueue_ND_range_kernel(command_queue,
kernel,
work_dim,
global_offset,
global_work_size,
- local_work_size)) {
+ local_work_size,
+ &ev)) {
return false;
}
diff --git a/tests/util/piglit-util-cl.h b/tests/util/piglit-util-cl.h
index ebe1a1e36..afec6609a 100644
--- a/tests/util/piglit-util-cl.h
+++ b/tests/util/piglit-util-cl.h
@@ -734,6 +734,7 @@ piglit_cl_set_kernel_buffer_arg(cl_kernel kernel,
* @param global_offset Global offset.
* @param global_work_size Global work sizes.
* @param local_work_size Local work sizes.
+ * @param ev Location to store execution event.
* @return \c true on succes, \c false otherwise.
*/
bool
@@ -742,7 +743,8 @@ piglit_cl_enqueue_ND_range_kernel(cl_command_queue command_queue,
cl_uint work_dim,
const size_t* global_offset,
const size_t* global_work_size,
- const size_t* local_work_size);
+ const size_t* local_work_size,
+ cl_event *ev);
/**
* \brief Enqueue ND-range kernel and wait it to complete.