diff options
author | Matt Turner <[email protected]> | 2015-07-12 23:15:01 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-07-29 09:34:52 -0700 |
commit | c92b2a1d7b286de8641512970a87c94809fbbc3f (patch) | |
tree | dfba41a970e59d8ae177856ee99519b7405128ce /src/mesa/tnl/t_rasterpos.c | |
parent | 2b47ef715ad33f6c4a4881b10240d792ba9e60b2 (diff) |
tnl: Avoid double promotion.
There are a couple of unrelated changes in t_vb_lighttmp.h that I hope
you'll excuse -- there's a block of code that's duplicated modulo a few
trivial differences that I took the liberty of fixing.
Diffstat (limited to 'src/mesa/tnl/t_rasterpos.c')
-rw-r--r-- | src/mesa/tnl/t_rasterpos.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_rasterpos.c b/src/mesa/tnl/t_rasterpos.c index 7ef50ea7cd7..4bd9ac8539e 100644 --- a/src/mesa/tnl/t_rasterpos.c +++ b/src/mesa/tnl/t_rasterpos.c @@ -148,7 +148,7 @@ shade_rastpos(struct gl_context *ctx, SUB_3V(VP, light->_Position, vertex); /* d = length(VP) */ d = (GLfloat) LEN_3FV( VP ); - if (d > 1.0e-6) { + if (d > 1.0e-6F) { /* normalize VP */ GLfloat invd = 1.0F / d; SELF_SCALE_SCALAR_3V(VP, invd); @@ -172,7 +172,7 @@ shade_rastpos(struct gl_context *ctx, } } - if (attenuation < 1e-3) + if (attenuation < 1e-3F) continue; n_dot_VP = DOT3( normal, VP ); @@ -219,7 +219,7 @@ shade_rastpos(struct gl_context *ctx, shine = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SHININESS][0]; spec_coef = powf(n_dot_h, shine); - if (spec_coef > 1.0e-10) { + if (spec_coef > 1.0e-10F) { if (ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) { ACC_SCALE_SCALAR_3V( specularContrib, spec_coef, light->_MatSpecular[0]); |