st/mesa: disallow deferred flush if there are multiple contexts
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 16 Mar 2020 14:10:23 +0000 (15:10 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 18 Mar 2020 20:01:57 +0000 (20:01 +0000)
commite7f3a8d6959c74f63c877dd8776fe519d54f946f
tree46d5ae5fca87f067b7412be4c7b45a3be94c8cf4
parent6ee971c8823d23e70ba34088fa5e9fd20eba2047
st/mesa: disallow deferred flush if there are multiple contexts

u_threaded can hang in these situation, with one context waiting on a
deferred fence from the other context.
But the other context isn't flushing its pending work (because it's waiting
for more work to pushed) so everything is stuck.

Fixes: d17b35e671a ("gallium: add PIPE_FLUSH_DEFERRED")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1430
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4213>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4213>
src/mesa/state_tracker/st_cb_syncobj.c