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

Johannes Obermayr johannesobermayr at gmx.de
Sat Nov 19 08:51:23 PST 2011


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



More information about the mesa-dev mailing list