diff options
author | Brian Paul <[email protected]> | 2005-11-10 05:10:25 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-11-10 05:10:25 +0000 |
commit | 1984aabe8362ee2b29711d2fa08e56e341eafddd (patch) | |
tree | 37f4153a9b3db927c7a80a077eb90d7144cffb25 /src/mesa/main/debug.c | |
parent | a8446f72f45008974e356d103c2961d334a825c3 (diff) |
Move code to enable FP exceptions into debug.c (set MESA_DEBUG=fpexceptions).
Get rid of MESA_DEBUG preprocessor symbol, just use DEBUG instead.
Diffstat (limited to 'src/mesa/main/debug.c')
-rw-r--r-- | src/mesa/main/debug.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index c21122080bb..98ca65b96a9 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -149,7 +149,7 @@ void _mesa_print_info( void ) */ static void add_debug_flags( const char *debug ) { -#ifdef MESA_DEBUG +#ifdef DEBUG if (_mesa_strstr(debug, "varray")) MESA_VERBOSE |= VERBOSE_VARRAY; @@ -184,6 +184,18 @@ static void add_debug_flags( const char *debug ) */ if (_mesa_strstr(debug, "flush")) MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH; + +#if defined(_FPU_GETCW) && defined(_FPU_SETCW) + if (_mesa_strstr(debug, "fpexceptions")) { + /* raise FP exceptions */ + fpu_control_t mask; + _FPU_GETCW(mask); + mask &= ~(_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM + | _FPU_MASK_OM | _FPU_MASK_UM); + _FPU_SETCW(mask); + } +#endif + #else (void) debug; #endif |