1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-18 05:37:04 +00:00

vo_gpu: hwdec_vaapi: add support for DRM format modifiers

This is required to get non-corrupted textures when importing vaapi
planes on AMD drivers.
This commit is contained in:
Niklas Haas 2020-07-14 03:58:55 +02:00 committed by Niklas Haas
parent 7a7a0a78b5
commit 22e7c700dd

View File

@ -48,7 +48,7 @@ static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper)
.format = format->priv,
.sampleable = true,
.sample_mode = format->linear_filter ? PL_TEX_SAMPLE_LINEAR
: PL_TEX_SAMPLE_NEAREST,
: PL_TEX_SAMPLE_NEAREST,
.import_handle = PL_HANDLE_DMA_BUF,
.shared_mem = (struct pl_shared_mem) {
.handle = {
@ -56,6 +56,9 @@ static bool vaapi_vk_map(struct ra_hwdec_mapper *mapper)
},
.size = size,
.offset = offset,
#if PL_API_VER >= 88
.drm_format_mod = p->desc.objects[id].drm_format_modifier,
#endif
},
};