mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
gallivm: Fix mipfiltering with negative lod bias.
In particular, don't use the clamped lod to compute level + 1, or lod in [-1, 0] range will actually interpolate with level 1. This makes Mipfilter DCT pass 100%.
This commit is contained in:
parent
ff7542ab90
commit
08b3179f48
1 changed files with 4 additions and 2 deletions
|
|
@ -1046,8 +1046,10 @@ lp_build_linear_mip_levels(struct lp_build_sample_context *bld,
|
|||
int_bld->zero,
|
||||
last_level);
|
||||
/* compute level 1 and clamp to legal range of levels */
|
||||
*level1_out = lp_build_add(int_bld, *level0_out, int_bld->one);
|
||||
*level1_out = lp_build_min(int_bld, *level1_out, last_level);
|
||||
level = lp_build_add(int_bld, level, int_bld->one);
|
||||
*level1_out = lp_build_clamp(int_bld, level,
|
||||
int_bld->zero,
|
||||
last_level);
|
||||
|
||||
*weight_out = lp_build_fract(float_bld, lod);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue