ac/llvm: fix invalid IR if image stores are shrinked using the format
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 28 Sep 2020 07:34:00 +0000 (09:34 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 29 Sep 2020 07:40:42 +0000 (07:40 +0000)
commit1b4d968106daa18a685d9de9769b5984150ab32b
tree0902d83e810a983ec91a238f6c042ff1c3213a7f
parent1588644543df39dcceeec4ed640f1ffe9b4fe159
ac/llvm: fix invalid IR if image stores are shrinked using the format

It's not always v4f32 (or v4f16 for 16-bit) when image stores are
shrinked using the format.

This fixes a ton of crashes with RADV_DEBUG=checkir,llvm.

Fixes: e4d75c22beb ("nir/opt_shrink_vectors: shrink image stores using the format")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6882>
src/amd/llvm/ac_llvm_build.c