clover: Run the associated action before an event is signalled.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 9 Jun 2015 19:59:43 +0000 (22:59 +0300)
committerJan Vesely <jan.vesely@rutgers.edu>
Wed, 20 Sep 2017 22:48:41 +0000 (18:48 -0400)
commitbc4000ee40c78efe1e5e8a6244d4bb55389d8418
tree54e58efa118b9e65ff4184a8c402d62e7b19487b
parent02f8ac6b70033a1b240d497c4664c359d2398cc3
clover: Run the associated action before an event is signalled.

And define a method for other threads to wait until the action
function associated with an event has been executed to completion.

For hard events, this will mean waiting until the corresponding
command has been submitted to the pipe driver, without necessarily
flushing the pipe_context and waiting for the actual command to be
processed by the GPU (which is what hard_event::wait() already does).

This weaker kind of event wait will allow implementing blocking memory
transfers efficiently.

Acked-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/state_trackers/clover/core/event.cpp
src/gallium/state_trackers/clover/core/event.hpp