OSDN Git Service

Mesa: allow suppression of debug messages in a debug build
authorRobert Ellison <papillo@vmware.com>
Wed, 8 Apr 2009 16:58:33 +0000 (10:58 -0600)
committerRobert Ellison <papillo@vmware.com>
Wed, 8 Apr 2009 17:10:46 +0000 (11:10 -0600)
commit23ad86cfb91c294ce85a3116d4b825aaa3988a6e
tree25070a2def0d17573f82633ae4b0a3a2b1570293
parenta97c846d613c3d7ec962ee095fd8282fa3b84eea
Mesa: allow suppression of debug messages in a debug build

For testing, it's very useful to be able to test on a debug build,
while suppressing the debug messages (messages that are by default
suppressed in a release build), in order to see the same behavior
that users of release builds will see.

For example, the "piglit" test suite will flag an error on
programs that produce unexpected output, which means that a
debug build will always fail due to the extra debug messages.

This change introduces a new value to the MESA_DEBUG
environment variable.  In a debug build, explicitly setting MESA_DEBUG
to "0" will suppress all debug messages (both from _mesa_debug() and
from _mesa_warning()).  (The former behavior was that debug
messages were never suppressed in debug builds.)

Behavior of non-debug builds has not changed.  In such a build,
_mesa_debug() messages are always suppressed, and _mesa_warning()
messages will be suppressed unless MESA_DEBUG is set *to any value*.
src/mesa/main/imports.c