aco: disable sdwa on gfx11

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 <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16595>
This commit is contained in:
Rhys Perry
2022-05-13 12:01:03 +01:00
committed by Marge Bot
parent d51dd7527b
commit dae1629778
7 changed files with 157 additions and 24 deletions

View File

@@ -193,7 +193,7 @@ can_use_SDWA(amd_gfx_level gfx_level, const aco_ptr<Instruction>& instr, bool pr
if (!instr->isVALU())
return false;
if (gfx_level < GFX8 || instr->isDPP() || instr->isVOP3P())
if (gfx_level < GFX8 || gfx_level >= GFX11 || instr->isDPP() || instr->isVOP3P())
return false;
if (instr->isSDWA())