[Mesa-dev] [PATCH] clover: Reduce wait_count in abort path.
Francisco Jerez
currojerez at riseup.net
Wed Jul 25 02:27:32 UTC 2018
Jan Vesely <jan.vesely at rutgers.edu> writes:
> Trigger waiter condition variable.
> Passes 'events' CTS on turks and carrizo.
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
> src/gallium/state_trackers/clover/core/event.cpp | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/clover/core/event.cpp b/src/gallium/state_trackers/clover/core/event.cpp
> index b7eb33dbfc..0de4e2b984 100644
> --- a/src/gallium/state_trackers/clover/core/event.cpp
> +++ b/src/gallium/state_trackers/clover/core/event.cpp
> @@ -65,8 +65,10 @@ event::abort_self(cl_int status) {
> std::vector<intrusive_ref<event>> evs;
>
> _status = status;
> - std::swap(_chain, evs);
> + if (!--_wait_count)
This doesn't look correct to me. The event is being aborted immediately
regardless of its previous _wait_count. You probably just want to set
_wait_count to zero here. The line below should be unconditional for
dependent events to be aborted recursively.
> + std::swap(_chain, evs);
>
> + cv.notify_all();
> return evs;
> }
>
> --
> 2.17.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180724/a66d38a0/attachment.sig>
More information about the mesa-dev
mailing list