[Mesa-dev] [PATCH 2/7] st/mesa: do sanity checks on states only in debug builds

Marek Olšák maraeo at gmail.com
Wed Dec 29 11:00:01 PST 2010


---
 src/mesa/state_tracker/st_atom.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index e29ab46..bf160fe 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -147,7 +147,11 @@ void st_validate_state( struct st_context *st )
 
    /*printf("%s %x/%x\n", __FUNCTION__, state->mesa, state->st);*/
 
+#ifdef NDEBUG
+   if (0) {
+#else
    if (1) {
+#endif
       /* Debug version which enforces various sanity checks on the
        * state flags which are generated and checked to help ensure
        * state atoms are ordered correctly in the list.
-- 
1.7.1



More information about the mesa-dev mailing list