mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
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:
parent
51c438feb7
commit
9755539116
1 changed files with 2 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue