diff options
author | Brian Paul <[email protected]> | 2008-05-03 09:07:11 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-05-03 09:07:11 -0600 |
commit | 3837d401cc665eccf079eba5822b1a3eec565b81 (patch) | |
tree | 1cf279b8965aa42a5d2d02997aa5ad54a03aee6f | |
parent | 3668d20a9f382a174e002dc9b226710bdd983992 (diff) |
gallium: fix sampler->max_lod computation
-rw-r--r-- | src/mesa/state_tracker/st_atom_sampler.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index b020d435056..379b41c654f 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -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]; |