diff --git a/.pick_status.json b/.pick_status.json index d04a7d8c32b..88ff01f3d9d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2308,7 +2308,7 @@ "description": "aco: Reset scratch_rsrc on blocks without predecessors", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "3d4f6a00b8e8710bbc265f8a5e3050d0550e1491" }, diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp index ca97f748f5e..805c480cfcd 100644 --- a/src/amd/compiler/aco_spill.cpp +++ b/src/amd/compiler/aco_spill.cpp @@ -1747,6 +1747,11 @@ assign_spill_slots(spill_ctx& ctx, unsigned spills_to_vgpr) last_top_level_block_idx = block.index; end_unused_spill_vgprs(ctx, block, vgpr_spill_temps, slots, ctx.spills_entry[block.index]); + + /* If the block has no predecessors (for example in RT resume shaders), + * we cannot reuse the current scratch_rsrc temp because its definition is unreachable */ + if (block.linear_preds.empty()) + ctx.scratch_rsrc = Temp(); } std::vector>::iterator it;