etnaviv: nir: call nir_remove_dead_variables(..) before linking setup
authorChristian Gmeiner <cgmeiner@igalia.com>
Wed, 14 Jun 2023 19:19:45 +0000 (21:19 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 27 Jun 2023 09:10:17 +0000 (09:10 +0000)
commitf9e60699596080fbcbb91dc6b0306d12810e07ec
tree802674e4528c7999eeac1bccbe59f2abb8931586
parent5f9ac2011652b6864f285fd57ee9bf5ae6f4cab5
etnaviv: nir: call nir_remove_dead_variables(..) before linking setup

There are cases where there is a chain to an unused nir variable that get removed
by nir_opt_dce. This breaks our current linker as the variable can still be accessed
via nir_foreach_shader_in_variable(..) macro.

So lets call nir_remove_dead_variables(..) just before we setup our linking.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23673>
src/etnaviv/ci/etnaviv-gc2000-fails.txt
src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c