renderer/native: Don't use modifiers to import linear DMA buffer

When the buffer modifier is DRM_FORMAT_MOD_LINEAR, we can use the
old code path. That means not specifying any modifier parameter.

It was an issue when the primary GPU was creating a linear GBM surface
and that a secondary GPU (not supporting modifiers) was trying to
import it. It was failing because the driver could not use the
import_modifiers extension even though it could in theory easily
import the buffer.

https://gitlab.gnome.org/GNOME/mutter/issues/18
This commit is contained in:
Louis-Francis Ratté-Boulianne 2018-02-19 13:36:22 -05:00 committed by Jonas Ådahl
parent aec85281ba
commit 6f59e4858e

View File

@ -77,7 +77,8 @@ create_egl_image (MetaEgl *egl,
attribs[atti++] = EGL_LINUX_DRM_FOURCC_EXT;
attribs[atti++] = format;
has_modifier = (modifiers[0] != DRM_FORMAT_MOD_INVALID);
has_modifier = (modifiers[0] != DRM_FORMAT_MOD_INVALID &&
modifiers[0] != DRM_FORMAT_MOD_LINEAR);
if (n_planes > 0)
{