aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-02-24 09:01:51 -0700
committerBrian Paul <[email protected]>2015-02-24 14:44:19 -0700
commit79b480ccc069b92d4614ed7f61d810bdc816cb7c (patch)
tree775d9eba1c3371b3f134f686b7719cc9afde36cb /src/mesa/swrast
parente25f7772cacef8673318a7bfb33b151c5bc5d94c (diff)
mesa: replace LOGF, EXPF with logf, expf
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_aaline.c2
-rw-r--r--src/mesa/swrast/s_fog.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c
index d73c498599b..0add124d420 100644
--- a/src/mesa/swrast/s_aaline.c
+++ b/src/mesa/swrast/s_aaline.c
@@ -203,7 +203,7 @@ compute_lambda(const GLfloat sPlane[4], const GLfloat tPlane[4],
if (rho2 == 0.0F)
return 0.0;
else
- return (GLfloat) (LOGF(rho2) * 1.442695 * 0.5);/* 1.442695 = 1/log(2) */
+ return logf(rho2) * 1.442695f * 0.5f;/* 1.442695 = 1/log(2) */
}
diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c
index 6b9e698f7bc..380dcc11bab 100644
--- a/src/mesa/swrast/s_fog.c
+++ b/src/mesa/swrast/s_fog.c
@@ -23,6 +23,7 @@
*/
+#include "c99_math.h"
#include "main/glheader.h"
#include "main/colormac.h"
#include "main/macros.h"
@@ -49,12 +50,12 @@ _swrast_z_to_fogfactor(struct gl_context *ctx, GLfloat z)
return CLAMP(f, 0.0F, 1.0F);
case GL_EXP:
d = ctx->Fog.Density;
- f = EXPF(-d * z);
+ f = expf(-d * z);
f = CLAMP(f, 0.0F, 1.0F);
return f;
case GL_EXP2:
d = ctx->Fog.Density;
- f = EXPF(-(d * d * z * z));
+ f = expf(-(d * d * z * z));
f = CLAMP(f, 0.0F, 1.0F);
return f;
default:
@@ -66,14 +67,14 @@ _swrast_z_to_fogfactor(struct gl_context *ctx, GLfloat z)
#define LINEAR_FOG(f, coord) f = (fogEnd - coord) * fogScale
-#define EXP_FOG(f, coord) f = EXPF(density * coord)
+#define EXP_FOG(f, coord) f = expf(density * coord)
#define EXP2_FOG(f, coord) \
do { \
GLfloat tmp = negDensitySquared * coord * coord; \
if (tmp < FLT_MIN_10_EXP) \
tmp = FLT_MIN_10_EXP; \
- f = EXPF(tmp); \
+ f = expf(tmp); \
} while(0)