summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_aalinetemp.h4
-rw-r--r--src/mesa/swrast/s_nvfragprog.c5
-rw-r--r--src/mesa/swrast/s_span.c6
3 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h
index 529da481103..9850ff9ac5a 100644
--- a/src/mesa/swrast/s_aalinetemp.h
+++ b/src/mesa/swrast/s_aalinetemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_aalinetemp.h,v 1.22 2003/02/21 21:00:27 brianp Exp $ */
+/* $Id: s_aalinetemp.h,v 1.23 2003/03/04 16:34:02 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -132,7 +132,7 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
line.y1 = v1->win[1];
line.dx = line.x1 - line.x0;
line.dy = line.y1 - line.y0;
- line.len = (GLfloat) sqrt(line.dx * line.dx + line.dy * line.dy);
+ line.len = SQRTF(line.dx * line.dx + line.dy * line.dy);
line.halfWidth = 0.5F * ctx->Line.Width;
if (line.len == 0.0 || IS_INF_OR_NAN(line.len))
diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c
index 97f65c04794..147b5248d4c 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.5 2003/03/01 01:50:26 brianp Exp $ */
+/* $Id: s_nvfragprog.c,v 1.6 2003/03/04 16:34:03 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -582,8 +582,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 / SQRTF(a[0]);
+ result[0] = result[1] = result[2] = result[3] = INV_SQRTF(a[0]);
store_vector4( inst, machine, result );
}
break;
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index d4081518036..2106b87c5b6 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1,4 +1,4 @@
-/* $Id: s_span.c,v 1.56 2003/03/01 01:50:26 brianp Exp $ */
+/* $Id: s_span.c,v 1.57 2003/03/04 16:34:03 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -309,8 +309,8 @@ compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
GLfloat dvdx = texH * ((t + dtdx) / (q + dqdx) - t * invQ);
GLfloat dudy = texW * ((s + dsdy) / (q + dqdy) - s * invQ);
GLfloat dvdy = texH * ((t + dtdy) / (q + dqdy) - t * invQ);
- GLfloat x = sqrt(dudx * dudx + dvdx * dvdx);
- GLfloat y = sqrt(dudy * dudy + dvdy * dvdy);
+ GLfloat x = SQRTF(dudx * dudx + dvdx * dvdx);
+ GLfloat y = SQRTF(dudy * dudy + dvdy * dvdy);
GLfloat rho = MAX2(x, y);
GLfloat lambda = LOG2(rho);
return lambda;