diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c index 049d73e89a8..0dc0fb38276 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 c675206dd21..304c082919e 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;