gallium: fix computation of sampler->min_lod
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 3 May 2008 14:58:44 +0000 (08:58 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 3 May 2008 14:58:44 +0000 (08:58 -0600)
The texture BaseLevel is accounted for in texture layout so it doesn't factor
in here.  May also need to adjust max_lod...

src/mesa/state_tracker/st_atom_sampler.c

index 7515bb3..b020d43 100644 (file)
@@ -148,7 +148,7 @@ update_samplers(struct st_context *st)
             sampler->normalized_coords = 1;
 
          sampler->lod_bias = st->ctx->Texture.Unit[su].LodBias;
-         sampler->min_lod = MAX2(texobj->BaseLevel, texobj->MinLod);
+         sampler->min_lod = MAX2(0, texobj->MinLod);
          sampler->max_lod = MIN2(texobj->MaxLevel, texobj->MaxLod);
 
          sampler->border_color[0] = texobj->BorderColor[RCOMP];