summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2021-02-12 23:31:03 +0100
committerNiklas Haas <git@haasn.xyz>2021-02-12 23:31:46 +0100
commit968faef86723c895f5b19c948a43eb0fcf6179e5 (patch)
treefa9484564bc3c01891be2d107dc7cf8d040593a6 /video/out
parentce3fe08bd47b9bb23fadd37e9e4001ca87c59ecd (diff)
downloadmpv-968faef86723c895f5b19c948a43eb0fcf6179e5.tar.bz2
mpv-968faef86723c895f5b19c948a43eb0fcf6179e5.tar.xz
vo_gpu: vaapi: export plane pitch properly
Diffstat (limited to 'video/out')
-rw-r--r--video/out/hwdec/hwdec_vaapi_vk.c4
1 files changed, 4 insertions, 0 deletions
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
@@ -85,6 +86,9 @@ static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper)
#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
},
};