Changeset 3598 for trunk/src/opengl/mesa/mmath.c
- Timestamp:
- May 23, 2000, 10:41:28 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/mesa/mmath.c
r2938 r3598 1 /* $Id: mmath.c,v 1. 1 2000-02-29 00:50:07 sandervlExp $ */1 /* $Id: mmath.c,v 1.2 2000-05-23 20:40:41 jeroen Exp $ */ 2 2 3 3 /* 4 4 * Mesa 3-D graphics library 5 * Version: 3. 15 * Version: 3.3 6 6 * 7 7 * Copyright (C) 1999 Brian Paul All Rights Reserved. … … 24 24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 25 */ 26 /* $XFree86: xc/lib/GL/mesa/src/mmath.c,v 1.2 1999/04/04 00:20:28 dawes Exp $ */27 28 29 30 26 31 27 … … 33 29 #include "all.h" 34 30 #else 35 #ifndef XFree86Server 36 #include <math.h> 37 #else 38 #include "GL/xf86glx.h" 39 #endif 40 #include "gl.h" 31 #include "glheader.h" 41 32 #include "mmath.h" 42 33 #endif … … 44 35 45 36 static int in_fast_math; 46 47 37 48 38 /* … … 57 47 * SPARC floating point format is as follows: 58 48 * 59 * BIT 31 30 23 22060 * sign exponentmantissa49 * BIT 31 30 23 22 0 50 * sign exponent mantissa 61 51 */ 62 52 static short sqrttab[0x100]; /* declare table of square roots */ … … 100 90 } 101 91 #else 102 (void) sqrttab; /* silence compiler warning - unused var*/103 #endif 92 (void) sqrttab; /* silence compiler warnings */ 93 #endif /*FAST_MATH*/ 104 94 } 105 95 … … 152 142 * Initialize tables, etc for fast math functions. 153 143 */ 154 void gl_init_math(void)144 void _mesa_init_math(void) 155 145 { 156 146 static GLboolean initialized = GL_FALSE; … … 162 152 initialized = GL_TRUE; 163 153 in_fast_math = 0; 154 155 #if defined(_FPU_GETCW) && defined(_FPU_SETCW) 156 { 157 const char *debug = getenv("MESA_DEBUG"); 158 if (debug && strcmp(debug, "FP")==0) { 159 /* die on FP exceptions */ 160 fpu_control_t mask; 161 _FPU_GETCW(mask); 162 mask &= ~(_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM 163 | _FPU_MASK_OM | _FPU_MASK_UM); 164 _FPU_SETCW(mask); 165 } 166 } 167 #endif 164 168 } 165 169 }
Note:
See TracChangeset
for help on using the changeset viewer.