From f04c8194399340cecec49bd4b2a34bc5674a1894 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 18 Nov 2023 18:58:37 -0500 Subject: [PATCH] Drop the gl-legacy debug value The consensus is that we can do without this. --- docs/reference/gtk/running.md | 3 --- gdk/gdk.c | 1 - gdk/gdkdebugprivate.h | 2 +- gdk/gdkglcontext.c | 3 +-- gdk/win32/gdkglcontext-win32-wgl.c | 4 +--- gdk/x11/gdkglcontext-glx.c | 3 --- 6 files changed, 3 insertions(+), 13 deletions(-) diff --git a/docs/reference/gtk/running.md b/docs/reference/gtk/running.md index 126613da9c..fc21b617e2 100644 --- a/docs/reference/gtk/running.md +++ b/docs/reference/gtk/running.md @@ -229,9 +229,6 @@ A number of options affect behavior instead of logging: `gl-debug` : Insert debugging information in OpenGL -`gl-legacy` -: Use a legacy OpenGL context - `gl-disable-gl` : Don't allow the use of OpenGL GL API. This forces GLES to be used diff --git a/gdk/gdk.c b/gdk/gdk.c index 6c4497c528..771772e18b 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -126,7 +126,6 @@ static const GdkDebugKey gdk_debug_keys[] = { { "gl-disable", GDK_DEBUG_GL_DISABLE, "Disable OpenGL support" }, { "gl-fractional", GDK_DEBUG_GL_FRACTIONAL, "Enable fractional scaling for OpenGL (experimental)" }, { "gl-debug", GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL" }, - { "gl-legacy", GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context" }, { "gl-disable-gl", GDK_DEBUG_GL_DISABLE_GL, "Only allow OpenGL GLES API" }, { "gl-disable-gles", GDK_DEBUG_GL_DISABLE_GLES, "Don't allow OpenGL GLES API" }, { "gl-prefer-gl", GDK_DEBUG_GL_PREFER_GL, "Prefer GL over GLES API" }, diff --git a/gdk/gdkdebugprivate.h b/gdk/gdkdebugprivate.h index 4d70e835b4..3c56f867ab 100644 --- a/gdk/gdkdebugprivate.h +++ b/gdk/gdkdebugprivate.h @@ -45,7 +45,7 @@ typedef enum { GDK_DEBUG_NO_PORTALS = 1 << 15, GDK_DEBUG_GL_DISABLE = 1 << 16, GDK_DEBUG_GL_FRACTIONAL = 1 << 17, - GDK_DEBUG_GL_LEGACY = 1 << 18, + GDK_DEBUG_GL_DISABLE_GL = 1 << 19, GDK_DEBUG_GL_DISABLE_GLES = 1 << 20, GDK_DEBUG_GL_PREFER_GL = 1 << 21, diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index 688c91a352..c54bd84ec0 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -415,8 +415,7 @@ gdk_gl_context_realize_egl (GdkGLContext *context, return 0; } - prefer_legacy = (flags & GDK_DEBUG_GL_LEGACY) || - (share != NULL && gdk_gl_context_is_legacy (share)); + prefer_legacy = share != NULL && gdk_gl_context_is_legacy (share); if (preferred_api == GDK_GL_API_GL) { diff --git a/gdk/win32/gdkglcontext-win32-wgl.c b/gdk/win32/gdkglcontext-win32-wgl.c index 023a3f077d..a04ed7f206 100644 --- a/gdk/win32/gdkglcontext-win32-wgl.c +++ b/gdk/win32/gdkglcontext-win32-wgl.c @@ -675,9 +675,7 @@ gdk_win32_gl_context_wgl_realize (GdkGLContext *context, * A legacy context cannot be shared with core profile ones, so this means we * must stick to a legacy context if the shared context is a legacy context */ - legacy_bit = (gdk_display_get_debug_flags (display) & GDK_DEBUG_GL_LEGACY) - ? TRUE - : share != NULL && gdk_gl_context_is_legacy (share); + legacy_bit = share != NULL && gdk_gl_context_is_legacy (share); if (surface != NULL) hdc = GDK_WIN32_SURFACE (surface)->hdc; diff --git a/gdk/x11/gdkglcontext-glx.c b/gdk/x11/gdkglcontext-glx.c index 283052244f..e86612eadd 100644 --- a/gdk/x11/gdkglcontext-glx.c +++ b/gdk/x11/gdkglcontext-glx.c @@ -646,9 +646,6 @@ gdk_x11_gl_context_glx_realize (GdkGLContext *context, /* If there is no glXCreateContextAttribsARB() then we default to legacy */ legacy = !GDK_X11_DISPLAY (display)->has_glx_create_context; - if (gdk_display_get_debug_flags (display) & GDK_DEBUG_GL_LEGACY) - legacy = TRUE; - /* We cannot share legacy contexts with core profile ones, so the * shared context is the one that decides if we're going to create * a legacy context or not.