st/mesa: Apply LOD bias from correct texture unit
authorFabian Bieler <der.fabe@gmx.net>
Fri, 25 Mar 2011 10:04:41 +0000 (11:04 +0100)
committerBrian Paul <brianp@vmware.com>
Tue, 5 Apr 2011 15:07:07 +0000 (09:07 -0600)
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_atom_sampler.c

index 474cbd5897d1861c8f4584d3cf7be7d0d8f52bac..96bdc7f331a924e1ad5613baa4afd717a3045fc0 100644 (file)
@@ -163,7 +163,7 @@ update_samplers(struct st_context *st)
          if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB)
             sampler->normalized_coords = 1;
 
-         sampler->lod_bias = st->ctx->Texture.Unit[su].LodBias;
+         sampler->lod_bias = st->ctx->Texture.Unit[texUnit].LodBias;
 
          sampler->min_lod = texobj->BaseLevel + texobj->MinLod;
          if (sampler->min_lod < texobj->BaseLevel)