summaryrefslogtreecommitdiff
path: root/src/amd/compiler/aco_builder_h.py
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2022-05-13 12:01:03 +0100
committerMarge Bot <emma+marge@anholt.net>2022-05-31 18:07:34 +0000
commitdae1629778de81ecb24f3790f8404dd2c24dd338 (patch)
tree3423174ac857ed7007af8d13fd517af67118cd48 /src/amd/compiler/aco_builder_h.py
parentd51dd7527b41b89c059950b2f8cfdc9026330827 (diff)
downloadmesa-dae1629778de81ecb24f3790f8404dd2c24dd338.tar.gz
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>
Diffstat (limited to 'src/amd/compiler/aco_builder_h.py')
-rw-r--r--src/amd/compiler/aco_builder_h.py9
1 files changed, 9 insertions, 0 deletions
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 {