panfrost: Fix Bifrost high LOD clamp

Broke mipmapping.

Fixes: ad0b32cdbd ("panfrost: XMLify Bifrost textures")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7081>
This commit is contained in:
Alyssa Rosenzweig 2020-10-06 21:46:56 -04:00
parent 3943bcec9c
commit 239e4e87fc
1 changed files with 4 additions and 3 deletions

View File

@ -405,9 +405,10 @@ panfrost_new_texture_bifrost(
cfg.levels = last_level - first_level;
cfg.surfaces = payload->gpu;
/* Use the sampler descriptor for LOD clamping */
cfg.minimum_lod = 0;
cfg.maximum_lod = last_level - first_level;
/* We specify API-level LOD clamps in the sampler descriptor
* and use these clamps simply for bounds checking */
cfg.minimum_lod = FIXED_16(0, false);
cfg.maximum_lod = FIXED_16(cfg.levels, false);
}
}