Mesa (staging/21.1): nir: return progress from nir_lower_packing

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 30 20:12:56 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: 24e2a9a4267e929ff24ac15718b22a18c23da8e5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=24e2a9a4267e929ff24ac15718b22a18c23da8e5

Author: Thomas H.P. Andersen <phomes at gmail.com>
Date:   Sun Jun 27 00:44:56 2021 +0200

nir: return progress from nir_lower_packing

Compiling with clang warns about an unused variable in
nir_lower_packing.

Tracking progress was added to nir_lower_packing in
adb157ddfd52ab495878a8b2b1bf70586d773aa2 but the function
will ignore the progress from impl calls and always return
false.

This patch changes it to return the progress. It fixes the
warning and should enable validation calls in NIR_PASS when
progress is made.

Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Fixes: adb157ddfd52 "nir: Return progress from nir_lower_64bit_pack()"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11615>
(cherry picked from commit ed530ac6c2088f03ee87bc7fa2a1956d887c4293)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index e1895240589..2c20aca0357 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -112,7 +112,7 @@
         "description": "nir: return progress from nir_lower_packing",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "adb157ddfd52ab495878a8b2b1bf70586d773aa2"
     },
diff --git a/src/compiler/nir/nir_lower_packing.c b/src/compiler/nir/nir_lower_packing.c
index 23e22d35f79..b162b84b31c 100644
--- a/src/compiler/nir/nir_lower_packing.c
+++ b/src/compiler/nir/nir_lower_packing.c
@@ -162,5 +162,5 @@ nir_lower_pack(nir_shader *shader)
          progress |= lower_pack_impl(function->impl);
    }
 
-   return false;
+   return progress;
 }



More information about the mesa-commit mailing list