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 <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41398>
This commit is contained in:
Alyssa Rosenzweig 2026-05-05 18:43:53 -04:00 committed by Marge Bot
parent 93edf9a3fd
commit 1ecd75a397

View file

@ -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);