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



commit 6f59e4858e24c828e3ab0e611d36dfaaded1b272
Author: Louis-Francis Ratté-Boulianne <lfrb collabora com>
Date:   Mon Feb 19 13:36:22 2018 -0500

    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

 src/backends/native/meta-renderer-native-gles3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
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)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]