From: Boris Brezillon Date: Mon, 19 Apr 2021 15:51:41 +0000 (+0200) Subject: pan/bi: Expand pseudo instructions when nosched is set X-Git-Tag: upstream/21.2.3~4406 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51836a2be9152b1be171231d0617baae8e74f6d7;p=platform%2Fupstream%2Fmesa.git pan/bi: Expand pseudo instructions when nosched is set Pseudo instruction might expend to 2 instructions (one in the FMA slot and one in the ADD slot), we need to expand those even if nosched is set. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c index 8300753..fa98b08 100644 --- a/src/panfrost/bifrost/bi_schedule.c +++ b/src/panfrost/bifrost/bi_schedule.c @@ -881,12 +881,6 @@ bi_take_instr(bi_context *ctx, struct bi_worklist st, struct bi_tuple_state *tuple, bool fma) { -#ifndef NDEBUG - /* Don't pair instructions if debugging */ - if ((bifrost_debug & BIFROST_DBG_NOSCHED) && tuple->add) - return NULL; -#endif - if (tuple->add && tuple->add->op == BI_OPCODE_CUBEFACE) return bi_lower_cubeface(ctx, clause, tuple); else if (tuple->add && tuple->add->op == BI_OPCODE_PATOM_C_I32) @@ -898,6 +892,12 @@ bi_take_instr(bi_context *ctx, struct bi_worklist st, else if (tuple->add && tuple->add->table) return bi_lower_dtsel(ctx, clause, tuple); +#ifndef NDEBUG + /* Don't pair instructions if debugging */ + if ((bifrost_debug & BIFROST_DBG_NOSCHED) && tuple->add) + return NULL; +#endif + unsigned idx = bi_choose_index(st, clause, tuple, fma); if (idx >= st.count)