From 87ad9439d3eb8ac39333463245f43666e0bbd8cf Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 24 Apr 2021 17:41:19 -0400 Subject: [PATCH] agx: Support bcsel We're already using cmpsel in lots of places, pipe through the real thing! Signed-off-by: Alyssa Rosenzweig Acked-by: Jason Ekstrand Acked-by: Bas Nieuwenhuizen Part-of: --- src/asahi/compiler/agx_compile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index c437bd4898e..f1631ae0e2b 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -425,6 +425,9 @@ agx_emit_alu(agx_builder *b, nir_alu_instr *instr) case nir_op_ushr: return agx_bfeil_to(b, dst, agx_zero(), s0, s1, 0); case nir_op_ishr: return agx_asr_to(b, dst, s0, s1); + case nir_op_bcsel: + return agx_icmpsel_to(b, dst, s0, agx_zero(), s2, s1, AGX_ICOND_UEQ); + case nir_op_b2i32: case nir_op_b2i16: return agx_icmpsel_to(b, dst, s0, agx_zero(), agx_zero(), agx_immediate(1), AGX_ICOND_UEQ);