From 47ffe2ecd42625405b16141868af81dc3f9006c6 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 Part-of: --- src/amd/compiler/instruction_selection/aco_select_rt_prolog.cpp | 2 ++ 1 file changed, 2 insertions(+) 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(),