From: Jan Vesely <[email protected]>
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 <[email protected]>
---
tests/util/piglit-util-cl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/util/piglit-util-cl.c b/tests/util/piglit-util-cl.c
index f4def259cc..42a5e72f92 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",
--
2.18.1
_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit