mesa: move call to update_texture_compare_function()
authorBrian Paul <brianp@vmware.com>
Mon, 2 Mar 2009 22:21:50 +0000 (15:21 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 2 Mar 2009 22:21:50 +0000 (15:21 -0700)
Another conditional can be avoided.

src/mesa/main/texstate.c

index b29721eff6b667a6818da90e4df204467247a9a6..2b07da805c05f09aa464edd27661c97259d5044b 100644 (file)
@@ -576,9 +576,6 @@ update_texture_state( GLcontext *ctx )
          }
       }
 
-      if (texUnit->_Current)
-         update_texture_compare_function(ctx, texUnit->_Current);
-
       if (!texUnit->_ReallyEnabled) {
          _mesa_reference_texobj(&texUnit->_Current, NULL);
          continue;
@@ -592,6 +589,7 @@ update_texture_state( GLcontext *ctx )
          enabledFragUnits |= (1 << unit);
 
       update_tex_combine(ctx, texUnit);
+      update_texture_compare_function(ctx, texUnit->_Current);
    }