Mesa (staging/22.1): nir: Preserve metadata if remove_dead_derefs makes no progress

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 16 17:21:02 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: f77526a3b8cd576f691c71bf78e2a87b03202b79
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f77526a3b8cd576f691c71bf78e2a87b03202b79

Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date:   Thu May 12 13:59:30 2022 -0500

nir: Preserve metadata if remove_dead_derefs makes no progress

Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16482>
(cherry picked from commit c23b20d43a03634bf528f9870cdd5b0159a69eb4)

---

 .pick_status.json            | 2 +-
 src/compiler/nir/nir_deref.c | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 4f99b49ef78..0028d480218 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -724,7 +724,7 @@
         "description": "nir: Preserve metadata if remove_dead_derefs makes no progress",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/compiler/nir/nir_deref.c b/src/compiler/nir/nir_deref.c
index cb6847ac9b8..15e96908bf4 100644
--- a/src/compiler/nir/nir_deref.c
+++ b/src/compiler/nir/nir_deref.c
@@ -376,9 +376,12 @@ nir_remove_dead_derefs_impl(nir_function_impl *impl)
       }
    }
 
-   if (progress)
+   if (progress) {
       nir_metadata_preserve(impl, nir_metadata_block_index |
                                   nir_metadata_dominance);
+   } else {
+      nir_metadata_preserve(impl, nir_metadata_all);
+   }
 
    return progress;
 }



More information about the mesa-commit mailing list