Mesa (staging/20.1): nir/lower_double_ops: Rework the if (progress) tree

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 22 23:21:12 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 014a437f6f3232025abb2894192f13fc3470da3a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=014a437f6f3232025abb2894192f13fc3470da3a

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 24 09:05:32 2019 -0500

nir/lower_double_ops: Rework the if (progress) tree

Fixes: d7d35a9522 "nir/lower_doubles: Use the new NIR lowering..."
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5170>
(cherry picked from commit 111b0a669979cf277f31c69f501982fee004e067)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index 6f9b3eb6ef3..91237439404 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -40,7 +40,7 @@
         "description": "nir/lower_double_ops: Rework the if (progress) tree",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "d7d35a9522ea5b524732a8b730008d725b84abdf"
     },
diff --git a/src/compiler/nir/nir_lower_double_ops.c b/src/compiler/nir/nir_lower_double_ops.c
index bb2476523ec..f9c93a910a5 100644
--- a/src/compiler/nir/nir_lower_double_ops.c
+++ b/src/compiler/nir/nir_lower_double_ops.c
@@ -753,7 +753,14 @@ nir_lower_doubles_impl(nir_function_impl *impl,
        * inlining.
        */
       nir_opt_deref_impl(impl);
-   }
+   } else if (progress) {
+      nir_metadata_preserve(impl, nir_metadata_block_index |
+                                  nir_metadata_dominance);
+    } else {
+#ifndef NDEBUG
+      impl->valid_metadata &= ~nir_metadata_not_properly_reset;
+#endif
+    }
 
    return progress;
 }



More information about the mesa-commit mailing list