virgl: when reading back wait first, then do the transfer
Otherwise the transfer from the host might not be finished
when we try to read the data.
v2: always wait before readback, but also keep the wait after
a possible readback, Itherwise TF fails in the CI.
Fixes:
e87186fc679c146c5d521139bb79c8eafa0a22f0
virgl: add virgl_resource_transfer_prepare
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18243>