summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2018-02-19 13:36:22 -0500
committerJonas Ådahl <jadahl@gmail.com>2018-02-22 14:01:48 +0800
commit6f59e4858e24c828e3ab0e611d36dfaaded1b272 (patch)
tree740fd78233a60042764d213735b12b9e003ec4f1
parentaec85281ba76dfd564f71b88dc0a2800b6fc4027 (diff)
downloadmutter-6f59e4858e24c828e3ab0e611d36dfaaded1b272.tar.gz
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
-rw-r--r--src/backends/native/meta-renderer-native-gles3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backends/native/meta-renderer-native-gles3.c b/src/backends/native/meta-renderer-native-gles3.c
index a606d0ddd..dbc59b6f6 100644
--- a/src/backends/native/meta-renderer-native-gles3.c
+++ b/src/backends/native/meta-renderer-native-gles3.c
@@ -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)
{