path: root/
diff options
authorPhilip Langdale <>2018-12-30 14:59:48 -0800
committersfan5 <>2019-07-08 01:57:02 +0200
commitb70ed35ba4ea8c08632e585b7027090ac00a0bb8 (patch)
tree3f3f749e3750a81d0eb5b5b02bda63d6bcf4e1bc /
parent6842755feb04a7a9e0820b3e999586cb54e329e3 (diff)
vo_gpu: hwdec_vaapi: Add Vulkan interop
This change introduces a vulkan interop path for the vaapi hwdec. The basic principles are mostly the same as for EGL, with the exported dma_buf being imported by Vukan. The biggest difference is that we cannot reuse the texture as we do with OpenGL - there's no way to rebind a VkImage to a different piece of memory, as far as I can see. So, a new texture is created on each map call. I did not bother implementing a code path for the old libva API as I think it's safe to assume any system with a working vulkan driver will have access to a newer libva. Note that we are using separate layers for the vaapi surface, just as is done for EGL. This is because libplacebo doesn't support multiplane images. This change does not include format negotiation because no driver implements the vk_ext_image_drm_format_modifier extension that would be required to do that. In practice, the two formats we care about (nv12, p010) work correctly, so we are not blocked. A separate change had to be made in libplacebo to filter out non-fatal validation errors related to surface sizes due to the lack of format negotiation.
Diffstat (limited to '')
1 files changed, 1 insertions, 1 deletions
diff --git a/ b/
index 9438b8c3ed..4c0a12283e 100644
--- a/
+++ b/
@@ -449,7 +449,7 @@ def build(ctx):
( "video/out/hwdec/hwdec_cuda.c", "cuda-hwaccel" ),
( "video/out/hwdec/hwdec_cuda_gl.c", "cuda-hwaccel && gl" ),
( "video/out/hwdec/hwdec_cuda_vk.c", "cuda-hwaccel && vulkan" ),
- ( "video/out/hwdec/hwdec_vaapi.c", "vaapi-egl" ),
+ ( "video/out/hwdec/hwdec_vaapi.c", "vaapi-egl || vaapi-vulkan" ),
( "video/out/placebo/ra_pl.c", "libplacebo" ),
( "video/out/placebo/utils.c", "libplacebo" ),
( "video/out/opengl/angle_dynamic.c", "egl-angle" ),