radv/llvm: fix subgroup shuffle for chips without bpermute
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 23 Mar 2020 11:02:15 +0000 (12:02 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 23 Mar 2020 14:19:03 +0000 (14:19 +0000)
commit7ac8bb33cd6025f805a390e7647506e932f4db0d
tree4207815186c10d6e4352e2f05e5ccc8b4d9d4aa6
parent2a70a1d69d3151e6c95111a297e715e887692ce3
radv/llvm: fix subgroup shuffle for chips without bpermute

bpermute only exists on GFX8+ and only with Wave32 on GFX10. Instead
we have to use readlane with a waterfall loop to defeat the LLVM
backend.

This fixes DOOM Eternal which requires subgroup shuffle.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4284>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4284>
src/amd/llvm/ac_nir_to_llvm.c
src/amd/vulkan/radv_device.c