summaryrefslogtreecommitdiff
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 672a125bf1..b29721eff6 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -549,13 +549,13 @@ update_texture_state( GLcontext *ctx )
enabledTargets = enabledVertTargets | enabledFragTargets;
+ texUnit->_ReallyEnabled = 0x0;
+
if (enabledTargets == 0x0) {
/* neither vertex nor fragment processing uses this unit */
continue;
}
- texUnit->_ReallyEnabled = 0x0;
-
/* Look for the highest priority texture target that's enabled (or used
* by the vert/frag shaders) and "complete". That's the one we'll use
* for texturing. If we're using vert/frag program we're guaranteed
@@ -580,6 +580,7 @@ update_texture_state( GLcontext *ctx )
update_texture_compare_function(ctx, texUnit->_Current);
if (!texUnit->_ReallyEnabled) {
+ _mesa_reference_texobj(&texUnit->_Current, NULL);
continue;
}