DRM timeline sync objects seem tailor-made for interop with Vulkan timeline semaphores. However, while it's possible to import these using vkImportSemaphoreFdKHR and VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT on some drivers, there are a few issues that make importing/exporting unergonomic:
- When importing, the
SYNC_FD type seems more correct, and it's not clear in the spec which should be used in this case (unless I missed it). However, SYNC_FD is restricted to temporary binary semaphore imports, and does not allow permanent timeline semaphore imports.
- When exporting a semaphore as a FD using
vkGetSemaphoreFdKHR, there's no way to distinguish what type of FD you're getting.
Should syncobjs be covered by an additional enum value in HandleTypeFlagBits? Or should the the spec/validation be relaxed to allow timeline semaphores to be imported/exported using SYNC_FD?
DRM timeline sync objects seem tailor-made for interop with Vulkan timeline semaphores. However, while it's possible to import these using
vkImportSemaphoreFdKHRandVK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BITon some drivers, there are a few issues that make importing/exporting unergonomic:SYNC_FDtype seems more correct, and it's not clear in the spec which should be used in this case (unless I missed it). However,SYNC_FDis restricted to temporary binary semaphore imports, and does not allow permanent timeline semaphore imports.vkGetSemaphoreFdKHR, there's no way to distinguish what type of FD you're getting.Should syncobjs be covered by an additional enum value in
HandleTypeFlagBits? Or should the the spec/validation be relaxed to allow timeline semaphores to be imported/exported usingSYNC_FD?