nir/opt_load_store_vectorize: fix check_for_robustness() with deref access
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 15 Jun 2021 16:50:57 +0000 (17:50 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 28 Jun 2021 15:15:42 +0000 (15:15 +0000)
commit502b06c4f50dc26d3e59bfb9a1ba0a7b0c315c6d
tree9bd5a7e3cddee2a2c4dfb77039d34a9a0edc116c
parent86fe8db4aaedb2c57d2a41546883531c0d97df7d
nir/opt_load_store_vectorize: fix check_for_robustness() with deref access

We could do better if we knew the nir_address_format to obtain
addition_bits, but the only affected driver (Turnip) probably won't
benefit because it doesn't vectorize across vec4.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 2e7bceb2204 ("nir/load_store_vectorizer: fix check_for_robustness() with indirect loads")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4922
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11382>
src/compiler/nir/nir_opt_load_store_vectorize.c
src/compiler/nir/tests/load_store_vectorizer_tests.cpp