diff options
author | Brian Paul <[email protected]> | 2010-07-07 13:04:47 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-07-07 13:05:35 -0600 |
commit | 9755539116fd0b818cc0636a6d6ed10b19b639be (patch) | |
tree | ee57ac53c15ebe9171859f13d236a1a604471df0 | |
parent | 51c438feb765cf03d1a6448295e6c62be61a5e56 (diff) |
st/mesa: fix sampler max_lod computation
This change makes gallium behave like other GL implementations and fixes
a conformance failure.
-rw-r--r-- | src/mesa/state_tracker/st_atom_sampler.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 92fe72d4df6..f147d768084 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -199,7 +199,8 @@ update_samplers(struct st_context *st) if (sampler->min_lod < texobj->BaseLevel) sampler->min_lod = texobj->BaseLevel; - sampler->max_lod = MIN2((GLfloat) texobj->MaxLevel, texobj->MaxLod); + sampler->max_lod = MIN2((GLfloat) texobj->MaxLevel, + (texobj->MaxLod + texobj->BaseLevel)); if (sampler->max_lod < sampler->min_lod) { /* The GL spec doesn't seem to specify what to do in this case. * Swap the values. |