From dae1629778de81ecb24f3790f8404dd2c24dd338 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 13 May 2022 12:01:03 +0100 Subject: aco: disable sdwa on gfx11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of SDWA v_mov_b32/v_xor_b32, we can use a combination of v_add_u16/v_sub_u16 (add/sub swap, similar to xor swap) and v_perm_b32 with a literal. I don't know yet if GFX11 adds any new instructions which makes this easier, but this approach should have full functionality. Signed-off-by: Rhys Perry Reviewed-by: Timur Kristóf Part-of: --- src/amd/compiler/aco_builder_h.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/amd/compiler/aco_builder_h.py') diff --git a/src/amd/compiler/aco_builder_h.py b/src/amd/compiler/aco_builder_h.py index 5801d3c523a..8177c36207c 100644 --- a/src/amd/compiler/aco_builder_h.py +++ b/src/amd/compiler/aco_builder_h.py @@ -110,6 +110,15 @@ sendmsg_gs_done(bool cut, bool emit, unsigned stream) return (sendmsg)((unsigned)_sendmsg_gs_done | (cut << 4) | (emit << 5) | (stream << 8)); } +enum bperm_swiz { + bperm_b1_sign = 8, + bperm_b3_sign = 9, + bperm_b5_sign = 10, + bperm_b7_sign = 11, + bperm_0 = 12, + bperm_255 = 13, +}; + class Builder { public: struct Result { -- cgit v1.2.1