nir_to_tgsi: Do the required cleanup for nir_opt_find_array_copies().
authorEmma Anholt <emma@anholt.net>
Tue, 12 Apr 2022 17:33:14 +0000 (10:33 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 13 Apr 2022 19:44:39 +0000 (19:44 +0000)
commit5fad6bca72eb474b616eccb3e71c6427d4977bb9
tree7cd453e753131a84bca5dc166b039f28e9894bad
parentc8df09ebd4f164c8cd8b828db08c00deb09fb887
nir_to_tgsi: Do the required cleanup for nir_opt_find_array_copies().

If we made a copy deref, then we need to do dead-write elimination for the
pervious writes or we'll just emit the same copy deref again next time
around.  And, at the end of the opt loop, we need to lower copy derefs
because later passes (locals_to_regs, notably) depend on it.

Fixes infinite opt loop on fs-function-inout-array with virgl on NTT.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15899>
src/gallium/auxiliary/nir/nir_to_tgsi.c