swrast: Just use _EnabledCoordUnits for figuring out which texcoords to build.
authorEric Anholt <eric@anholt.net>
Wed, 23 Apr 2014 22:45:50 +0000 (15:45 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 30 Apr 2014 21:21:59 +0000 (14:21 -0700)
_EnabledUnits is all of the first 32 image units that are used by fixed
function or programs, while _EnabledCoordUnits is just which fixed function
fragment shader texcoords need to be generated.  This is a theoretical bugfix
in the case of a vertex shader texturing from large texture image unit number
(we'd end up flagging something other than a VARYING_SLOT_TEXn as needing to
be generated), but it's actually just motivated by trying to kill
_EnabledUnits.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/swrast/s_context.c

index 07485006cb763888abde1bfec85b5d25f05fa855..9fe12f14beb2c3070bc8b1bc92caac9ce0170a16 100644 (file)
@@ -523,7 +523,7 @@ _swrast_update_active_attribs(struct gl_context *ctx)
       if (swrast->_FogEnabled)
          attribsMask |= VARYING_BIT_FOGC;
 
-      attribsMask |= (ctx->Texture._EnabledUnits << VARYING_SLOT_TEX0);
+      attribsMask |= (ctx->Texture._EnabledCoordUnits << VARYING_SLOT_TEX0);
    }
 
    swrast->_ActiveAttribMask = attribsMask;