nir/lower_io: preserve all metadata when no progress

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13168>
This commit is contained in:
Lionel Landwerlin 2021-10-04 21:24:00 +03:00 committed by Marge Bot
parent fb2d031047
commit d0a3a11258

View file

@ -2129,6 +2129,8 @@ nir_lower_explicit_io_impl(nir_function_impl *impl, nir_variable_mode modes,
if (progress) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance);
} else {
nir_metadata_preserve(impl, nir_metadata_all);
}
return progress;
@ -2222,6 +2224,8 @@ nir_lower_vars_to_explicit_types_impl(nir_function_impl *impl,
nir_metadata_dominance |
nir_metadata_live_ssa_defs |
nir_metadata_loop_analysis);
} else {
nir_metadata_preserve(impl, nir_metadata_all);
}
return progress;