diff options
author | Friedrich Vock <friedrich.vock@gmx.de> | 2023-03-27 18:10:20 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-03-28 09:16:56 +0000 |
commit | 1979e551a8b7c395aba7713637c011655c26d79c (patch) | |
tree | 77ddb43fb64d3bb110b8565896ba497d9a6deb8a /src/amd | |
parent | fd1e27a8f885f5569500a76d517b84d0bd3ee78f (diff) |
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>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/compiler/aco_instruction_selection.cpp | 4 |
1 files 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)); |