Mesa (mesa_7_7_branch): tgsi: disable inf/nan checking

Brian Paul brianp at kemper.freedesktop.org
Fri Feb 5 13:57:08 PST 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: e070c1d183b4dd45aa09e620b2bfe494a37b74bc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e070c1d183b4dd45aa09e620b2bfe494a37b74bc

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Feb  5 14:48:40 2010 -0700

tgsi: disable inf/nan checking

Inf/NaN can happen normally.  Only check for those values
when we need to debug something.

---

 src/gallium/auxiliary/tgsi/tgsi_exec.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 34ca115..bd9b986 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -133,8 +133,7 @@ static const union tgsi_exec_channel ZeroVec =
    { { 0.0, 0.0, 0.0, 0.0 } };
 
 
-#ifdef DEBUG
-static void
+static INLINE void
 check_inf_or_nan(const union tgsi_exec_channel *chan)
 {
    assert(!util_is_inf_or_nan(chan->f[0]));
@@ -142,7 +141,6 @@ check_inf_or_nan(const union tgsi_exec_channel *chan)
    assert(!util_is_inf_or_nan(chan->f[2]));
    assert(!util_is_inf_or_nan(chan->f[3]));
 }
-#endif
 
 
 #ifdef DEBUG
@@ -1424,9 +1422,9 @@ store_dest(
    int offset = 0;  /* indirection offset */
    int index;
 
-#ifdef DEBUG
-   check_inf_or_nan(chan);
-#endif
+   if (0) {
+      check_inf_or_nan(chan);
+   }
 
    /* There is an extra source register that indirectly subscripts
     * a register file. The direct index now becomes an offset



More information about the mesa-commit mailing list