summaryrefslogtreecommitdiffstats
path: root/progs/xdemos
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2006-12-06 14:54:43 +0100
committerMichel Dänzer <[email protected]>2006-12-06 14:54:43 +0100
commitb46e359f583e73bec9b4531c3243e93bd46196f3 (patch)
treebb2507eca33275cf735e199a4e762eee7c1bfa05 /progs/xdemos
parent14f92636b00e6961c419e5457151f44853bd297f (diff)
glxinfo: When direct rendering is not enabled, print some hints.
If indirect rendering is forced, say how. Otherwise, suggest setting LIBGL_DEBUG=verbose. Inspired by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=379323 .
Diffstat (limited to 'progs/xdemos')
-rw-r--r--progs/xdemos/glxinfo.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c
index fdd1c0523f6..a1aca5ad31e 100644
--- a/progs/xdemos/glxinfo.c
+++ b/progs/xdemos/glxinfo.c
@@ -456,7 +456,19 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
}
printf("display: %s screen: %d\n", displayName, scrnum);
free(displayName);
- printf("direct rendering: %s\n", glXIsDirect(dpy, ctx) ? "Yes" : "No");
+ printf("direct rendering: ");
+ if (glXIsDirect(dpy, ctx)) {
+ printf("Yes\n");
+ } else {
+ if (!allowDirect) {
+ printf("No (-i specified)\n");
+ } else if (getenv("LIBGL_ALWAYS_INDIRECT")) {
+ printf("No (LIBGL_ALWAYS_INDIRECT set)\n");
+ } else {
+ printf("No (If you want to find out why, try setting "
+ "LIBGL_DEBUG=verbose)\n");
+ }
+ }
printf("server glx vendor string: %s\n", serverVendor);
printf("server glx version string: %s\n", serverVersion);
printf("server glx extensions:\n");