radeonsi: fix fence_server_sync() holding up extra work v2
authorAndres Rodriguez <andresx7@gmail.com>
Wed, 20 Dec 2017 00:31:41 +0000 (19:31 -0500)
committerAndres Rodriguez <andresx7@gmail.com>
Tue, 30 Jan 2018 20:13:49 +0000 (15:13 -0500)
commit50b06cbc10dbca1dfee89b529ba9b564cc4ea6f6
treedfa26f5cd7894174c12c1b5abb67684120a002c1
parente0f16ee6663ee2dc71e49c59f27e087700740dfa
radeonsi: fix fence_server_sync() holding up extra work v2

When calling si_fence_server_sync(), the wait operation is associated
with the next kernel submission. Therefore, any unflushed work
submitted previous to fence_server_sync() will also be affected by
the wait.

To avoid adding the dependency to the unflushed work, we flush before
emitting the fence dependency.

v2: s/semaphore/fence

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_fence.c
src/gallium/drivers/radeonsi/si_get.c