nir: Properly invalidate metadata in nir_lower_global_vars_to_local().
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 3 Nov 2015 05:02:37 +0000 (21:02 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 4 Nov 2015 01:06:48 +0000 (17:06 -0800)
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>
src/glsl/nir/nir_lower_global_vars_to_local.c

index fab236611a55b741836aea4fd7ddc8cabf4a48df..dcd091ae2fa6e098f1cb36b246b4a379f068c95e 100644 (file)
@@ -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;
       }
    }