From 589338e8fcf097b19a3595b265823d0f7e3baabe Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 6 Feb 2024 22:18:42 -0400 Subject: [PATCH] agx: sink wait_pix No reason not to, noticed when poking at the earlier parts of the series. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_pressure_schedule.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/asahi/compiler/agx_pressure_schedule.c b/src/asahi/compiler/agx_pressure_schedule.c index 443bddcc9bb..82c2b81b5c0 100644 --- a/src/asahi/compiler/agx_pressure_schedule.c +++ b/src/asahi/compiler/agx_pressure_schedule.c @@ -179,6 +179,12 @@ choose_instr(struct sched_ctx *s) continue; } + /* Heuristic: sink wait_pix to increase parallelism. Since wait_pix does + * not read or write registers, this has no effect on pressure. + */ + if (n->instr->op == AGX_OPCODE_WAIT_PIX) + return n; + int32_t delta = calculate_pressure_delta(n->instr, s->live); if (delta < min_delta) {