nir/dead_variables: Respect the modes passed to remove_dead_vars
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 21 Jul 2020 20:15:43 +0000 (15:15 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jul 2020 17:38:57 +0000 (17:38 +0000)
commit9bf8572222044638866c8b5d9079a439ff39beb1
tree73f11b122846ae07473cedee2f7b3f530fe7d64b
parent5746af444606b77e30309d5b85bc116d64df2cf4
nir/dead_variables: Respect the modes passed to remove_dead_vars

For the most part, this doesn't actually matter today.  We already only
call remove_dead_vars on the lists that are specified in the modes.  The
only functional change here is for the uniform, mem_ubo, and mem_ssbo
modes because they share a list.  If nir_remove_dead_variables is called
with a mode of nir_var_uniform, it will no longer remove UBOs or SSBOs,
for instance.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966>
src/compiler/nir/nir_remove_dead_variables.c