summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-03 15:43:53 -0600
committerBrian Paul <brianp@vmware.com>2009-06-03 17:16:00 -0600
commit92009543705918760df92abb0cbb8cad68875e72 (patch)
tree417e2e6a64ae25c16d0c535ede8a449df53f2e6b
parent035de6a82b6c911a81ca9c678aac59772eaff8d3 (diff)
mesa: added NaN checking code (disabled)
-rw-r--r--src/mesa/shader/prog_execute.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index 2b7237ef31..f4beb9a78b 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -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)