summaryrefslogtreecommitdiff
path: root/src/mesa/math
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-04-03 12:49:03 -0600
committerBrian Paul <brianp@vmware.com>2009-04-03 12:49:03 -0600
commitce461ffc5aa2ea6941d6722e8ed473cda8c17833 (patch)
tree7811162b9dad12e17caf341678a44a54658d60fa /src/mesa/math
parentb8a200ac9d11c09646de9b7d3f3f64a742c6abe3 (diff)
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.
Diffstat (limited to 'src/mesa/math')
-rw-r--r--src/mesa/math/m_matrix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c
index 58cae88b08..da6956efed 100644
--- a/src/mesa/math/m_matrix.c
+++ b/src/mesa/math/m_matrix.c
@@ -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);
}
/*@}*/