mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 19:20:12 +01:00
mesa: only clear matrix MAT_DIRTY_INVERSE flag when we actually compute the inverse
If _math_matrix_analyse() got called before we allocated the inverse matrix array we could lose the flag indicating that we needed to compute the inverse. This could happen with certain vertex shader cases.
This commit is contained in:
parent
b8a200ac9d
commit
ce461ffc5a
1 changed files with 2 additions and 3 deletions
|
|
@ -1379,11 +1379,10 @@ _math_matrix_analyse( GLmatrix *mat )
|
|||
|
||||
if (mat->inv && (mat->flags & MAT_DIRTY_INVERSE)) {
|
||||
matrix_invert( mat );
|
||||
mat->flags &= ~MAT_DIRTY_INVERSE;
|
||||
}
|
||||
|
||||
mat->flags &= ~(MAT_DIRTY_FLAGS|
|
||||
MAT_DIRTY_TYPE|
|
||||
MAT_DIRTY_INVERSE);
|
||||
mat->flags &= ~(MAT_DIRTY_FLAGS | MAT_DIRTY_TYPE);
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue