st/mesa: remove the sampler min_lod/max_lod value swap

It might not be needed at all.

v2: fix v3d assertion failure

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11428>
This commit is contained in:
Marek Olšák
2021-06-07 06:55:12 -04:00
committed by Marge Bot
parent ef5d427413
commit 9de9e83735
3 changed files with 4 additions and 11 deletions

View File

@@ -169,15 +169,6 @@ st_convert_sampler(const struct st_context *st,
sampler->min_lod = MAX2(msamp->Attrib.MinLod, 0.0f);
sampler->max_lod = msamp->Attrib.MaxLod;
if (sampler->max_lod < sampler->min_lod) {
/* The GL spec doesn't seem to specify what to do in this case.
* Swap the values.
*/
float tmp = sampler->max_lod;
sampler->max_lod = sampler->min_lod;
sampler->min_lod = tmp;
assert(sampler->min_lod <= sampler->max_lod);
}
/* Check that only wrap modes using the border color have the first bit
* set.