From: Alyssa Rosenzweig Date: Sun, 22 Mar 2020 01:19:14 +0000 (-0400) Subject: pan/bi: Default csel to "!= 0" mode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5cdc31abd63302e3da82a1bfee625019e818fc3f;p=mesa.git pan/bi: Default csel to "!= 0" mode This way we always have regular csel conditions instead of a weird .always special case for 3-src CSEL mode. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index cdf25d5a81d..a00dabe71fb 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -595,6 +595,11 @@ emit_alu(bi_context *ctx, nir_alu_instr *instr) } if (alu.type == BI_CSEL) { + /* Default to csel3 */ + alu.csel_cond = BI_COND_NE; + alu.src[3] = BIR_INDEX_ZERO; + alu.src_types[3] = alu.src_types[0]; + bi_fuse_csel_cond(&alu, instr->src[0], &constants_left, &constant_shift); }