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



commit 540b322e0d98f0af9d23eec27976eb65c6e7a9fd
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 08b9befbb..d1d01c8ad 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -2942,19 +2942,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,
@@ -2963,6 +2967,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]