From 92009543705918760df92abb0cbb8cad68875e72 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 3 Jun 2009 15:43:53 -0600 Subject: mesa: added NaN checking code (disabled) --- src/mesa/shader/prog_execute.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 2b7237ef312..f4beb9a78b6 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) -- cgit v1.2.3