diff options
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_fog.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_span.c | 9 | ||||
-rw-r--r-- | src/mesa/swrast/s_texfilter.c | 15 |
3 files changed, 15 insertions, 13 deletions
diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c index 380dcc11bab..e270b7e244e 100644 --- a/src/mesa/swrast/s_fog.c +++ b/src/mesa/swrast/s_fog.c @@ -92,7 +92,7 @@ if (span->arrayAttribs & VARYING_BIT_FOGC) { \ GLuint i; \ for (i = 0; i < span->end; i++) { \ const GLfloat fogCoord = span->array->attribs[VARYING_SLOT_FOGC][i][0]; \ - const GLfloat c = FABSF(fogCoord); \ + const GLfloat c = fabsf(fogCoord); \ GLfloat f, oneMinusF; \ FOG_FUNC(f, c); \ f = CLAMP(f, 0.0F, 1.0F); \ @@ -109,7 +109,7 @@ else { \ GLfloat w = span->attrStart[VARYING_SLOT_POS][3]; \ GLuint i; \ for (i = 0; i < span->end; i++) { \ - const GLfloat c = FABSF(fogCoord) / w; \ + const GLfloat c = fabsf(fogCoord) / w; \ GLfloat f, oneMinusF; \ FOG_FUNC(f, c); \ f = CLAMP(f, 0.0F, 1.0F); \ diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index a8dc391116a..5d618f0488a 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -31,6 +31,7 @@ * \author Brian Paul */ +#include "c99_math.h" #include "main/glheader.h" #include "main/colormac.h" #include "main/format_pack.h" @@ -443,10 +444,10 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, GLfloat dsdy2 = (s + dsdy) / (q + dqdy) - s * invQ; GLfloat dtdy2 = (t + dtdy) / (q + dqdy) - t * invQ; GLfloat maxU, maxV, rho, lambda; - dsdx2 = FABSF(dsdx2); - dsdy2 = FABSF(dsdy2); - dtdx2 = FABSF(dtdx2); - dtdy2 = FABSF(dtdy2); + dsdx2 = fabsf(dsdx2); + dsdy2 = fabsf(dsdy2); + dtdx2 = fabsf(dtdx2); + dtdy2 = fabsf(dtdy2); maxU = MAX2(dsdx2, dsdy2) * texW; maxV = MAX2(dtdx2, dtdy2) * texH; rho = MAX2(maxU, maxV); diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index ae42640cf69..3ade99519bf 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -23,6 +23,7 @@ */ +#include "c99_math.h" #include "main/glheader.h" #include "main/context.h" #include "main/colormac.h" @@ -223,7 +224,7 @@ linear_texel_locations(GLenum wrapMode, } break; case GL_MIRROR_CLAMP_EXT: - u = FABSF(s); + u = fabsf(s); if (u >= 1.0F) u = (GLfloat) size; else @@ -233,7 +234,7 @@ linear_texel_locations(GLenum wrapMode, *i1 = *i0 + 1; break; case GL_MIRROR_CLAMP_TO_EDGE_EXT: - u = FABSF(s); + u = fabsf(s); if (u >= 1.0F) u = (GLfloat) size; else @@ -250,7 +251,7 @@ linear_texel_locations(GLenum wrapMode, { const GLfloat min = -1.0F / (2.0F * size); const GLfloat max = 1.0F - min; - u = FABSF(s); + u = fabsf(s); if (u <= min) u = min * size; else if (u >= max) @@ -354,7 +355,7 @@ nearest_texel_location(GLenum wrapMode, { /* s limited to [0,1] */ /* i limited to [0,size-1] */ - const GLfloat u = FABSF(s); + const GLfloat u = fabsf(s); if (u <= 0.0F) i = 0; else if (u >= 1.0F) @@ -369,7 +370,7 @@ nearest_texel_location(GLenum wrapMode, /* i limited to [0, size-1] */ const GLfloat min = 1.0F / (2.0F * size); const GLfloat max = 1.0F - min; - const GLfloat u = FABSF(s); + const GLfloat u = fabsf(s); if (u < min) i = 0; else if (u > max) @@ -384,7 +385,7 @@ nearest_texel_location(GLenum wrapMode, /* i limited to [0, size-1] */ const GLfloat min = -1.0F / (2.0F * size); const GLfloat max = 1.0F - min; - const GLfloat u = FABSF(s); + const GLfloat u = fabsf(s); if (u < min) i = -1; else if (u > max) @@ -2358,7 +2359,7 @@ choose_cube_face(const struct gl_texture_object *texObj, const GLfloat rx = texcoord[0]; const GLfloat ry = texcoord[1]; const GLfloat rz = texcoord[2]; - const GLfloat arx = FABSF(rx), ary = FABSF(ry), arz = FABSF(rz); + const GLfloat arx = fabsf(rx), ary = fabsf(ry), arz = fabsf(rz); GLuint face; GLfloat sc, tc, ma; |