Mesa (master): nir/lower_alu_to_scalar: Support lowering 8- and 16-bit reduce ops

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 20 14:38:27 UTC 2019


Module: Mesa
Branch: master
Commit: f6b5abe91a78f78f07a3c9bbd5b2ea6a2f0fb736
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f6b5abe91a78f78f07a3c9bbd5b2ea6a2f0fb736

Author: Neil Roberts <nroberts at igalia.com>
Date:   Wed Jan 30 16:31:40 2019 +0100

nir/lower_alu_to_scalar: Support lowering 8- and 16-bit reduce ops

Reviewed-by: Rob Clark <robdclark at gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/compiler/nir/nir_lower_alu_to_scalar.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/compiler/nir/nir_lower_alu_to_scalar.c b/src/compiler/nir/nir_lower_alu_to_scalar.c
index c0b7cc604ef..f672699b5a4 100644
--- a/src/compiler/nir/nir_lower_alu_to_scalar.c
+++ b/src/compiler/nir/nir_lower_alu_to_scalar.c
@@ -214,6 +214,14 @@ lower_alu_instr_scalar(nir_builder *b, nir_instr *instr, void *_data)
       LOWER_REDUCTION(nir_op_ball_iequal, nir_op_ieq, nir_op_iand);
       LOWER_REDUCTION(nir_op_bany_fnequal, nir_op_fne, nir_op_ior);
       LOWER_REDUCTION(nir_op_bany_inequal, nir_op_ine, nir_op_ior);
+      LOWER_REDUCTION(nir_op_b8all_fequal, nir_op_feq8, nir_op_iand);
+      LOWER_REDUCTION(nir_op_b8all_iequal, nir_op_ieq8, nir_op_iand);
+      LOWER_REDUCTION(nir_op_b8any_fnequal, nir_op_fne8, nir_op_ior);
+      LOWER_REDUCTION(nir_op_b8any_inequal, nir_op_ine8, nir_op_ior);
+      LOWER_REDUCTION(nir_op_b16all_fequal, nir_op_feq16, nir_op_iand);
+      LOWER_REDUCTION(nir_op_b16all_iequal, nir_op_ieq16, nir_op_iand);
+      LOWER_REDUCTION(nir_op_b16any_fnequal, nir_op_fne16, nir_op_ior);
+      LOWER_REDUCTION(nir_op_b16any_inequal, nir_op_ine16, nir_op_ior);
       LOWER_REDUCTION(nir_op_b32all_fequal, nir_op_feq32, nir_op_iand);
       LOWER_REDUCTION(nir_op_b32all_iequal, nir_op_ieq32, nir_op_iand);
       LOWER_REDUCTION(nir_op_b32any_fnequal, nir_op_fne32, nir_op_ior);




More information about the mesa-commit mailing list