[Mesa-dev] [PATCH 05/14] mesa: Ensure that (unit->_Current != 0) == (unit->_ReallyEnabled != 0).

Eric Anholt eric at anholt.net
Thu Apr 24 17:50:12 PDT 2014


I'm going to try to delete _ReallyEnabled, which is this weird bitfield
with either 0 or 1 bits set with just the reference to _Current.
---
 src/mesa/main/texstate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 36c543b..5cbf791 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -579,6 +579,7 @@ update_texture_state( struct gl_context *ctx )
       texUnit->_ReallyEnabled = 0x0;
 
       if (enabledTargets == 0x0) {
+         _mesa_reference_texobj(&texUnit->_Current, NULL);
          /* neither vertex nor fragment processing uses this unit */
          continue;
       }
@@ -629,6 +630,7 @@ update_texture_state( struct gl_context *ctx )
          }
          else {
             /* fixed-function: texture unit is really disabled */
+            _mesa_reference_texobj(&texUnit->_Current, NULL);
             continue;
          }
       }
-- 
1.9.2



More information about the mesa-dev mailing list