diff options
author | Brian Paul <[email protected]> | 2008-05-03 17:01:20 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-05-03 17:01:20 -0600 |
commit | ffde4e03cf178719c06c300939f8f469d7fc5e9c (patch) | |
tree | 7e7e70592d9590fe3d060ea690885da7e0c426b9 /src/mesa/state_tracker/st_atom_sampler.c | |
parent | 8e6a3807981bb96bb6747683dbc9f92ae7117dd2 (diff) |
gallium: fix some BaseLevel, lastLevel bugs
Diffstat (limited to 'src/mesa/state_tracker/st_atom_sampler.c')
-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 7515bb30cc7..0c22e03883a 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(texobj->BaseLevel, texobj->MinLod); - sampler->max_lod = MIN2(texobj->MaxLevel, texobj->MaxLod); + sampler->min_lod = MAX2(0.0f, texobj->MinLod - texobj->BaseLevel); + sampler->max_lod = MIN2(texobj->MaxLevel - texobj->BaseLevel, + texobj->MaxLod); sampler->border_color[0] = texobj->BorderColor[RCOMP]; sampler->border_color[1] = texobj->BorderColor[GCOMP]; |