[gtk/matthiasc/color-profiles] wayland: better debug for egl



commit 7efe7df47e50e2137622397422f76de1337c345c
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 1 11:15:12 2021 -0400

    wayland: better debug for egl
    
    Print the extensions one per line, so it is
    actually possible to find something in the list.

 gdk/wayland/gdkglcontext-wayland.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c
index c6401ccbf2..8543de3b58 100644
--- a/gdk/wayland/gdkglcontext-wayland.c
+++ b/gdk/wayland/gdkglcontext-wayland.c
@@ -576,7 +576,10 @@ gdk_wayland_display_init_gl (GdkDisplay  *display,
   display_wayland->have_egl_swap_buffers_with_damage =
     epoxy_has_egl_extension (dpy, "EGL_EXT_swap_buffers_with_damage");
 
-  GDK_DISPLAY_NOTE (display, OPENGL,
+  GDK_DISPLAY_NOTE (display, OPENGL, {
+            const char *extensions = eglQueryString (dpy, EGL_EXTENSIONS);
+            char **exts = g_strsplit (extensions, " ", -1);
+            char *ext = g_strjoinv ("\n\t", exts);
             g_message ("EGL API version %d.%d found\n"
                        " - Vendor: %s\n"
                        " - Version: %s\n"
@@ -588,7 +591,10 @@ gdk_wayland_display_init_gl (GdkDisplay  *display,
                        eglQueryString (dpy, EGL_VENDOR),
                        eglQueryString (dpy, EGL_VERSION),
                        eglQueryString (dpy, EGL_CLIENT_APIS),
-                       eglQueryString (dpy, EGL_EXTENSIONS)));
+                       ext);
+            g_free (ext);
+            g_strfreev (exts);
+  });
 
   ctx = g_object_new (GDK_TYPE_WAYLAND_GL_CONTEXT,
                       "display", display,


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