[mutter/wip/3-monitors-on-nvidia: 8/16] wip! renderer-native: use proper surface type for egldevice



commit bb33dad47360eac5b560a089d691173c1e183939
Author: Ray Strode <rstrode redhat com>
Date:   Thu Sep 13 07:42:17 2018 -0400

    wip! renderer-native: use proper surface type for egldevice

 src/backends/native/meta-renderer-native.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index f1f3e3c70..42bcf2ce8 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -3094,19 +3094,23 @@ create_secondary_egl_config (MetaEgl               *egl,
                              GError               **error)
 {
   EGLint attributes[] = {
+    EGL_NONE, EGL_NONE, /* reserved for surface type */
     EGL_RED_SIZE, 1,
     EGL_GREEN_SIZE, 1,
     EGL_BLUE_SIZE, 1,
     EGL_ALPHA_SIZE, EGL_DONT_CARE,
     EGL_BUFFER_SIZE, EGL_DONT_CARE,
     EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT,
-    EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
-    EGL_NONE
+    EGL_NONE,
   };
+  size_t i = 0;
 
   switch (mode)
     {
     case META_RENDERER_NATIVE_MODE_GBM:
+      attributes[i++] = EGL_SURFACE_TYPE;
+      attributes[i++] = EGL_WINDOW_BIT;
+
       return choose_egl_config_from_gbm_format (egl,
                                                 egl_display,
                                                 attributes,
@@ -3115,6 +3119,9 @@ create_secondary_egl_config (MetaEgl               *egl,
                                                 error);
 #ifdef HAVE_EGL_DEVICE
     case META_RENDERER_NATIVE_MODE_EGL_DEVICE:
+      attributes[i++] = EGL_SURFACE_TYPE;
+      attributes[i++] = EGL_STREAM_BIT_KHR;
+
       return meta_egl_choose_first_config (egl,
                                            egl_display,
                                            attributes,


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