summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-11-02 21:02:37 -0800
committerKenneth Graunke <kenneth@whitecape.org>2015-11-03 17:06:48 -0800
commitaea40091f003f8772afce3562b0f8c6a17dad07f (patch)
treea186f43ceff97181a4585123068d25c596c17742
parent531be601d5f9ac4f8a9cc77240ba865fda077709 (diff)
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 <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
-rw-r--r--src/glsl/nir/nir_lower_global_vars_to_local.c3
1 files changed, 3 insertions, 0 deletions
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 fab236611a..dcd091ae2f 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;
}
}