zink: move scanout sync to end of batch
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 20 Apr 2021 18:42:29 +0000 (14:42 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 21 Apr 2021 14:18:17 +0000 (14:18 +0000)
commitdd8b15b2bbe9a115f4df921449234cc12ea63f31
tree2828962d239d7c6147c3144c43e2f1bbeb89d4c9
parent82710b8fc4fbdb08da7db02f8a64fadb8d43525f
zink: move scanout sync to end of batch

this is called from the non-deferred flush path, which means it should always
be triggering work, which means it will always result in a queue submission

instead of relying on the pipe_context::flush hook to be triggered, which is
not a guarantee, do scanout sync during queue submission to ensure that scanout
objects are always in sync

Fixes: 104603fa763 ("zink: create separate linear tiling image for scanout")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10358>
src/gallium/drivers/zink/zink_batch.c
src/gallium/drivers/zink/zink_context.c