From 547e2899d1777ea30e7611da803e8b79ca33f3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Wed, 24 Apr 2024 15:44:41 +0200 Subject: [PATCH] vaallocator: disable derived all together for Mesa <23.3 First it derived mapping was disabled for P010 formats, but also there's an issue with interlaced frames. It would be possible to disable derived mapping only for interlaced (H.264 decoder and vadeinterlace) but it would spread the hacks along the code. It's simpler and contained to disable derived completely for Mesa <23.3 Fixes: #3450 Part-of: --- .../gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c b/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c index d8fcc93f0e..65923d3abb 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c @@ -1327,7 +1327,7 @@ static inline gboolean _is_old_mesa (GstVaAllocator * va_allocator) { return GST_VA_DISPLAY_IS_IMPLEMENTATION (va_allocator->display, MESA_GALLIUM) - && !gst_va_display_check_version (va_allocator->display, 23, 2); + && !gst_va_display_check_version (va_allocator->display, 23, 3); } #endif /* G_OS_WIN32 */ @@ -1376,13 +1376,15 @@ _update_image_info (GstVaAllocator * va_allocator, } va_allocator->use_derived = FALSE; #else - /* XXX: Derived in Mesa <23.3 can't use derived images for P010 format + /* XXX: Derived in radeonsi Mesa <23.3 can't use derived images for several + * cases * https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24381 + * https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26174 */ - if (va_allocator->img_format == GST_VIDEO_FORMAT_P010_10LE - && _is_old_mesa (va_allocator)) { + if (_is_old_mesa (va_allocator)) { if (feat_use_derived != GST_VA_FEATURE_DISABLED) { - GST_INFO_OBJECT (va_allocator, "Disable image derive on old Mesa."); + GST_INFO_OBJECT (va_allocator, + "Disable image derive on old Mesa (< 23.3)."); feat_use_derived = GST_VA_FEATURE_DISABLED; } va_allocator->use_derived = FALSE;