diff options
author | Yuanhan Liu <yuanhan.liu@linux.intel.com> | 2011-11-15 15:40:53 +0800 |
---|---|---|
committer | Yuanhan Liu <yuanhan.liu@linux.intel.com> | 2011-11-16 11:20:49 +0800 |
commit | 099c4e372df0acb2bda61ccf9e6538b3d8349ea3 (patch) | |
tree | 0dac9aabe077bfece9296f3ca8a6e1940d4bf6a2 /src/mesa/main/light.c | |
parent | d4df6318a1014ad99149fd13d0d90ef6c0c0fb31 (diff) | |
download | external_mesa3d-099c4e372df0acb2bda61ccf9e6538b3d8349ea3.zip external_mesa3d-099c4e372df0acb2bda61ccf9e6538b3d8349ea3.tar.gz external_mesa3d-099c4e372df0acb2bda61ccf9e6538b3d8349ea3.tar.bz2 |
mesa: make sure all lighting tables are updated before the computation
Make sure all lighting tables are updated before using the table to
calculate something, say using _SpotExpTable to calculate
_VP_inf_spot_attenuation.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/main/light.c')
-rw-r--r-- | src/mesa/main/light.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index c27cf1d..60daa89 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1138,6 +1138,9 @@ compute_light_positions( struct gl_context *ctx ) TRANSFORM_NORMAL( ctx->_EyeZDir, eye_z, ctx->ModelviewMatrixStack.Top->m ); } + /* Make sure all the light tables are updated before the computation */ + _mesa_validate_all_lighting_tables(ctx); + foreach (light, &ctx->Light.EnabledList) { if (ctx->_NeedEyeCoords) { |