diff options
-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. |