From f6b5abe91a78f78f07a3c9bbd5b2ea6a2f0fb736 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 30 Jan 2019 16:31:40 +0100 Subject: [PATCH] nir/lower_alu_to_scalar: Support lowering 8- and 16-bit reduce ops Reviewed-by: Rob Clark Acked-by: Alyssa Rosenzweig --- 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); -- 2.30.2