mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 18:28:12 +02:00
i965/sampler_state: Clamp min/max LOD to 14 on gen7+
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 9df3778016)
This commit is contained in:
parent
eb5a044ce7
commit
d5859cbcc0
1 changed files with 5 additions and 2 deletions
|
|
@ -503,8 +503,11 @@ brw_update_sampler_state(struct brw_context *brw,
|
|||
}
|
||||
|
||||
const int lod_bits = brw->gen >= 7 ? 8 : 6;
|
||||
const unsigned min_lod = U_FIXED(CLAMP(sampler->MinLod, 0, 13), lod_bits);
|
||||
const unsigned max_lod = U_FIXED(CLAMP(sampler->MaxLod, 0, 13), lod_bits);
|
||||
const float hw_max_lod = brw->gen >= 7 ? 14 : 13;
|
||||
const unsigned min_lod =
|
||||
U_FIXED(CLAMP(sampler->MinLod, 0, hw_max_lod), lod_bits);
|
||||
const unsigned max_lod =
|
||||
U_FIXED(CLAMP(sampler->MaxLod, 0, hw_max_lod), lod_bits);
|
||||
const int lod_bias =
|
||||
S_FIXED(CLAMP(tex_unit_lod_bias + sampler->LodBias, -16, 15), lod_bits);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue