From: Alyssa Rosenzweig Date: Tue, 16 Feb 2021 23:11:45 +0000 (-0500) Subject: pan/bi: Elucidate slot 6/7 operation X-Git-Tag: upstream/21.2.3~7614 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96ea2c3e9d63053bba188bf3ecdaa437c68bac43;p=platform%2Fupstream%2Fmesa.git pan/bi: Elucidate slot 6/7 operation Used to order fragments. With that clarified it's clear that we need to wait on slot 7 for LD_TILE too (outside the limited context of a blend shader). Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c index 049d73e..0dc0fb3 100644 --- a/src/panfrost/bifrost/bi_schedule.c +++ b/src/panfrost/bifrost/bi_schedule.c @@ -1319,11 +1319,21 @@ bi_schedule_clause(bi_context *ctx, bi_block *block, struct bi_worklist st) clause_state.message = true; } - if (tuple->add->op == BI_OPCODE_ATEST) - clause->dependencies |= (1 << 6); - - if (tuple->add->op == BI_OPCODE_BLEND) - clause->dependencies |= (1 << 6) | (1 << 7); + switch (tuple->add->op) { + case BI_OPCODE_ATEST: + clause->dependencies |= (1 << BIFROST_SLOT_ELDEST_DEPTH); + break; + case BI_OPCODE_LD_TILE: + if (!ctx->inputs->is_blend) + clause->dependencies |= (1 << BIFROST_SLOT_ELDEST_COLOUR); + break; + case BI_OPCODE_BLEND: + clause->dependencies |= (1 << BIFROST_SLOT_ELDEST_DEPTH); + clause->dependencies |= (1 << BIFROST_SLOT_ELDEST_COLOUR); + break; + default: + break; + } } clause_state.consts[idx] = bi_get_const_state(&tuple_state); diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h index c675206..304c082 100644 --- a/src/panfrost/bifrost/bifrost.h +++ b/src/panfrost/bifrost/bifrost.h @@ -114,6 +114,12 @@ enum bifrost_flow { BIFROST_FLOW_WE = 7, }; +enum bifrost_slot { + /* 0-5 are general purpose */ + BIFROST_SLOT_ELDEST_DEPTH = 6, + BIFROST_SLOT_ELDEST_COLOUR = 7, +}; + struct bifrost_header { /* Reserved */ unsigned zero1 : 5;