From 2a0a2cc5b0b4fded4eb6c0e00ce9b6ae533b51fa Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Wed, 22 Oct 2025 08:04:09 +0200 Subject: [PATCH] aco: Fixup out_launch_size_y in the RT prolog for 1D dispatch launch_size_y is set to ACO_RT_CONVERTED_2D_LAUNCH_SIZE for 1D dispatches. The prolog needs to set it to 1 so that the app shader loads the correct value. cc: mesa-stable (cherry picked from commit 47ffe2ecd42625405b16141868af81dc3f9006c6) Part-of: --- .pick_status.json | 2 +- src/amd/compiler/instruction_selection/aco_select_rt_prolog.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 31c3ff77320..71f862f49cb 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -884,7 +884,7 @@ "description": "aco: Fixup out_launch_size_y in the RT prolog for 1D dispatch", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/compiler/instruction_selection/aco_select_rt_prolog.cpp b/src/amd/compiler/instruction_selection/aco_select_rt_prolog.cpp index 7aa8c368249..b930af8e689 100644 --- a/src/amd/compiler/instruction_selection/aco_select_rt_prolog.cpp +++ b/src/amd/compiler/instruction_selection/aco_select_rt_prolog.cpp @@ -214,6 +214,8 @@ select_rt_prolog(Program* program, ac_shader_config* config, bld.sop2(Builder::s_cselect, Definition(vcc, bld.lm), Operand::c32_or_c64(-1u, program->wave_size == 64), Operand::c32_or_c64(0, program->wave_size == 64), Operand(scc, s1)); + bld.sop2(aco_opcode::s_cselect_b32, Definition(out_launch_size_y, s1), + Operand(out_launch_size_y, s1), Operand::c32(1), Operand(scc, s1)); bld.vop2(aco_opcode::v_cndmask_b32, Definition(out_launch_ids[0], v1), Operand(tmp_invocation_idx, v1), Operand(out_launch_ids[0], v1), Operand(vcc, bld.lm)); bld.vop2(aco_opcode::v_cndmask_b32, Definition(out_launch_ids[1], v1), Operand::zero(),