gallium: fix sampler->max_lod computation

This commit is contained in:
Brian Paul 2008-05-03 09:07:11 -06:00
parent 3668d20a9f
commit 3837d401cc
1 changed files with 3 additions and 2 deletions

View File

@ -148,8 +148,9 @@ update_samplers(struct st_context *st)
sampler->normalized_coords = 1;
sampler->lod_bias = st->ctx->Texture.Unit[su].LodBias;
sampler->min_lod = MAX2(0, texobj->MinLod);
sampler->max_lod = MIN2(texobj->MaxLevel, texobj->MaxLod);
sampler->min_lod = MAX2(0.0f, texobj->MinLod);
sampler->max_lod = MIN2(texobj->MaxLevel - texobj->BaseLevel,
texobj->MaxLod);
sampler->border_color[0] = texobj->BorderColor[RCOMP];
sampler->border_color[1] = texobj->BorderColor[GCOMP];