aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_to_ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/nir/nir_to_ssa.c')
-rw-r--r--src/glsl/nir/nir_to_ssa.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/glsl/nir/nir_to_ssa.c b/src/glsl/nir/nir_to_ssa.c
index e73a6eef611..7fdae493887 100644
--- a/src/glsl/nir/nir_to_ssa.c
+++ b/src/glsl/nir/nir_to_ssa.c
@@ -630,7 +630,7 @@ destroy_rewrite_state(rewrite_state *state)
void
nir_convert_to_ssa_impl(nir_function_impl *impl)
{
- nir_calc_dominance_impl(impl);
+ nir_metadata_require(impl, nir_metadata_dominance);
insert_phi_nodes(impl);
@@ -641,6 +641,9 @@ nir_convert_to_ssa_impl(nir_function_impl *impl)
remove_unused_regs(impl, &state);
+ nir_metadata_preserve(impl, nir_metadata_block_index |
+ nir_metadata_dominance);
+
destroy_rewrite_state(&state);
}