Module: Mesa Branch: main Commit: 1979e551a8b7c395aba7713637c011655c26d79c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1979e551a8b7c395aba7713637c011655c26d79c
Author: Friedrich Vock <[email protected]> Date: Mon Mar 27 18:10:20 2023 +0200 aco: Swap operands for v_and_b32 in RT prolog The second operand must be a VGPR, only the first can be a literal. With a literal, this code was wrongly assembled and resulted in artifacts on GFX11. Fixes: 6446b791681 ("aco: implement select_rt_prolog()") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8642 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22142> --- src/amd/compiler/aco_instruction_selection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 74d4cb94505..46596bb90d0 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -11868,8 +11868,8 @@ select_rt_prolog(Program* program, ac_shader_config* config, /* Thread IDs are packed in VGPR0, 10 bits per component. */ bld.vop3(aco_opcode::v_bfe_u32, Definition(in_local_ids[1], v1), Operand(in_local_ids[0], v1), Operand::c32(10u), Operand::c32(3u)); - bld.vop2(aco_opcode::v_and_b32, Definition(in_local_ids[0], v1), Operand(in_local_ids[0], v1), - Operand::c32(0x7)); + bld.vop2(aco_opcode::v_and_b32, Definition(in_local_ids[0], v1), Operand::c32(0x7), + Operand(in_local_ids[0], v1)); } /* Do this backwards to reduce some RAW hazards on GFX11+ */ bld.vop1(aco_opcode::v_mov_b32, Definition(out_launch_ids[2], v1), Operand(in_wg_id_z, s1));
