nir: Add and use a nir_variable_list_for_mode helper
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 20 Jul 2020 19:32:01 +0000 (14:32 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jul 2020 17:38:58 +0000 (17:38 +0000)
commit6f6f7a34c5b26ea084ab30c9061b83ad0b8ab586
tree6224a3477287610a07f54f1442c7d0b4ad9ea7f3
parente3e1c50067e0a1e219bc4d30333b953c6baa0c08
nir: Add and use a nir_variable_list_for_mode helper

We also add a new list iterator which takes a modes bitfield and
automatically figures out which list to use.  In the future, this
iterator will work for multiple modes but today it assumes a single mode
thanks to the behavior of nir_variable_list_for_mode.  This also doesn't
work for function_temp variables.

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