nir: call nir_metadata_preserve at nir_remove_unused_io_vars
authorAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 18 Jul 2022 13:28:16 +0000 (15:28 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 20 Jul 2022 11:35:24 +0000 (11:35 +0000)
commit8d3ce4eb06e2a27069c8b9f90edb04e8c5da4e30
tree7d93614e7997e9e1bf3692aed548e6243675ce79
parentd8fee4cdaa45dcb9acd7626e18cc393394001d91
nir: call nir_metadata_preserve at nir_remove_unused_io_vars

Without it we got a metadata assert:
deqp-vk: ../src/compiler/nir/nir_metadata.c:108: nir_metadata_check_validation_flag: Assertion `!(function->impl->valid_metadata & nir_metadata_not_properly_reset)' failed

if we try to use NIR_PASS(_, instead of NIR_PASS_V (that among other
things, do more validations).

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609>
src/compiler/nir/nir_linking_helpers.c