The OpenCL spec says: "Any blocking commands queued in a command-queue and clReleaseCommandQueue perform an implicit flush of the command-queue. These blocking commands are [...] or clWaitForEvents."
Flushing the queue unconditionally also helps to actually clear the queued_events list of the queue object. Signed-off-by: Niels Ole Salscheider <niels_...@salscheider-online.de> --- src/gallium/state_trackers/clover/core/event.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/clover/core/event.cpp b/src/gallium/state_trackers/clover/core/event.cpp index cbb97bf..8b5acd0 100644 --- a/src/gallium/state_trackers/clover/core/event.cpp +++ b/src/gallium/state_trackers/clover/core/event.cpp @@ -153,8 +153,7 @@ void hard_event::wait() const { pipe_screen *screen = queue()->dev.pipe; - if (status() == CL_QUEUED) - queue()->flush(); + queue()->flush(); if (!__fence || !screen->fence_finish(screen, __fence, PIPE_TIMEOUT_INFINITE)) -- 1.8.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev