Mesa (master): mesa: move update_texture_compare_function() call out of loop

Brian Paul brianp at kemper.freedesktop.org
Mon Mar 2 16:45:22 UTC 2009


Module: Mesa
Branch: master
Commit: ebabdf9920c1628741703704796a9361c1fc07bf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ebabdf9920c1628741703704796a9361c1fc07bf

Author: Brian Paul <brianp at vmware.com>
Date:   Sat Feb 28 17:02:49 2009 -0700

mesa: move update_texture_compare_function() call out of loop

---

 src/mesa/main/texstate.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index e25c9e7..aded127 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -400,7 +400,6 @@ texture_override(GLcontext *ctx,
       if (texObj->_Complete) {
          texUnit->_ReallyEnabled = textureBit;
          texUnit->_Current = texObj;
-         update_texture_compare_function(ctx, texObj);
       }
    }
 }
@@ -582,6 +581,9 @@ update_texture_state( GLcontext *ctx )
                           texUnit->CurrentTex[texIndex], 1 << texIndex);
       }
 
+      if (texUnit->_Current)
+         update_texture_compare_function(ctx, texUnit->_Current);
+
       if (!texUnit->_ReallyEnabled) {
          continue;
       }




More information about the mesa-commit mailing list