diff options
author | Brian Paul <[email protected]> | 2012-02-08 20:11:58 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-02-10 08:06:56 -0700 |
commit | ae509f88a54b9cc32f16099109330f2792593c83 (patch) | |
tree | 482cf3dde475b64fcc3c2d2e9dee17db6df3c23f /src/mesa/tnl/t_rasterpos.c | |
parent | 4dacf793c8bf5c18f66efeb04e9d8a7e037e7378 (diff) |
mesa: remove gl_light::_SpotExpTable field
Just use pow() instead. Spot lights aren't too common and fixed-function
lighting isn't as important as it used to me.
This saves 32KB per context. Each table was 4KB and there's 8 lights.
Diffstat (limited to 'src/mesa/tnl/t_rasterpos.c')
-rw-r--r-- | src/mesa/tnl/t_rasterpos.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_rasterpos.c b/src/mesa/tnl/t_rasterpos.c index a7e4397b660..bdd6129e727 100644 --- a/src/mesa/tnl/t_rasterpos.c +++ b/src/mesa/tnl/t_rasterpos.c @@ -167,10 +167,7 @@ shade_rastpos(struct gl_context *ctx, continue; } else { - double x = PV_dot_dir * (EXP_TABLE_SIZE-1); - int k = (int) x; - GLfloat spot = (GLfloat) (light->_SpotExpTable[k][0] - + (x-k)*light->_SpotExpTable[k][1]); + GLfloat spot = powf(PV_dot_dir, light->SpotExponent); attenuation *= spot; } } |