fix bug with generated fragment programs if vertex shader is active
authorRoland Scheidegger <sroland@tungstengraphics.com>
Fri, 15 Feb 2008 16:26:06 +0000 (17:26 +0100)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Fri, 15 Feb 2008 16:26:06 +0000 (17:26 +0100)
When generating a fragment program from fixed function, checking
texUnit->_ReallyEnabled is not sufficient, need texUnit->Enabled too
since the former also represents texture enables from an active vertex
shader.

src/mesa/main/texenvprogram.c

index a2b9657bbb7d7fbced4a8979753f26dab1968826..de7d070b32c8de3c11303e8bf6276b279e75bc28 100644 (file)
@@ -199,8 +199,8 @@ static void make_state_key( GLcontext *ctx,  struct state_key *key )
 
    for (i=0;i<MAX_TEXTURE_UNITS;i++) {
       const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
-               
-      if (!texUnit->_ReallyEnabled)
+
+      if (!texUnit->_ReallyEnabled || !texUnit->Enabled)
          continue;
 
       key->unit[i].enabled = 1;