diff --git a/.pick_status.json b/.pick_status.json index 477be15a40c..855c41a7b22 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -144,7 +144,7 @@ "description": "ir3: restore interval_offset after liveness recalculation in shared RA", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "fa22b0901af548d5e1433ad4cdbda314182137c5", "notes": null diff --git a/src/freedreno/ir3/ir3_shared_ra.c b/src/freedreno/ir3/ir3_shared_ra.c index 878eef8aae1..98c6053ba23 100644 --- a/src/freedreno/ir3/ir3_shared_ra.c +++ b/src/freedreno/ir3/ir3_shared_ra.c @@ -1423,9 +1423,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; }