mesa: added NaN checking code (disabled)
authorBrian Paul <brianp@vmware.com>
Wed, 3 Jun 2009 21:43:53 +0000 (15:43 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 3 Jun 2009 23:16:00 +0000 (17:16 -0600)
src/mesa/shader/prog_execute.c

index 2b7237ef3129263b768b77a3b44b49dcbaa8b016..f4beb9a78b62d6b249621b9fabb049cde27094f9 100644 (file)
@@ -225,6 +225,13 @@ fetch_vector4(const struct prog_src_register *source,
       result[2] = -result[2];
       result[3] = -result[3];
    }
+
+#ifdef NAN_CHECK
+   assert(!IS_INF_OR_NAN(result[0]));
+   assert(!IS_INF_OR_NAN(result[0]));
+   assert(!IS_INF_OR_NAN(result[0]));
+   assert(!IS_INF_OR_NAN(result[0]));
+#endif
 }
 
 
@@ -479,6 +486,13 @@ store_vector4(const struct prog_instruction *inst,
       }
    }
 
+#ifdef NAN_CHECK
+   assert(!IS_INF_OR_NAN(value[0]));
+   assert(!IS_INF_OR_NAN(value[0]));
+   assert(!IS_INF_OR_NAN(value[0]));
+   assert(!IS_INF_OR_NAN(value[0]));
+#endif
+
    if (writeMask & WRITEMASK_X)
       dst[0] = value[0];
    if (writeMask & WRITEMASK_Y)