[Mesa-dev] [PATCH 5/6] mesa: don't set dirty matrix flag if re-loading identity matrix
Brian Paul
brianp at vmware.com
Fri Jul 17 17:48:42 PDT 2015
---
src/mesa/main/matrix.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index 80c8a24..5ac97f8 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -309,8 +309,10 @@ _mesa_LoadIdentity( void )
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glLoadIdentity()\n");
- _math_matrix_set_identity( ctx->CurrentStack->Top );
- ctx->NewState |= ctx->CurrentStack->DirtyFlag;
+ if (_math_matrix_set_identity(ctx->CurrentStack->Top)) {
+ /* the matrix was not an identity before */
+ ctx->NewState |= ctx->CurrentStack->DirtyFlag;
+ }
}
--
1.9.1
More information about the mesa-dev
mailing list