diff options
Diffstat (limited to 'src/mesa/tnl/t_vb_light.c')
-rw-r--r-- | src/mesa/tnl/t_vb_light.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index 88b62cf87b1..d7872675ca8 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -97,7 +97,7 @@ static GLuint prepare_materials( GLcontext *ctx, store->mat_count = 0; store->mat_bitmask = 0; - /* If ColorMaterial enabled, set overwrite effected AttrPtr's with + /* If ColorMaterial enabled, overwrite affected AttrPtr's with * the color pointer. This could be done earlier. */ if (ctx->Light.ColorMaterialEnabled) { @@ -166,7 +166,8 @@ static void init_lighting( void ) } -static GLboolean run_lighting( GLcontext *ctx, struct tnl_pipeline_stage *stage ) +static GLboolean run_lighting( GLcontext *ctx, + struct tnl_pipeline_stage *stage ) { struct light_stage_data *store = LIGHT_STAGE_DATA(stage); TNLcontext *tnl = TNL_CONTEXT(ctx); @@ -286,6 +287,11 @@ static GLboolean run_init_lighting( GLcontext *ctx, _mesa_vector4f_alloc( &store->LitIndex[0], 0, size, 32 ); _mesa_vector4f_alloc( &store->LitIndex[1], 0, size, 32 ); + store->LitIndex[0].size = 1; + store->LitIndex[0].stride = sizeof(GLfloat); + store->LitIndex[1].size = 1; + store->LitIndex[1].stride = sizeof(GLfloat); + /* Now validate the stage derived data... */ stage->run = run_validate_lighting; |