A recent commit stopped updating the inverse MVP matrix, because usually
only GLSL built-ins need it. However, TNL also needs it. So make sure
it's correct when needed.
Fixes:
10371c520c1 ("mesa: don't compute the ModelView * Projection matrix if not used")
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9346>
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.
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] );