nir: add a nir_opt_if_options enum

And don't enable nir_opt_if_optimize_phi_true_false on radeonsi with
LLVM 14 because it crashes Blender.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6976
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17949>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2022-08-08 17:12:14 +02:00
committed by Marge Bot
parent 0ca0d2d450
commit 70891edd97
20 changed files with 39 additions and 29 deletions

View File

@@ -75,7 +75,7 @@ gl_nir_opts(nir_shader *nir)
NIR_PASS(progress, nir, nir_copy_prop);
NIR_PASS(progress, nir, nir_opt_dce);
}
NIR_PASS(progress, nir, nir_opt_if, false);
NIR_PASS(progress, nir, nir_opt_if, 0);
NIR_PASS(progress, nir, nir_opt_dead_cf);
NIR_PASS(progress, nir, nir_opt_cse);
NIR_PASS(progress, nir, nir_opt_peephole_select, 8, true, true);