From: Jan Vesely Date: Wed, 25 Jul 2018 02:17:28 +0000 (-0400) Subject: clover: Reduce wait_count in abort path. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e8b8e0878fc6342d6530fdaa04239315f511c50;p=mesa.git clover: Reduce wait_count in abort path. Trigger waiter condition variable. Passes 'events' CTS on carrizo and turks. v2: reduce to 0 Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Jan Vesely Reviewed-by: Francisco Jerez --- diff --git a/src/gallium/state_trackers/clover/core/event.cpp b/src/gallium/state_trackers/clover/core/event.cpp index b7eb33dbfc8..3d313ce8969 100644 --- a/src/gallium/state_trackers/clover/core/event.cpp +++ b/src/gallium/state_trackers/clover/core/event.cpp @@ -41,7 +41,7 @@ event::trigger_self() { std::lock_guard lock(mutex); std::vector> evs; - if (!--_wait_count) + if (_wait_count && !--_wait_count) std::swap(_chain, evs); cv.notify_all(); @@ -65,8 +65,10 @@ event::abort_self(cl_int status) { std::vector> evs; _status = status; + _wait_count = 0; std::swap(_chain, evs); + cv.notify_all(); return evs; }