From beab31b9bb58913ea8abf61765d7788f5cb2f04e Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Wed, 22 Jan 2020 20:30:31 -0800 Subject: [PATCH] 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: --- src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2