mesa: don't bias LOD in shader interpreter; do it in swrast
authorBrian Paul <brianp@vmware.com>
Wed, 23 Sep 2009 19:34:30 +0000 (13:34 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 23 Sep 2009 19:36:44 +0000 (13:36 -0600)
src/mesa/shader/prog_execute.c

index 68a59350a1388b3b735d16d7429fc853ae7fee1d..7cb463cd07f00f8b29ca3dd57f5442f11e128910 100644 (file)
@@ -1527,17 +1527,12 @@ _mesa_execute_program(GLcontext * ctx,
       case OPCODE_TXB:         /* GL_ARB_fragment_program only */
          /* Texel lookup with LOD bias */
          {
-            const GLuint unit = machine->Samplers[inst->TexSrcUnit];
-            const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
             GLfloat texcoord[4], color[4], lodBias;
 
             fetch_vector4(&inst->SrcReg[0], machine, texcoord);
 
             /* texcoord[3] is the bias to add to lambda */
-            lodBias = texUnit->LodBias + texcoord[3];
-            if (texUnit->_Current) {
-               lodBias += texUnit->_Current->LodBias;
-            }
+            lodBias = texcoord[3];
 
             fetch_texel(ctx, machine, inst, texcoord, lodBias, color);