From 96ea2c3e9d63053bba188bf3ecdaa437c68bac43 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 16 Feb 2021 18:11:45 -0500 Subject: [PATCH] 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: --- src/panfrost/bifrost/bi_schedule.c | 20 +++++++++++++++----- src/panfrost/bifrost/bifrost.h | 6 ++++++ 2 files changed, 21 insertions(+), 5 deletions(-) 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; -- 2.7.4