Mesa (main): nir/lower_io: preserve all metadata when no progress

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 5 11:53:14 UTC 2021


Module: Mesa
Branch: main
Commit: d0a3a112581ad06a82a7d46dfa8702f1e64f9a97
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0a3a112581ad06a82a7d46dfa8702f1e64f9a97

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Mon Oct  4 21:24:00 2021 +0300

nir/lower_io: preserve all metadata when no progress

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13168>

---

 src/compiler/nir/nir_lower_io.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index d96efb49fda..faaa1d717c2 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -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;



More information about the mesa-commit mailing list