diff options
author | Jan Vesely <jano.vesely@gmail.com> | 2018-11-21 23:21:08 -0500 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2018-12-02 01:29:58 -0500 |
commit | 900a0bdf985d8e225c3d157d2c1ac635ae454b63 (patch) | |
tree | c2237bff13a4880d0411c206d4520768d1ea9894 | |
parent | ed51ecceef27c4384c32c9339a1c26a47e755045 (diff) |
cl: Wait for kernel execution instead of flushing the queue in cl_piglit_execute kernel
This prevents race condition when a failed kernel launch would no longer
be in the command queue by the time we call clFinish.
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Tested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
-rw-r--r-- | tests/util/piglit-util-cl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/util/piglit-util-cl.c b/tests/util/piglit-util-cl.c index f4def259c..42a5e72f9 100644 --- a/tests/util/piglit-util-cl.c +++ b/tests/util/piglit-util-cl.c @@ -1360,7 +1360,7 @@ piglit_cl_execute_ND_range_kernel(cl_command_queue command_queue, return false; } - errNo = clFinish(command_queue); + errNo = clWaitForEvents(1, &ev); if(!piglit_cl_check_error(errNo, CL_SUCCESS)) { fprintf(stderr, "Could not wait for kernel to finish: %s\n", |