Mesa (master): swrast: Just use _EnabledCoordUnits for figuring out which texcoords to build.

Eric Anholt anholt at kemper.freedesktop.org
Wed Apr 30 21:53:45 UTC 2014


Module: Mesa
Branch: master
Commit: 3dfe56c53bc7f37b65b72408fe3470ecfd218595
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3dfe56c53bc7f37b65b72408fe3470ecfd218595

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Apr 23 15:45:50 2014 -0700

swrast: Just use _EnabledCoordUnits for figuring out which texcoords to build.

_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 at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/swrast/s_context.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 0748500..9fe12f1 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -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;




More information about the mesa-commit mailing list