From 968faef86723c895f5b19c948a43eb0fcf6179e5 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Fri, 12 Feb 2021 23:31:03 +0100 Subject: vo_gpu: vaapi: export plane pitch properly --- video/out/hwdec/hwdec_vaapi_vk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/video/out/hwdec/hwdec_vaapi_vk.c b/video/out/hwdec/hwdec_vaapi_vk.c index 1cee9e86b9..afb81be82a 100644 --- a/video/out/hwdec/hwdec_vaapi_vk.c +++ b/video/out/hwdec/hwdec_vaapi_vk.c @@ -43,6 +43,7 @@ static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper) int fd = p->desc.objects[id].fd; uint32_t size = p->desc.objects[id].size; uint32_t offset = p->desc.layers[n].offset[0]; + uint32_t pitch = p->desc.layers[n].pitch[0]; #if PL_API_VER >= 88 // AMD drivers do not return the size in the surface description, so we @@ -84,6 +85,9 @@ static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper) .offset = offset, #if PL_API_VER >= 88 .drm_format_mod = p->desc.objects[id].drm_format_modifier, +#endif +#if PL_API_VER >= 106 + .stride_w = pitch, #endif }, }; -- cgit v1.2.3