lima: use imul for calculations with intrinsic src
It's source is supposed to be int, so we have to use integer multiplication otherwise we'll get undefined result. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Erico Nunes <nunes.erico@gmail.com> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3529> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3529>
This commit is contained in:

committed by
Marge Bot

parent
3c754900b5
commit
beab31b9bb
@@ -44,7 +44,7 @@ lower_load_uniform_to_scalar(nir_builder *b, nir_intrinsic_instr *intr)
|
||||
nir_intrinsic_set_type(chan_intr, nir_intrinsic_type(intr));
|
||||
|
||||
chan_intr->src[0] =
|
||||
nir_src_for_ssa(nir_fmul_imm(b, intr->src[0].ssa, 4));
|
||||
nir_src_for_ssa(nir_imul_imm(b, intr->src[0].ssa, 4));
|
||||
|
||||
nir_builder_instr_insert(b, &chan_intr->instr);
|
||||
|
||||
|
Reference in New Issue
Block a user