From 1ecd75a39741e01e13a26d0cc86bf8bd18c4f55e Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 5 May 2026 18:43:53 -0400 Subject: [PATCH] jay/lower_scoreboard: fix tracking for A@* and *@7 update the tracking with what we actually waited on, not what we ideally wanted to wait on. reduces extra annotations in some cases. SIMD32: Totals from 194 (7.33% of 2647) affected shaders: CodeSize: 14473840 -> 14469088 (-0.03%) Signed-off-by: Alyssa Rosenzweig Reviewed-by: Kenneth Graunke Part-of: --- src/intel/compiler/jay/jay_lower_scoreboard.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/intel/compiler/jay/jay_lower_scoreboard.c b/src/intel/compiler/jay/jay_lower_scoreboard.c index 24e5b457aba..4f61b601c8c 100644 --- a/src/intel/compiler/jay/jay_lower_scoreboard.c +++ b/src/intel/compiler/jay/jay_lower_scoreboard.c @@ -269,13 +269,17 @@ lower_regdist_local(jay_function *func, jay_block *block, u32_per_pipe *access) jay_foreach_pipe(p) { if (dep[p] && (exec_pipe == TGL_PIPE_NONE /* TODO: Sends */ || dep[p] > state.finished_ip[exec_pipe][p])) { - unsigned delta = state.ip[p] - dep[p] + 1; - min_delta = MIN2(min_delta, delta); - state.finished_ip[exec_pipe][p] = dep[p]; + + min_delta = MIN2(min_delta, state.ip[p] - dep[p] + 1); wait_pipes |= BITFIELD_BIT(p); } } + /* We'll wait on the unioned dependency. Update the tracking for that. */ + u_foreach_bit(p, wait_pipes) { + state.finished_ip[exec_pipe][p] = state.ip[p] + 1 - min_delta; + } + uint32_t last_pipe = util_logbase2(wait_pipes); bool single_wait = wait_pipes == BITFIELD_BIT(last_pipe);