diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-30 20:54:51 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-31 01:12:26 +0000 |
commit | 02ad147c5c80a124630992ae6c5ae705c6c68bed (patch) | |
tree | aba48f8c925be6ea16aafb533fa07ef228f414b2 | |
parent | bd19e7634027036dfc67633579750f1d45a45b74 (diff) |
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 <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
-rw-r--r-- | src/panfrost/bifrost/bifrost_compile.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |