path: root/src
diff options
authorJosé Fonseca <>2009-05-25 07:54:16 -0700
committerJosé Fonseca <>2009-05-25 07:54:16 -0700
commit8213783a0eff093c50d5ec3a25512c7b6af4a79e (patch)
treedcf1e2199cc2ff93cfd54c675d0a670d8d84a3e0 /src
parentc36abd867f0dd8323b5c28108592bb5bbd68d408 (diff)
xlib: Check GALLIUM_TRACE env var instead of XMESA_TRACE.
This avoids a xlib winsys segfault when XMESA_TRACE was set, but GALLIUM_TRACE was not.
Diffstat (limited to 'src')
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/trace/README b/src/gallium/drivers/trace/README
index a040000acc1..35704f2dc99 100644
--- a/src/gallium/drivers/trace/README
+++ b/src/gallium/drivers/trace/README
@@ -25,7 +25,6 @@ ensure the right is being picked by doing
and then try running
- export XMESA_TRACE=y
GALLIUM_TRACE=tri.trace progs/trivial/tri
which should create a tri.trace file, which is an XML file. You can view copying
diff --git a/src/gallium/winsys/xlib/xlib.c b/src/gallium/winsys/xlib/xlib.c
index da722282156..8d8109bae7a 100644
--- a/src/gallium/winsys/xlib/xlib.c
+++ b/src/gallium/winsys/xlib/xlib.c
@@ -51,11 +51,15 @@ enum mode {
static enum mode get_mode()
- if (getenv("XMESA_TRACE"))
+#if defined(GALLIUM_TRACE) && defined(GALLIUM_SOFTPIPE)
+ if (getenv("GALLIUM_TRACE"))
return MODE_TRACE;
+#if defined(GALLIUM_BRW)
if (getenv("XMESA_BRW"))
return MODE_BRW;
if (!getenv("GALLIUM_NOCELL"))