st/nir: Call nir_remove_unused_variables() in the opt loop
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 4 Sep 2019 11:54:13 +0000 (13:54 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Thu, 5 Sep 2019 10:37:28 +0000 (12:37 +0200)
commit7d2d7b5d5f3b2eb5fd5d49b1f26989f0c358c3c8
treea5ee9a22e358b5fa808077dc41e4a9d90af337a3
parent71a67942003a96d90289f7f53f546af821e64a51
st/nir: Call nir_remove_unused_variables() in the opt loop

This prevents regressions when disabling indirect lowering. Sometimes
the only use of an input array was copying it to the array created by
nir_lower_io_to_temporaries, and without lowering indirects we wouldn't
have eliminated the temporary array until after linking, which was too
late to remove unused code in the producer.

No shader-db changes with radeonsi NIR.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/state_tracker/st_glsl_to_nir.cpp