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

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