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 <jan.vesely@rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
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();
std::vector<intrusive_ref<event>> evs;
_status = status;
+ _wait_count = 0;
std::swap(_chain, evs);
+ cv.notify_all();
return evs;
}