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_vb_fog.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_vb_fog.c')
-rw-r--r-- | src/mesa/tnl/t_vb_fog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index 1ca72f866b7..5489ed6857f 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -45,8 +45,8 @@ struct fog_stage_data { #define FOG_STAGE_DATA(stage) ((struct fog_stage_data *)stage->privatePtr) #define FOG_EXP_TABLE_SIZE 256 -#define FOG_MAX (10.0) -#define EXP_FOG_MAX .0006595 +#define FOG_MAX (10.0F) +#define EXP_FOG_MAX .0006595F #define FOG_INCR (FOG_MAX/FOG_EXP_TABLE_SIZE) static GLfloat exp_table[FOG_EXP_TABLE_SIZE]; static GLfloat inited = 0; @@ -54,7 +54,7 @@ static GLfloat inited = 0; #if 1 #define NEG_EXP( result, narg ) \ do { \ - GLfloat f = (GLfloat) (narg * (1.0/FOG_INCR)); \ + GLfloat f = (GLfloat) (narg * (1.0F / FOG_INCR)); \ GLint k = (GLint) f; \ if (k > FOG_EXP_TABLE_SIZE-2) \ result = (GLfloat) EXP_FOG_MAX; \ |