diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index f240e98387f..44fc63ad3ef 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -402,6 +402,9 @@ run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) unmap_textures(ctx, program); if (program->arb.IsPositionInvariant) { + /* make sure the inverse is up to date */ + _math_matrix_analyse(&ctx->_ModelProjectMatrix); + /* We need the exact same transform as in the fixed function path here * to guarantee invariance, depending on compiler optimization flags * results could be different otherwise. diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index 1309b465b78..60c624d77a7 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -158,6 +158,9 @@ static GLboolean run_vertex_stage( struct gl_context *ctx, VB->AttribPtr[_TNL_ATTRIB_POS]); } + /* make sure the inverse is up to date */ + _math_matrix_analyse(&ctx->_ModelProjectMatrix); + VB->ClipPtr = TransformRaw( &store->clip, &ctx->_ModelProjectMatrix, VB->AttribPtr[_TNL_ATTRIB_POS] );