Module: Mesa
Branch: main
Commit: 6dbb5f1e07b11be0cc6ac764bf1b51feaa7fa623
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6dbb5f1e07b11be0cc6ac764bf1b51feaa7fa623

Author: Lionel Landwerlin <lionel.g.landwer...@intel.com>
Date:   Thu Nov 16 21:24:31 2023 +0200

intel/fs: rerun divergence analysis prior to convert_from_ssa

Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9964
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26235>

---

 src/intel/compiler/brw_nir.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c
index 27246915884..073193308a8 100644
--- a/src/intel/compiler/brw_nir.c
+++ b/src/intel/compiler/brw_nir.c
@@ -1738,6 +1738,13 @@ brw_postprocess_nir(nir_shader *nir, const struct 
brw_compiler *compiler,
 
    nir_validate_ssa_dominance(nir, "before nir_convert_from_ssa");
 
+   /* Rerun the divergence analysis before convert_from_ssa as this pass has
+    * some assert on consistent divergence flags.
+    */
+   NIR_PASS(_, nir, nir_convert_to_lcssa, true, true);
+   NIR_PASS_V(nir, nir_divergence_analysis);
+   OPT(nir_opt_remove_phis);
+
    OPT(nir_convert_from_ssa, true);
 
    if (!is_scalar) {

Reply via email to