diff options
author | Courtney Goeltzenleuchter <[email protected]> | 2013-10-24 13:13:57 -0600 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-11-21 00:26:20 -0800 |
commit | f56f875b8b72eda5abf124c8c4203b77b44b9670 (patch) | |
tree | e950a27950630decade6c83c32e48217215e92aa /src/mesa/main/debug.c | |
parent | 36c3faf4bf41d6618a3b0fcd565f4907a1633a40 (diff) |
mesa: Update MESA_INFO to eliminate error
If a user set MESA_INFO and the OpenGL application uses a
3.0 or later context then the MESA_INFO debug output will have
an error when it queries for extensions using the deprecated
enum GL_EXTENSIONS. Passing context argument allows code
to return extension list directly regardless of profile.
Commit title updated as recommended by Kenneth Graunke.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/debug.c')
-rw-r--r-- | src/mesa/main/debug.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 9434c1ea2dd..99b21478990 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -103,7 +103,7 @@ _mesa_print_state( const char *msg, GLuint state ) /** * Print information about this Mesa version and build options. */ -void _mesa_print_info( void ) +void _mesa_print_info( struct gl_context *ctx ) { _mesa_debug(NULL, "Mesa GL_VERSION = %s\n", (char *) _mesa_GetString(GL_VERSION)); @@ -111,8 +111,12 @@ void _mesa_print_info( void ) (char *) _mesa_GetString(GL_RENDERER)); _mesa_debug(NULL, "Mesa GL_VENDOR = %s\n", (char *) _mesa_GetString(GL_VENDOR)); - _mesa_debug(NULL, "Mesa GL_EXTENSIONS = %s\n", - (char *) _mesa_GetString(GL_EXTENSIONS)); + + /* 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 defined(THREADS) _mesa_debug(NULL, "Mesa thread-safe: YES\n"); #else |