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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 16 19:33:37 UTC 2022


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

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 e8ede95c5ec..1e7e1b06dd5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -644,7 +644,7 @@
         "description": "nir: Preserve metadata if remove_dead_derefs makes no progress",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "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