From c529e4af06956e241a4e391596629a2f31d2ebd2 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Wed, 17 Jan 2024 17:01:58 +0100 Subject: [PATCH] aco: stop scheduling at p_logical_end MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No Foz-DB changes, but this fixes some issues when the spiller inserts scratch loads after p_logical_end for p_return. Reviewed-by: Daniel Schürmann Cc: mesa-stable Part-of: (cherry picked from commit 74fc2e287fc79b9451919b21957bc5d0ef186a5a) --- .pick_status.json | 2 +- src/amd/compiler/aco_scheduler.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index f6caf9cdff3..26f149d5fbc 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -674,7 +674,7 @@ "description": "aco: stop scheduling at p_logical_end", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp index f4cebf7a493..b3302dfb715 100644 --- a/src/amd/compiler/aco_scheduler.cpp +++ b/src/amd/compiler/aco_scheduler.cpp @@ -1087,6 +1087,9 @@ schedule_block(sched_ctx& ctx, Program* program, Block* block, live& live_vars) for (unsigned idx = 0; idx < block->instructions.size(); idx++) { Instruction* current = block->instructions[idx].get(); + if (current->opcode == aco_opcode::p_logical_end) + break; + if (block->kind & block_kind_export_end && current->isEXP() && ctx.schedule_pos_exports) { unsigned target = current->exp().dest; if (target >= V_008DFC_SQ_EXP_POS && target < V_008DFC_SQ_EXP_PRIM) {