From: Alyssa Rosenzweig Date: Tue, 31 Mar 2020 00:54:51 +0000 (-0400) Subject: pan/bi: Fix handling of constants with COMBINE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=02ad147c5c80a124630992ae6c5ae705c6c68bed;p=mesa.git pan/bi: Fix handling of constants with COMBINE We should never see COMBINE constants explicitly since they'll become moves anyway, so we can simplify that. On the other hand, we do need the type information for the lowering to work properly. Signed-off-by: Alyssa Rosenzweig Tested-by: Marge Bot Part-of: --- diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index f78dfddbcce..0eced9713da 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -320,6 +320,9 @@ emit_load_const(bi_context *ctx, nir_load_const_instr *instr) .src = { BIR_INDEX_CONSTANT }, + .src_types = { + instr->def.bit_size | nir_type_uint, + }, .constant = { .u64 = nir_const_value_as_uint(instr->value[0], instr->def.bit_size) } @@ -560,6 +563,9 @@ emit_alu(bi_context *ctx, nir_alu_instr *instr) unsigned constants_left = (64 / dest_bits); unsigned constant_shift = 0; + if (alu.type == BI_COMBINE) + constants_left = 0; + /* Copy sources */ unsigned num_inputs = nir_op_infos[instr->op].num_inputs;