<div dir="ltr">Hi Matt,<div><br></div><div>I think the intended use was to provide glxinfo-like information from the app's perspective, i.e. if it asked for a compatibility context or something like that. That was how I discovered it, I wanted to get at the list of extensions that was being given to the app as it was different than what glxinfo was reporting.</div>
<div>Other than that I'm not sure of it's usefulness.</div><div><br></div><div>Courtney</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 23, 2013 at 3:05 PM, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Oct 23, 2013 at 12:41 PM, Courtney Goeltzenleuchter<br>
<<a href="mailto:courtney@lunarg.com">courtney@lunarg.com</a>> wrote:<br>
> If a user set MESA_INFO and the OpenGL application uses a<br>
> 3.0 or later context then the MESA_INFO debug output will have<br>
> an error when it queries for extensions using the deprecated<br>
> enum GL_EXTENSIONS. Passing context argument allows code<br>
> to return extension list directly regardless of profile.<br>
> ---<br>
>  src/mesa/main/context.c |  2 +-<br>
>  src/mesa/main/debug.c   | 10 +++++++---<br>
>  src/mesa/main/debug.h   |  2 +-<br>
>  3 files changed, 9 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c<br>
> index 0d1f71c..8218153 100644<br>
> --- a/src/mesa/main/context.c<br>
> +++ b/src/mesa/main/context.c<br>
> @@ -1522,7 +1522,7 @@ _mesa_make_current( struct gl_context *newCtx,<br>
>            * information.<br>
>            */<br>
>          if (_mesa_getenv("MESA_INFO")) {<br>
> -           _mesa_print_info();<br>
> +           _mesa_print_info(newCtx);<br>
>          }<br>
><br>
>          newCtx->FirstTimeCurrent = GL_FALSE;<br>
> diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c<br>
> index 9434c1e..99b2147 100644<br>
> --- a/src/mesa/main/debug.c<br>
> +++ b/src/mesa/main/debug.c<br>
> @@ -103,7 +103,7 @@ _mesa_print_state( const char *msg, GLuint state )<br>
>  /**<br>
>   * Print information about this Mesa version and build options.<br>
>   */<br>
> -void _mesa_print_info( void )<br>
> +void _mesa_print_info( struct gl_context *ctx )<br>
>  {<br>
>     _mesa_debug(NULL, "Mesa GL_VERSION = %s\n",<br>
>            (char *) _mesa_GetString(GL_VERSION));<br>
> @@ -111,8 +111,12 @@ void _mesa_print_info( void )<br>
>            (char *) _mesa_GetString(GL_RENDERER));<br>
>     _mesa_debug(NULL, "Mesa GL_VENDOR = %s\n",<br>
>            (char *) _mesa_GetString(GL_VENDOR));<br>
> -   _mesa_debug(NULL, "Mesa GL_EXTENSIONS = %s\n",<br>
> -          (char *) _mesa_GetString(GL_EXTENSIONS));<br>
> +<br>
> +   /* use ctx as GL_EXTENSIONS will not work on 3.0 or higher<br>
> +    * core contexts.<br>
> +    */<br>
> +   _mesa_debug(NULL, "Mesa GL_EXTENSIONS = %s\n", ctx->Extensions.String);<br>
<br>
</div></div>I think I'd go ahead and make the same change for version, renderer,<br>
and vendor now that the context is directly available.<br>
<br>
Although, I've never heard of MESA_INFO before. It doesn't appear in<br>
any of my IRC logs going back to April 2011 so I don't think anyone<br>
else even knows about it, much less suggests it for debugging. It's<br>
also not mentioned in the Mesa docs.<br>
<br>
I don't see any information in it that would be useful that glxinfo<br>
doesn't already provide. Maybe we should just throw the whole function<br>
out.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Courtney Goeltzenleuchter<br><div>LunarG</div><div><img src="http://media.lunarg.com/wp-content/themes/LunarG/images/logo.png" width="96" height="65"><br>
</div></div>
</div>