Mesa (main): lima: Lower nir_op_idiv with other scalar math operations.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 7 03:04:36 UTC 2022
Module: Mesa
Branch: main
Commit: 5ec0301ec7701c3fe9b1df36430d58e0b57fbfa3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ec0301ec7701c3fe9b1df36430d58e0b57fbfa3
Author: Vasily Khoruzhick <anarsoul at gmail.com>
Date: Mon Jun 6 14:43:43 2022 -0700
lima: Lower nir_op_idiv with other scalar math operations.
This will end up appearing in the backend once we move GLSL's
idiv->fmul+frcp lowering to NIR.
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16823>
---
src/gallium/drivers/lima/lima_program.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c
index 4a975f726fb..8ce554d194a 100644
--- a/src/gallium/drivers/lima/lima_program.c
+++ b/src/gallium/drivers/lima/lima_program.c
@@ -166,6 +166,10 @@ lima_alu_to_scalar_filter_cb(const nir_instr *instr, const void *data)
nir_alu_instr *alu = nir_instr_as_alu(instr);
switch (alu->op) {
case nir_op_frcp:
+ /* nir_op_idiv is lowered to frcp by lower_int_to_floats which
+ * will be run later, so lower idiv here
+ */
+ case nir_op_idiv:
case nir_op_frsq:
case nir_op_flog2:
case nir_op_fexp2:
More information about the mesa-commit
mailing list