Skip to content

venus: cheat about external fence/semaphore support

Chia-I Wu requested to merge olv/mesa:venus-sync-fd into main

The first two commits clean up vn_renderer_sync api to align with vn_renderer_shmem and vn_renderer_bo. The last three commits add external fence/semaphore support for Android.

The implementation passes CTS but is a hack at best. In vkGet*FdKHR, we do an empty submit and return the sync fd of the submit. In vkImport*FdKHR, we wait for the sync fd to signal and mark the fence/semaphore signaled internally. This is apparently bad. Also, for the sync fd to have a corresponding host VkFence, https://gitlab.freedesktop.org/olv/virglrenderer/-/tree/crosvm-only is required.

There are also two XXXs. vkGet*FdKHR implies a fence reset operation or a semaphore wait operation on the host fence or semaphore respectively. We do not respect that yet. I am thinking about sending venus-specific commands to the host to perform the operations.

/cc @zzyiwei

Edited by Chia-I Wu

Merge request reports