[Mesa-dev] [PATCH] mesa: make sure all lighting tables are updated before the computation

Yuanhan Liu yuanhan.liu at linux.intel.com
Tue Nov 15 19:18:12 PST 2011


On Tue, Nov 15, 2011 at 07:26:52AM -0700, Brian Paul wrote:
> On 11/15/2011 12:51 AM, Yuanhan Liu wrote:
> >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 at linux.intel.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) {
> 
> Does this fix a specific bug?
Nope(well, I didn't search the bugzilla). But it did fix an issue. I
wrote a piglit case for this issue.

---


More information about the mesa-dev mailing list