ir3: debug print limit pressure and post-spill max pressure

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
This commit is contained in:
Job Noorman 2024-06-17 11:34:24 +02:00 committed by Marge Bot
parent eadabc2eab
commit f57bee676f

View file

@ -2606,6 +2606,11 @@ ir3_ra(struct ir3_shader_variant *v)
if (ir3_shader_debug & IR3_DBG_SPILLALL)
calc_min_limit_pressure(v, live, &limit_pressure);
d("limit pressure:");
d("\tfull: %u", limit_pressure.full);
d("\thalf: %u", limit_pressure.half);
d("\tshared: %u", limit_pressure.shared);
/* In the worst case, each half register could block one full register, so
* add shared_half in case of fragmentation. In addition, full registers can
* block half registers so we have to consider the total pressure against the
@ -2637,6 +2642,12 @@ ir3_ra(struct ir3_shader_variant *v)
d("max pressure exceeded, spilling!");
IR3_PASS(v->ir, ir3_spill, v, &live, &limit_pressure);
ir3_calc_pressure(v, live, &max_pressure);
d("max pressure after spilling:");
d("\tfull: %u", max_pressure.full);
d("\thalf: %u", max_pressure.half);
d("\tshared: %u", max_pressure.shared);
assert(max_pressure.full <= limit_pressure.full &&
max_pressure.half <= limit_pressure.half);
spilled = true;