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:
committed by
Marge Bot
parent
2e15b42eec
commit
9de7ea875d
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user