[Mesa-dev] [PATCH 3/6] glxinfo: Notify user if direct rendering or hardware acceleration is not available.

Jose Fonseca jfonseca at vmware.com
Wed Nov 23 03:24:10 PST 2011


Determining software rendering by the string is unreliable. 

And the glXIsDirect just duplicates information listed before.

Furthermore, printing these warnings to stdout would be a very bad idea -- scripts which run glxinfo and parse could easily get confused by these messages.

Overall, I really don't see the benefit of doing any of this.

Jose

----- Original Message -----
> From: Matthias Hopf <mhopf at suse.de>
> 
> ---
>  src/xdemos/glxinfo.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/src/xdemos/glxinfo.c b/src/xdemos/glxinfo.c
> index fe2f68b..df0c516 100644
> --- a/src/xdemos/glxinfo.c
> +++ b/src/xdemos/glxinfo.c
> @@ -646,6 +646,11 @@ print_screen_info(Display *dpy, int scrnum, Bool
> allowDirect, Bool limits, Bool
>        fprintf(stderr, "Error: glXMakeCurrent failed\n");
>     }
>  
> +   if (! glXIsDirect(dpy, ctx))
> +      printf ("\n***\n*** WARNING: Direct Rendering is NOT
> enabled\n***\n\n");
> +   else if (strcasestr ((char *) glGetString(GL_RENDERER),
> "software"))
> +      printf ("\n***\n*** WARNING: Hardware acceleration is NOT
> active\n***\n\n");
> +
>     glXDestroyContext(dpy, ctx);
>     XFree(visinfo);
>     XDestroyWindow(dpy, win);
> --
> 1.7.7
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list