summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorJan Vesely <[email protected]>2018-07-24 22:17:28 -0400
committerJan Vesely <[email protected]>2018-07-26 15:38:22 -0400
commit1e8b8e0878fc6342d6530fdaa04239315f511c50 (patch)
tree43917511aebf20887ff74ba21d0fd04c42f33977 /src/gallium/state_trackers
parentc2942141ae69e0a9040139dfddefcaf7f211c75b (diff)
clover: Reduce wait_count in abort path.
Trigger waiter condition variable. Passes 'events' CTS on carrizo and turks. v2: reduce to 0 Cc: [email protected] Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/clover/core/event.cpp4
1 files changed, 3 insertions, 1 deletions
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<std::mutex> lock(mutex);
std::vector<intrusive_ref<event>> 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<intrusive_ref<event>> evs;
_status = status;
+ _wait_count = 0;
std::swap(_chain, evs);
+ cv.notify_all();
return evs;
}