ir3: restore interval_offset after liveness recalculation in shared RA

This value is usually set by ir3_merge_regs. Since we don't need to call
this again after shared RA, we have to copy it manually to the new
liveness struct.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
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:26 +02:00
committed by Marge Bot
parent 3f3c190649
commit dc04fd8e62
+4
View File
@@ -1429,9 +1429,13 @@ ir3_ra_shared(struct ir3_shader_variant *v, struct ir3_liveness **live_ptr)
/* Recalculate liveness and register pressure now that additional values have
* been added.
* TODO we should only do this if any values have been spilled/reloaded.
* Note: since we don't have to recreate merge sets, we have to manually copy
* interval_offset to the new liveness struct.
*/
unsigned interval_offset = live->interval_offset;
void *live_mem_ctx = ralloc_parent(live);
ralloc_free(live);
*live_ptr = ir3_calc_liveness(live_mem_ctx, v->ir);
(*live_ptr)->interval_offset = interval_offset;
}