va: allocator: Disable derived for Gallium if RGB and reading.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2127>
This commit is contained in:
Víctor Manuel Jáquez Leal 2021-04-28 10:52:29 +02:00
parent ced093c738
commit 166082f3c3

View file

@ -1271,6 +1271,12 @@ _va_map_unlocked (GstVaMemory * mem, GstMapFlags flags)
|| ((flags & GST_MAP_WRITE)
&& GST_VIDEO_INFO_IS_YUV (&va_allocator->derived_info)));
break;
case GST_VA_IMPLEMENTATION_MESA_GALLIUM:
/* Reading RGB derived images, with non-standard resolutions,
* looks like tiled too. TODO(victor): fill a bug in Mesa. */
use_derived = va_allocator->use_derived && !((flags & GST_MAP_READ)
&& GST_VIDEO_INFO_IS_RGB (&va_allocator->derived_info));
break;
default:
use_derived = va_allocator->use_derived;
break;