Mesa (mesa_7_6_branch): mesa: don't bias LOD in shader interpreter; do it in swrast

Brian Paul brianp at kemper.freedesktop.org
Thu Sep 24 16:54:16 UTC 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: 890f37d4d96471a5c3d8ae286dfc13ad18ff78e5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=890f37d4d96471a5c3d8ae286dfc13ad18ff78e5

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Sep 23 13:34:30 2009 -0600

mesa: don't bias LOD in shader interpreter; do it in swrast

---

 src/mesa/shader/prog_execute.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index 68a5935..7cb463c 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -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);
 




More information about the mesa-commit mailing list