FFmpeg Merges Implicit DRM Synchronization For Vulkan
- Reference: 0001493349
- News link: https://www.phoronix.com/news/FFmpeg-Vulkan-Implicit-Sync
- Source link:
FFmpeg developer Lynne who has been leading much of the Vulkan work into FFmpeg merged this implicit DRM synchronization support for the Vulkan hardware context code.
Lynne explained in [2]the commit adding the implicit sync support:
"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."
Synchronization between Vulkan and DMA-BUF images will be a delight for many. These latest improvements are in FFmpeg Git ahead of the project's next release.
[1] https://www.phoronix.com/news/FFmpeg-Vulkan-Encode-H.265
[2] https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/a577d313b2c14c855ab8aa69bbe3527bd7727212
cipper