From: Brian Paul Date: Thu, 2 Apr 2009 00:50:07 +0000 (-0600) Subject: mesa: use correct tex unit lod bias for TXB instruction X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ab225017ed1ea8bd9e266d10ee56ab914bb28c1;p=mesa.git mesa: use correct tex unit lod bias for TXB instruction --- diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index a60cda674ba..0bc8d5f6a79 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -1540,8 +1540,8 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_TXB: /* GL_ARB_fragment_program only */ /* Texel lookup with LOD bias */ { - const struct gl_texture_unit *texUnit - = &ctx->Texture.Unit[inst->TexSrcUnit]; + 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);