From 099c4e372df0acb2bda61ccf9e6538b3d8349ea3 Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Tue, 15 Nov 2011 15:40:53 +0800 Subject: 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 Reviewed-by: Brian Paul --- src/mesa/main/light.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index c27cf1dd38b..60daa89a33f 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) { -- cgit v1.2.3