venus: enable timeline semaphore feedback
authorJuston Li <justonli@google.com>
Mon, 6 Feb 2023 21:44:39 +0000 (13:44 -0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 8 Feb 2023 00:09:18 +0000 (00:09 +0000)
commit5c7e60362cbf26e331b5621fac643813558b6493
treeb92e2ed2c57b0c3a35de687ed2f2687d43163094
parent067cda659abdb9a2366e828dfb4b34498c4ab9e2
venus: enable timeline semaphore feedback

At vkQueueSubmit time, for each batch with timeline semaphores to
signal, append cmd_buffers with feedback cmds to update the counter
value in its respective feedback slot.

Since multiple signals on the same semaphore could be pending at the
same time across batches/vkQueueSubmits, src slots and commands are
allocated on demand. These src slots can be reused after they've been
signaled (if the current semaphore counter is greater/equal than the
src value) and are cleaned up on vkDestroySemaphore.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20500>
src/virtio/vulkan/vn_feedback.c
src/virtio/vulkan/vn_queue.c
src/virtio/vulkan/vn_queue.h