From 61b5986c58b4c912d9c682e40d787f0ceec16481 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 5 Jan 2024 16:12:57 +0100 Subject: [PATCH] mesa/main: remove low-value debug-output This isn't very useful as-is for a few reasons: 1. It only does something in debug-builds, which is not what most users (or application developers) is using. 2. It's undocumented. 3. Most of the information printed here is trivial to figure out with tools like glxinfo. 4. It's missing output for platforms like x86-64 and ARM... So let's just axe this, it's unlikely anyone uses it. --- src/mesa/main/context.c | 9 --------- src/mesa/main/debug.c | 30 ------------------------------ src/mesa/main/debug.h | 1 - 3 files changed, 40 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 60a90e06758..05ad6daeaa1 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1408,15 +1408,6 @@ handle_first_current(struct gl_context *ctx) || (_mesa_is_desktop_gl_compat(ctx) && !is_forward_compatible_context)); } - - /* We can use this to help debug user's problems. Tell them to set - * the MESA_INFO env variable before running their app. Then the - * first time each context is made current we'll print some useful - * information. - */ - if (os_get_option("MESA_INFO")) { - _mesa_print_info(ctx); - } } /** diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index e800b4264e7..7d07a7d19ab 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -87,36 +87,6 @@ _mesa_print_state( const char *msg, GLuint state ) -/** - * Print information about this Mesa version and build options. - */ -void _mesa_print_info( struct gl_context *ctx ) -{ - _mesa_debug(NULL, "Mesa GL_VERSION = %s\n", - (char *) _mesa_GetString(GL_VERSION)); - _mesa_debug(NULL, "Mesa GL_RENDERER = %s\n", - (char *) _mesa_GetString(GL_RENDERER)); - _mesa_debug(NULL, "Mesa GL_VENDOR = %s\n", - (char *) _mesa_GetString(GL_VENDOR)); - - /* use ctx as GL_EXTENSIONS will not work on 3.0 or higher - * core contexts. - */ - _mesa_debug(NULL, "Mesa GL_EXTENSIONS = %s\n", ctx->Extensions.String); - -#if DETECT_ARCH_X86 - _mesa_debug(NULL, "Mesa x86-optimized: YES\n"); -#else - _mesa_debug(NULL, "Mesa x86-optimized: NO\n"); -#endif -#if DETECT_ARCH_SPARC64 - _mesa_debug(NULL, "Mesa sparc-optimized: YES\n"); -#else - _mesa_debug(NULL, "Mesa sparc-optimized: NO\n"); -#endif -} - - /** * Set verbose logging flags. When these flags are set, GL API calls * in the various categories will be printed to stderr. diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h index f2a63d40c54..95caaf40811 100644 --- a/src/mesa/main/debug.h +++ b/src/mesa/main/debug.h @@ -42,7 +42,6 @@ struct gl_context; struct gl_texture_image; extern void _mesa_print_state( const char *msg, GLuint state ); -extern void _mesa_print_info( struct gl_context *ctx ); extern void _mesa_init_debug( struct gl_context *ctx ); #endif