Mesa (gallium-mesa-7.4): xlib: Check GALLIUM_TRACE env var instead of XMESA_TRACE.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Mon May 25 14:57:18 UTC 2009
Module: Mesa
Branch: gallium-mesa-7.4
Commit: 8213783a0eff093c50d5ec3a25512c7b6af4a79e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8213783a0eff093c50d5ec3a25512c7b6af4a79e
Author: José Fonseca <jfonseca at vmware.com>
Date: Mon May 25 07:54:16 2009 -0700
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.
---
src/gallium/drivers/trace/README | 1 -
src/gallium/winsys/xlib/xlib.c | 6 +++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/trace/README b/src/gallium/drivers/trace/README
index a040000..35704f2 100644
--- a/src/gallium/drivers/trace/README
+++ b/src/gallium/drivers/trace/README
@@ -25,7 +25,6 @@ ensure the right libGL.so 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 da72228..8d8109b 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;
+#endif
+#if defined(GALLIUM_BRW)
if (getenv("XMESA_BRW"))
return MODE_BRW;
+#endif
#ifdef GALLIUM_CELL
if (!getenv("GALLIUM_NOCELL"))
More information about the mesa-commit
mailing list