st/mesa: fix sampler max_lod computation

This change makes gallium behave like other GL implementations and fixes
a conformance failure.
This commit is contained in:
Brian Paul 2010-07-07 13:04:47 -06:00
parent 51c438feb7
commit 9755539116

View file

@ -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.