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
update_texture_compare_function(ctx, texUnit->_Current);
if (!texUnit->_ReallyEnabled) {
+ _mesa_reference_texobj(&texUnit->_Current, NULL);
continue;
}