venus: place wsi submissions on corresponding ring_idx
authorRyan Neph <ryanneph@google.com>
Mon, 22 Aug 2022 23:32:14 +0000 (16:32 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 16 Dec 2022 21:12:38 +0000 (21:12 +0000)
commit2c1a7f877cc55471a06660ab07273a589f8bafd7
treeda54ca17bf994a91e63bef8b7adc53541129148d
parentc957d086007cf5821f7a5b078691c5b51c8008b8
venus: place wsi submissions on corresponding ring_idx

With implicit fencing, the image has a fence that blocks scanout until
rendering is complete. virtgpu doesn't support implicit fencing yet, but
Sommelier (a VM Wayland compositor) does the wait by exposing the bo as
a GEM handle and waiting on all fences in userspace with a
DRM_IOCTL_VIRTGPU_WAIT before issuing the wl_surface commit.
During vkQueueSubmit involving wsi images, we follow with an empty
renderer submission on the corresonding ring_idx to install a fence
on the appropriate virtgpu fence context after the last rendering
submission.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19691>
src/virtio/vulkan/vn_queue.c