diff options
author | Brian Paul <[email protected]> | 2005-09-19 20:12:32 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-09-19 20:12:32 +0000 |
commit | b3aefd1cfb6aacd1695c52911dd39da50d893ece (patch) | |
tree | 247125551b41cc22dec6f1f03bb1d6709c804bba /src/mesa/tnl | |
parent | a01cb26a90aaa8f631c94d741617715dff89168c (diff) |
additional wrapper updates, bug 4468
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_vb_arbprogram.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_fog.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vertex_generic.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vp_build.c | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_vtx_exec.c | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_vtx_x86.c | 17 |
6 files changed, 25 insertions, 10 deletions
diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 9fc49a2ceef..08b9ffc8898 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -97,7 +97,7 @@ static GLfloat RoughApproxPower(GLfloat x, GLfloat y) */ static GLfloat ApproxLog2(GLfloat t) { - return (GLfloat) (log(t) * 1.442695F); + return (GLfloat) (LOGF(t) * 1.442695F); } static GLfloat ApproxExp2(GLfloat t) diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index 91c3591f5bf..ddf849a658e 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -80,7 +80,7 @@ init_static_data( void ) GLfloat f = 0.0F; GLint i = 0; for ( ; i < FOG_EXP_TABLE_SIZE ; i++, f += FOG_INCR) { - exp_table[i] = (GLfloat) exp(-f); + exp_table[i] = EXPF(-f); } inited = 1; } diff --git a/src/mesa/tnl/t_vertex_generic.c b/src/mesa/tnl/t_vertex_generic.c index 3f944580538..236a5bedc80 100644 --- a/src/mesa/tnl/t_vertex_generic.c +++ b/src/mesa/tnl/t_vertex_generic.c @@ -203,7 +203,7 @@ static INLINE void insert_3f_xyw_4( const struct tnl_clipspace_attr *a, GLubyte static INLINE void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in ) { (void) a; (void) v; (void) in; - abort(); + _mesa_exit(1); } static INLINE void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in ) diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 3e77758edbb..68bd7b7a9a0 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -326,10 +326,10 @@ static struct ureg swizzle1( struct ureg reg, int x ) static struct ureg get_temp( struct tnl_program *p ) { - int bit = ffs( ~p->temp_in_use ); + int bit = _mesa_ffs( ~p->temp_in_use ); if (!bit) { - fprintf(stderr, "%s: out of temporaries\n", __FILE__); - exit(1); + _mesa_problem(NULL, "%s: out of temporaries\n", __FILE__); + _mesa_exit(1); } p->temp_in_use |= 1<<(bit-1); diff --git a/src/mesa/tnl/t_vtx_exec.c b/src/mesa/tnl/t_vtx_exec.c index ef609781c51..b296e439d20 100644 --- a/src/mesa/tnl/t_vtx_exec.c +++ b/src/mesa/tnl/t_vtx_exec.c @@ -113,8 +113,12 @@ static void _tnl_vb_bind_vtx( GLcontext *ctx ) GLuint count = tnl->vtx.initial_counter - tnl->vtx.counter; GLuint attr, i; - if (0) fprintf(stderr, "_tnl_vb_bind_vtx(): %d verts %d vertsize\n", +#undef DEBUG_VTX + +#ifdef DEBUG_VTX + fprintf(stderr, "_tnl_vb_bind_vtx(): %d verts %d vertsize\n", count, tnl->vtx.vertex_size); +#endif /* Setup constant data in the VB. diff --git a/src/mesa/tnl/t_vtx_x86.c b/src/mesa/tnl/t_vtx_x86.c index 1812cfa4715..99a05509327 100644 --- a/src/mesa/tnl/t_vtx_x86.c +++ b/src/mesa/tnl/t_vtx_x86.c @@ -44,7 +44,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "t_vtx_api.h" #include "simple_list.h" - #if defined(USE_X86_ASM) && !defined(HAVE_NONSTANDARD_GLAPIENTRY) #define EXTERN( FUNC ) \ @@ -94,6 +93,18 @@ EXTERN( _tnl_x86_choose_fv ); +#undef DEBUG_VTX + +#ifdef DEBUG_VTX +#define FIXUP_PRINTF( offset, NEWVAL ) \ + fprintf(stderr, "%s/%d: offset %d, new value: 0x%x\n", __FILE__, __LINE__, offset, (int)(NEWVAL)) +#define FIXUPREL_PRINTF( offset, NEWVAL, CODE ) \ + fprintf(stderr, "%s/%d: offset %d, new value: 0x%x\n", __FILE__, __LINE__, offset, (int)(NEWVAL) - ((int)(CODE)+offset) - 4) +#else +#define FIXUP_PRINTF( offset, NEWVAL ) +#define FIXUPREL_PRINTF( offset, NEWVAL, CODE ) +#endif + #define FIXUP( CODE, KNOWN_OFFSET, CHECKVAL, NEWVAL ) \ do { \ GLint subst = 0x10101010 + CHECKVAL; \ @@ -101,7 +112,7 @@ do { \ if (DONT_KNOW_OFFSETS) { \ while (*(int *)(CODE+offset) != subst) offset++; \ *(int *)(CODE+offset) = (int)(NEWVAL); \ - if (0) fprintf(stderr, "%s/%d: offset %d, new value: 0x%x\n", __FILE__, __LINE__, offset, (int)(NEWVAL)); \ + FIXUP_PRINTF(offset, NEWVAL); \ offset += 4; \ } \ else { \ @@ -120,7 +131,7 @@ do { \ if (DONT_KNOW_OFFSETS) { \ while (*(int *)(CODE+offset) != subst) offset++; \ *(int *)(CODE+offset) = (int)(NEWVAL) - ((int)(CODE)+offset) - 4; \ - if (0) fprintf(stderr, "%s/%d: offset %d, new value: 0x%x\n", __FILE__, __LINE__, offset, (int)(NEWVAL) - ((int)(CODE)+offset) - 4); \ + FIXUPREL_PRINTF(offset, NEWVAL, CODE); \ offset += 4; \ } \ else { \ |