mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 07:50:11 +01:00
nir: handle mismatched bias/lod bitsizes
the sampler lod bias lowering uses fp16 for perf on AGX. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34507>
This commit is contained in:
parent
2e15b42eec
commit
9de7ea875d
1 changed files with 1 additions and 1 deletions
|
|
@ -322,7 +322,7 @@ lower_lod(nir_builder *b, nir_tex_instr *tex, nir_def *lod)
|
|||
/* If we have a bias, add it in */
|
||||
nir_def *bias = nir_steal_tex_src(tex, nir_tex_src_bias);
|
||||
if (bias)
|
||||
lod = nir_fadd(b, lod, bias);
|
||||
lod = nir_fadd(b, lod, nir_f2fN(b, bias, lod->bit_size));
|
||||
|
||||
/* If we have a minimum LOD, clamp LOD accordingly */
|
||||
nir_def *min_lod = nir_steal_tex_src(tex, nir_tex_src_min_lod);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue