Skip to content

vulkan/android: rewrite vkQueueSignalReleaseImageANDROID

Yiwei Zhang requested to merge zzyiwei/mesa:vk-android-miscs into main

What does this MR do and why?

vulkan/android: rewrite vkQueueSignalReleaseImageANDROID

There're two issues with the current implementation:

  1. Wait semaphores are implicitly required to be SYNC_FD exportable
  2. As a queue command that can further record cmds against the wsi image, it currently doesn't account for pending cmds in the queue beyond the wait semaphores.

This change fixes both by doing a queue submission in the call with a SYNC_FD external signal semaphore. However, due to Android wsi not exposing swapchain to icd, we have to cache the signal semaphore in the queue, otherwise would have to create/destroy in each present.

The vk_queue::anb_semaphore itself plays the same role as wsi_swapchain::dma_buf_semaphore for common WSI.

This also unblocks venus from adopting common Android ANB impl (This MR is extracted from !25184 (merged)).

/cc @gfxstrand @olv

Edited by Yiwei Zhang

Merge request reports