From aea40091f003f8772afce3562b0f8c6a17dad07f Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 2 Nov 2015 21:02:37 -0800 Subject: nir: Properly invalidate metadata in nir_lower_global_vars_to_local(). v2: Preserve nir_metadata_live_variables as well (caught by Jason). Signed-off-by: Kenneth Graunke Reviewed-by: Jason Ekstrand Reviewed-by: Eduardo Lima Mitev --- src/glsl/nir/nir_lower_global_vars_to_local.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/glsl/nir/nir_lower_global_vars_to_local.c b/src/glsl/nir/nir_lower_global_vars_to_local.c index fab236611a5..dcd091ae2fa 100644 --- a/src/glsl/nir/nir_lower_global_vars_to_local.c +++ b/src/glsl/nir/nir_lower_global_vars_to_local.c @@ -100,6 +100,9 @@ nir_lower_global_vars_to_local(nir_shader *shader) exec_node_remove(&var->node); var->data.mode = nir_var_local; exec_list_push_tail(&impl->locals, &var->node); + nir_metadata_preserve(impl, nir_metadata_block_index | + nir_metadata_dominance | + nir_metadata_live_variables); progress = true; } } -- cgit v1.2.3