Module: Mesa Branch: master Commit: 099c4e372df0acb2bda61ccf9e6538b3d8349ea3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=099c4e372df0acb2bda61ccf9e6538b3d8349ea3
Author: Yuanhan Liu <yuanhan....@linux.intel.com> Date: Tue Nov 15 15:40:53 2011 +0800 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....@linux.intel.com> Reviewed-by: Brian Paul <bri...@vmware.com> --- 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) { _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit