nir: Add a find_variable_with_[driver_]location helper
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 23 Jul 2020 04:37:27 +0000 (23:37 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jul 2020 17:38:58 +0000 (17:38 +0000)
commit5c5555a862754a5b43fee2abf4fc34e888d22a06
tree92e69246d6ff646c985fae521e36a8d0dff5614f
parentfc1363cc6039110f9dcd6a5c7cf8b8453042823b
nir: Add a find_variable_with_[driver_]location helper

We've hand-rolled this loop 10 places and those are just the ones I
found easily.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966>
src/amd/vulkan/radv_shader.c
src/compiler/nir/nir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_bitmap.c
src/compiler/nir/nir_lower_input_attachments.c
src/compiler/nir/nir_lower_point_size_mov.c
src/compiler/nir/nir_lower_two_sided_color.c
src/compiler/nir/nir_range_analysis.c
src/gallium/drivers/iris/iris_program.c
src/gallium/drivers/vc4/vc4_nir_lower_io.c
src/intel/compiler/brw_nir_lower_alpha_to_coverage.c