[Mesa-dev] [PATCH 4/6] glxgears: Notify user if direct rendering or hardware acceleration is not available and that this not a benchmark.

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


From: Matthias Hopf <mhopf at suse.de>

---
 src/xdemos/glxgears.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/xdemos/glxgears.c b/src/xdemos/glxgears.c
index cff92b0..c64c2c9 100644
--- a/src/xdemos/glxgears.c
+++ b/src/xdemos/glxgears.c
@@ -766,6 +766,14 @@ main(int argc, char *argv[])
       printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
    }
 
+   if (! glXIsDirect(dpy, ctx))
+      printf ("\n***\n*** WARNING: Direct Rendering is NOT enabled\n***\n");
+   else if (strcasestr ((char *) glGetString(GL_RENDERER), "software"))
+      printf ("\n***\n*** WARNING: Hardware acceleration is NOT active\n***\n");
+   printf ("\n*** NOTE: Don't use glxgears as a benchmark.\n"
+	   "    OpenGL implementations are not optimized for frame rates >> 60fps,\n"
+	   "    thus these numbers are meaningless when compared between vendors.\n\n");
+
    init();
 
    /* Set initial projection/viewing transformation.
-- 
1.7.7



More information about the mesa-dev mailing list