You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
hwcontext_vulkan: add support for implicit DRM synchronization
More recent kernel versions allow for users to extract a sync_file handle from a DMA-BUF, which can then be imported into Vulkan as a binary semaphore. This finally allows for synchronization between Vulkan and DMA-BUF images, such as those from screen capture software, or VAAPI, avoiding any corruption artifacts. This is done fully asynchronously, where we use the kernel's given binary semaphores as a dependency to increment the image's usual VkSemaphores we allocate. The old imported binary semaphores are cleaned up after execution as usual. In the future, hwcontext_drm should receive support for explicitly synchronized images as well, which would make the synchronization more robust and portable.
This commit is contained in:
@@ -114,6 +114,7 @@ typedef enum FFVulkanExtensions {
|
||||
\
|
||||
/* Semaphores */ \
|
||||
MACRO(1, 1, FF_VK_EXT_EXTERNAL_FD_SEM, GetSemaphoreFdKHR) \
|
||||
MACRO(1, 1, FF_VK_EXT_EXTERNAL_FD_SEM, ImportSemaphoreFdKHR) \
|
||||
MACRO(1, 1, FF_VK_EXT_NO_FLAG, CreateSemaphore) \
|
||||
MACRO(1, 1, FF_VK_EXT_NO_FLAG, WaitSemaphores) \
|
||||
MACRO(1, 1, FF_VK_EXT_NO_FLAG, DestroySemaphore) \
|
||||
|
||||
Reference in New Issue
Block a user