From: Vasily Khoruzhick Date: Thu, 23 Jan 2020 04:30:31 +0000 (-0800) Subject: lima: use imul for calculations with intrinsic src X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=beab31b9bb58913ea8abf61765d7788f5cb2f04e;p=mesa.git 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 Reviewed-by: Erico Nunes Signed-off-by: Vasily Khoruzhick Tested-by: Marge Bot Part-of: --- diff --git a/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c b/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c index 3b110370277..d77386bf020 100644 --- a/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c +++ b/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c @@ -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);