Vulkan Binary Semaphore Support for Android

25 views
Skip to first unread message

Madhuparna Bhowmik

unread,
Feb 9, 2023, 7:46:01 PM2/9/23
to android-ndk
Hello,

I want to use Vulkan Binary Semaphore in my android application but cannot find a way to do so. I see that Fences are supported but cannot find a way to use semaphore.
I am not sure if this is the right forum to ask these questions.
But any pointers on whether vulkan semaphores are supported on Android devices or not would be useful.

VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT(binary): true VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT(binary): false VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT(timeline): false VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT(timeline): false

Only VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT is supported, which returns a file descriptor for Linux but an Android fence for Android devices as mentioned here: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkExternalSemaphoreHandleTypeFlagBits.html


"Handles of type VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT generated by the implementation may represent either Linux Sync Files or Android Fences at the implementation’s discretion. Applications should only use operations defined for both types of file descriptors, unless they know via means external to Vulkan the type of the file descriptor, or are prepared to deal with the system-defined operation failures resulting from using the wrong type"

Thank you,
Madhuparna


Reply all
Reply to author
Forward
0 new messages