[gtk/debug-envvars-cleanup: 12/16] Make the gl-debug debug flag always available
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/debug-envvars-cleanup: 12/16] Make the gl-debug debug flag always available
- Date: Thu, 22 Sep 2022 02:01:55 +0000 (UTC)
commit f50b0a0bcbfd3bad3677561f18c28c6ff4ccdeaa
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Sep 21 21:17:16 2022 -0400
Make the gl-debug debug flag always available
No need to restrict this to debug builds.
gdk/gdk.c | 2 +-
gdk/gdkglcontext.c | 12 ++----------
2 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/gdk/gdk.c b/gdk/gdk.c
index cc2a81f1d4..d4045fea5c 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -119,9 +119,9 @@ static const GdkDebugKey gdk_debug_keys[] = {
{ "nograbs", GDK_DEBUG_NOGRABS, "Disable pointer and keyboard grabs (X11)", TRUE },
{ "portals", GDK_DEBUG_PORTALS, "Force the use of portals", TRUE },
{ "gl-disable", GDK_DEBUG_GL_DISABLE, "Disable OpenGL support", TRUE },
+ { "gl-debug", GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL", TRUE },
{ "gl-legacy", GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context", TRUE },
{ "gl-gles", GDK_DEBUG_GL_GLES, "Only allow OpenGL GLES API", TRUE },
- { "gl-debug", GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL" },
{ "gl-egl", GDK_DEBUG_GL_EGL, "Use EGL on X11 or Windows" },
{ "gl-glx", GDK_DEBUG_GL_GLX, "Use GLX on X11" },
{ "gl-wgl", GDK_DEBUG_GL_WGL, "Use WGL on Windows" },
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 0452640244..ac0353a029 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -1485,9 +1485,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
gboolean gl_debug = FALSE;
-#ifdef G_ENABLE_DEBUG
GdkDisplay *display;
-#endif
if (!gdk_gl_context_is_realized (context))
return;
@@ -1500,16 +1498,10 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
priv->has_debug_output = epoxy_has_gl_extension ("GL_ARB_debug_output") ||
epoxy_has_gl_extension ("GL_KHR_debug");
-#ifdef G_ENABLE_DEBUG
display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
- gl_debug = GDK_DISPLAY_DEBUG_CHECK (display, GL_DEBUG);
-#endif
+ gl_debug = (gdk_display_get_debug_flags (display) & GDK_DEBUG_GL_DEBUG) != 0;
- if (priv->has_debug_output
-#ifndef G_ENABLE_CONSISTENCY_CHECKS
- && gl_debug
-#endif
- )
+ if (priv->has_debug_output && gl_debug)
{
gdk_gl_context_make_current (context);
glEnable (GL_DEBUG_OUTPUT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]