Module: Mesa
Branch: staging/23.3
Commit: 5ea94d17248a91e3598306ada8085a7c144adb15
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ea94d17248a91e3598306ada8085a7c144adb15

Author: Dave Airlie <[email protected]>
Date:   Mon Dec 18 16:47:56 2023 +1000

intel/compiler: move gen5 final pass to actually be final pass

This got broken by the register conversion, this pass needs to be
after all the others.

Fixes: ce75c3c3fea9 ("intel: Switch to intrinsic-based registers")
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26731>
(cherry picked from commit f76f4be301ef311e6be21486b6a3f5fd5e90240f)

---

 .pick_status.json            |  2 +-
 src/intel/compiler/brw_nir.c | 17 +++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 31d97296656..2f529e90646 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -984,7 +984,7 @@
         "description": "intel/compiler: move gen5 final pass to actually be 
final pass",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "ce75c3c3fea9d0c045587f3a8dfa33c1dc8cc222",
         "notes": null
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index 8da98b0fbfd..c36269fd015 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -1753,14 +1753,6 @@ brw_postprocess_nir(nir_shader *nir, const struct 
brw_compiler *compiler,
    if (OPT(nir_opt_rematerialize_compares))
       OPT(nir_opt_dce);
 
-   /* This is the last pass we run before we start emitting stuff.  It
-    * determines when we need to insert boolean resolves on Gen <= 5.  We
-    * run it last because it stashes data in instr->pass_flags and we don't
-    * want that to be squashed by other NIR passes.
-    */
-   if (devinfo->ver <= 5)
-      brw_nir_analyze_boolean_resolves(nir);
-
    OPT(nir_opt_dce);
 
    /* The mesh stages require this pass to be called at the last minute,
@@ -1773,6 +1765,15 @@ brw_postprocess_nir(nir_shader *nir, const struct 
brw_compiler *compiler,
       brw_nir_adjust_payload(nir, compiler);
 
    nir_trivialize_registers(nir);
+
+   /* This is the last pass we run before we start emitting stuff.  It
+    * determines when we need to insert boolean resolves on Gen <= 5.  We
+    * run it last because it stashes data in instr->pass_flags and we don't
+    * want that to be squashed by other NIR passes.
+    */
+   if (devinfo->ver <= 5)
+      brw_nir_analyze_boolean_resolves(nir);
+
    nir_sweep(nir);
 
    if (unlikely(debug_enabled)) {

Reply via email to