Mesa (master): lima: use imul for calculations with intrinsic src
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jan 23 21:35:29 UTC 2020
Module: Mesa
Branch: master
Commit: beab31b9bb58913ea8abf61765d7788f5cb2f04e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=beab31b9bb58913ea8abf61765d7788f5cb2f04e
Author: Vasily Khoruzhick <anarsoul at gmail.com>
Date: Wed Jan 22 20:30:31 2020 -0800
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 at jlekstrand.net>
Reviewed-by: Erico Nunes <nunes.erico at gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul at 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>
---
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);
More information about the mesa-commit
mailing list