vulkan: Add dmabuf sync helpers from wlroots

These helpers are obtained from the wlroots project at
https://gitlab.freedesktop.org/wlroots/wlroots/
This commit is contained in:
columbarius 2023-07-02 11:40:52 +02:00 committed by Wim Taymans
parent 2c65eb6c2c
commit 412b0c7b49
4 changed files with 240 additions and 1 deletions

View file

@ -6,8 +6,16 @@ spa_vulkan_sources = [
'vulkan-utils.c'
]
drm = dependency('libdrm')
if cc.has_header('linux/dma-buf.h') and target_machine.system() == 'linux'
spa_vulkan_sources += files('dmabuf_linux.c')
else
spa_vulkan_sources += files('dmabuf_fallback.c')
endif
spa_vulkan = shared_library('spa-vulkan',
spa_vulkan_sources,
dependencies : [ spa_dep, vulkan_dep, mathlib ],
dependencies : [ spa_dep, vulkan_dep, mathlib, drm ],
install : true,
install_dir : spa_plugindir / 'vulkan')