summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_aaline.c4
-rw-r--r--src/mesa/swrast/s_aatriangle.c3
-rw-r--r--src/mesa/swrast/s_accum.c3
-rw-r--r--src/mesa/swrast/s_alpha.c3
-rw-r--r--src/mesa/swrast/s_bitmap.c3
-rw-r--r--src/mesa/swrast/s_drawpix.c3
-rw-r--r--src/mesa/swrast/s_feedback.c7
-rw-r--r--src/mesa/swrast/s_fog.c3
-rw-r--r--src/mesa/swrast/s_lines.c3
-rw-r--r--src/mesa/swrast/s_nvfragprog.c32
-rw-r--r--src/mesa/swrast/s_points.c3
-rw-r--r--src/mesa/swrast/s_span.c5
-rw-r--r--src/mesa/swrast/s_texstore.c9
-rw-r--r--src/mesa/swrast/s_texture.c5
-rw-r--r--src/mesa/swrast/s_triangle.c3
-rw-r--r--src/mesa/swrast/s_zoom.c4
16 files changed, 34 insertions, 59 deletions
diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c
index 5d391a2ad37..8221a55447f 100644
--- a/src/mesa/swrast/s_aaline.c
+++ b/src/mesa/swrast/s_aaline.c
@@ -1,4 +1,4 @@
-/* $Id: s_aaline.c,v 1.19 2003/02/28 15:08:49 brianp Exp $ */
+/* $Id: s_aaline.c,v 1.20 2003/03/01 01:50:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -26,12 +26,12 @@
#include "glheader.h"
+#include "imports.h"
#include "swrast/s_aaline.h"
#include "swrast/s_context.h"
#include "swrast/s_span.h"
#include "swrast/swrast.h"
#include "mtypes.h"
-#include "mmath.h"
#define SUB_PIXEL 4
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index 1b179bc6137..7b41573a4ee 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -1,4 +1,4 @@
-/* $Id: s_aatriangle.c,v 1.29 2003/01/25 18:57:13 brianp Exp $ */
+/* $Id: s_aatriangle.c,v 1.30 2003/03/01 01:50:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -34,7 +34,6 @@
#include "colormac.h"
#include "macros.h"
#include "imports.h"
-#include "mmath.h"
#include "s_aatriangle.h"
#include "s_context.h"
#include "s_span.h"
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index b42440060e0..2af2714bd67 100644
--- a/src/mesa/swrast/s_accum.c
+++ b/src/mesa/swrast/s_accum.c
@@ -1,4 +1,4 @@
-/* $Id: s_accum.c,v 1.20 2002/10/30 19:49:30 brianp Exp $ */
+/* $Id: s_accum.c,v 1.21 2003/03/01 01:50:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -28,7 +28,6 @@
#include "glheader.h"
#include "context.h"
#include "macros.h"
-#include "mmath.h"
#include "imports.h"
#include "s_accum.h"
diff --git a/src/mesa/swrast/s_alpha.c b/src/mesa/swrast/s_alpha.c
index 5cbfe8617a5..35ec7e9dcce 100644
--- a/src/mesa/swrast/s_alpha.c
+++ b/src/mesa/swrast/s_alpha.c
@@ -1,4 +1,4 @@
-/* $Id: s_alpha.c,v 1.12 2002/10/04 19:10:12 brianp Exp $ */
+/* $Id: s_alpha.c,v 1.13 2003/03/01 01:50:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -33,7 +33,6 @@
#include "context.h"
#include "colormac.h"
#include "macros.h"
-#include "mmath.h"
#include "s_alpha.h"
#include "s_context.h"
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index 9194fc7c341..49cc59ceefc 100644
--- a/src/mesa/swrast/s_bitmap.c
+++ b/src/mesa/swrast/s_bitmap.c
@@ -1,4 +1,4 @@
-/* $Id: s_bitmap.c,v 1.20 2002/11/25 20:26:59 brianp Exp $ */
+/* $Id: s_bitmap.c,v 1.21 2003/03/01 01:50:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -33,7 +33,6 @@
#include "glheader.h"
#include "image.h"
#include "macros.h"
-#include "mmath.h"
#include "pixel.h"
#include "s_context.h"
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index ddf864793ec..10508166982 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -1,4 +1,4 @@
-/* $Id: s_drawpix.c,v 1.45 2003/02/25 19:26:00 brianp Exp $ */
+/* $Id: s_drawpix.c,v 1.46 2003/03/01 01:50:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,7 +31,6 @@
#include "image.h"
#include "macros.h"
#include "imports.h"
-#include "mmath.h"
#include "pixel.h"
#include "s_context.h"
diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c
index f25b179a2c5..614820cc4c7 100644
--- a/src/mesa/swrast/s_feedback.c
+++ b/src/mesa/swrast/s_feedback.c
@@ -1,10 +1,10 @@
-/* $Id: s_feedback.c,v 1.9 2001/09/19 20:30:44 kschultz Exp $ */
+/* $Id: s_feedback.c,v 1.10 2003/03/01 01:50:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 5.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -30,7 +30,6 @@
#include "enums.h"
#include "feedback.h"
#include "macros.h"
-#include "mmath.h"
#include "s_context.h"
#include "s_feedback.h"
diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c
index c43ef60a30b..7a97193e1e5 100644
--- a/src/mesa/swrast/s_fog.c
+++ b/src/mesa/swrast/s_fog.c
@@ -1,4 +1,4 @@
-/* $Id: s_fog.c,v 1.23 2002/08/07 00:45:07 brianp Exp $ */
+/* $Id: s_fog.c,v 1.24 2003/03/01 01:50:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -29,7 +29,6 @@
#include "colormac.h"
#include "context.h"
#include "macros.h"
-#include "mmath.h"
#include "s_context.h"
#include "s_fog.h"
diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c
index 7fb5ef246f9..b21b39d61f7 100644
--- a/src/mesa/swrast/s_lines.c
+++ b/src/mesa/swrast/s_lines.c
@@ -1,4 +1,4 @@
-/* $Id: s_lines.c,v 1.34 2003/01/20 15:21:41 brianp Exp $ */
+/* $Id: s_lines.c,v 1.35 2003/03/01 01:50:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -28,7 +28,6 @@
#include "glheader.h"
#include "colormac.h"
#include "macros.h"
-#include "mmath.h"
#include "s_aaline.h"
#include "s_context.h"
#include "s_depth.h"
diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c
index 738c78274ef..97f65c04794 100644
--- a/src/mesa/swrast/s_nvfragprog.c
+++ b/src/mesa/swrast/s_nvfragprog.c
@@ -1,4 +1,4 @@
-/* $Id: s_nvfragprog.c,v 1.4 2003/02/25 19:29:43 brianp Exp $ */
+/* $Id: s_nvfragprog.c,v 1.5 2003/03/01 01:50:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,7 +31,6 @@
#include "context.h"
#include "nvfragprog.h"
#include "macros.h"
-#include "mmath.h"
#include "s_nvfragprog.h"
@@ -47,7 +46,7 @@ fetch_texel( GLcontext *ctx, const GLfloat texcoord[4], GLuint unit,
const GLfloat *lambda = NULL;
GLchan rgba[4];
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const struct gl_texture_object *texObj;
+ const struct gl_texture_object *texObj = NULL;
switch (targetIndex) {
case TEXTURE_1D_INDEX:
@@ -147,20 +146,7 @@ fetch_vector1( const struct fp_src_register *source,
const struct fp_machine *machine,
GLfloat result[4] )
{
- const GLfloat *src;
-
- /*
- if (source->RelAddr) {
- GLint reg = source->Register + machine->AddressReg;
- if (reg < VP_PROG_REG_START || reg > VP_PROG_REG_END)
- src = zero;
- else
- src = machine->Registers[reg];
- }
- else
- */
-
- src = machine->Registers[source->Register];
+ const GLfloat *src = machine->Registers[source->Register];
result[0] = src[source->Swizzle[0]];
@@ -300,7 +286,7 @@ execute_program(GLcontext *ctx, const struct fragment_program *program)
{
GLfloat a[4], result[4];
fetch_vector1( &inst->SrcReg[0], machine, a );
- result[0] = result[1] = result[2] = result[3] = cos(a[0]);
+ result[0] = result[1] = result[2] = result[3] = _mesa_cos(a[0]);
store_vector4( inst, machine, result );
}
break;
@@ -363,7 +349,7 @@ execute_program(GLcontext *ctx, const struct fragment_program *program)
GLfloat a[4], result[4];
fetch_vector1( &inst->SrcReg[0], machine, a );
result[0] = result[1] = result[2] = result[3] =
- (GLfloat) pow(2.0, a[0]);
+ (GLfloat) _mesa_pow(2.0, a[0]);
store_vector4( inst, machine, result );
}
break;
@@ -419,7 +405,7 @@ execute_program(GLcontext *ctx, const struct fragment_program *program)
a[1] = 0.0F;
result[0] = 1.0F;
result[1] = a[0];
- result[2] = (a[0] > 0.0) ? pow(2.0, a[3]) : 0.0F;
+ result[2] = (a[0] > 0.0) ? _mesa_pow(2.0, a[3]) : 0.0F;
result[3] = 1.0F;
store_vector4( inst, machine, result );
}
@@ -561,7 +547,7 @@ execute_program(GLcontext *ctx, const struct fragment_program *program)
fetch_vector1( &inst->SrcReg[0], machine, a );
fetch_vector1( &inst->SrcReg[1], machine, b );
result[0] = result[1] = result[2] = result[3]
- = pow(a[0], b[0]);
+ = _mesa_pow(a[0], b[0]);
store_vector4( inst, machine, result );
}
break;
@@ -597,7 +583,7 @@ execute_program(GLcontext *ctx, const struct fragment_program *program)
GLfloat a[4], result[4];
fetch_vector1( &inst->SrcReg[0], machine, a );
result[0] = result[1] = result[2] = result[3]
- = 1.0F / GL_SQRT(a[0]);
+ = 1.0F / SQRTF(a[0]);
store_vector4( inst, machine, result );
}
break;
@@ -647,7 +633,7 @@ execute_program(GLcontext *ctx, const struct fragment_program *program)
{
GLfloat a[4], result[4];
fetch_vector1( &inst->SrcReg[0], machine, a );
- result[0] = result[1] = result[2] = result[3] = sin(a[0]);
+ result[0] = result[1] = result[2] = result[3] = _mesa_sin(a[0]);
store_vector4( inst, machine, result );
}
break;
diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index 0c060f16efe..2bbd169b747 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -1,4 +1,4 @@
-/* $Id: s_points.c,v 1.19 2002/06/15 03:03:11 brianp Exp $ */
+/* $Id: s_points.c,v 1.20 2003/03/01 01:50:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -29,7 +29,6 @@
#include "colormac.h"
#include "context.h"
#include "macros.h"
-#include "mmath.h"
#include "texstate.h"
#include "s_context.h"
#include "s_feedback.h"
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index e65d19c9d31..d4081518036 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1,8 +1,8 @@
-/* $Id: s_span.c,v 1.55 2003/02/27 18:15:18 brianp Exp $ */
+/* $Id: s_span.c,v 1.56 2003/03/01 01:50:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 5.0.1
+ * Version: 5.1
*
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
@@ -36,7 +36,6 @@
#include "colormac.h"
#include "context.h"
#include "macros.h"
-#include "mmath.h"
#include "imports.h"
#include "s_alpha.h"
diff --git a/src/mesa/swrast/s_texstore.c b/src/mesa/swrast/s_texstore.c
index ed8c3f9d32d..e87945ab42d 100644
--- a/src/mesa/swrast/s_texstore.c
+++ b/src/mesa/swrast/s_texstore.c
@@ -1,10 +1,10 @@
-/* $Id: s_texstore.c,v 1.9 2002/10/24 23:57:24 brianp Exp $ */
+/* $Id: s_texstore.c,v 1.10 2003/03/01 01:50:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -38,11 +38,12 @@
+#include "glheader.h"
+#include "imports.h"
#include "colormac.h"
#include "context.h"
#include "convolve.h"
#include "image.h"
-#include "imports.h"
#include "macros.h"
#include "texformat.h"
#include "teximage.h"
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c
index f99075fc545..e63f49c7424 100644
--- a/src/mesa/swrast/s_texture.c
+++ b/src/mesa/swrast/s_texture.c
@@ -1,4 +1,4 @@
-/* $Id: s_texture.c,v 1.81 2003/02/27 19:40:45 kschultz Exp $ */
+/* $Id: s_texture.c,v 1.82 2003/03/01 01:50:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -29,7 +29,6 @@
#include "context.h"
#include "colormac.h"
#include "macros.h"
-#include "mmath.h"
#include "imports.h"
#include "texformat.h"
#include "teximage.h"
@@ -2065,7 +2064,7 @@ choose_cube_face(const struct gl_texture_object *texObj,
const GLfloat ry = texcoord[1];
const GLfloat rz = texcoord[2];
const struct gl_texture_image **imgArray;
- const GLfloat arx = ABSF(rx), ary = ABSF(ry), arz = ABSF(rz);
+ const GLfloat arx = FABSF(rx), ary = FABSF(ry), arz = FABSF(rz);
GLfloat sc, tc, ma;
if (arx > ary && arx > arz) {
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 324a51582c1..76a45b96b5e 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -1,4 +1,4 @@
-/* $Id: s_triangle.c,v 1.66 2002/12/18 15:02:19 brianp Exp $ */
+/* $Id: s_triangle.c,v 1.67 2003/03/01 01:50:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -36,7 +36,6 @@
#include "colormac.h"
#include "imports.h"
#include "macros.h"
-#include "mmath.h"
#include "texformat.h"
#include "teximage.h"
#include "texstate.h"
diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c
index 852905f681d..f4fde9b31e5 100644
--- a/src/mesa/swrast/s_zoom.c
+++ b/src/mesa/swrast/s_zoom.c
@@ -1,4 +1,4 @@
-/* $Id: s_zoom.c,v 1.22 2003/02/25 19:26:02 brianp Exp $ */
+/* $Id: s_zoom.c,v 1.23 2003/03/01 01:50:26 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -297,7 +297,7 @@ _mesa_write_zoomed_stencil_span( GLcontext *ctx,
(void) skipPixels; /* XXX this shouldn't be ignored */
/* compute width of output row */
- m = (GLint) ABSF( n * ctx->Pixel.ZoomX );
+ m = (GLint) FABSF( n * ctx->Pixel.ZoomX );
if (m==0) {
return;
}