nir: Move nir_lower_mediump_outputs from ir3
[mesa.git] / src / compiler / nir / nir_lower_vars_to_ssa.c
index 4375f93dc3ca505464f6cdbcea8b0c1715075096..0077ddf50f3680af30097cdb9f00f4ded32d7ca6 100644 (file)
@@ -768,7 +768,9 @@ nir_lower_vars_to_ssa_impl(nir_function_impl *impl)
 
    state.phi_builder = nir_phi_builder_create(state.impl);
 
-   NIR_VLA(BITSET_WORD, store_blocks, BITSET_WORDS(state.impl->num_blocks));
+   BITSET_WORD *store_blocks =
+      ralloc_array(state.dead_ctx, BITSET_WORD,
+                   BITSET_WORDS(state.impl->num_blocks));
    foreach_list_typed(struct deref_node, node, direct_derefs_link,
                       &state.direct_deref_nodes) {
       if (!node->lower_to_ssa)
@@ -777,7 +779,8 @@ nir_lower_vars_to_ssa_impl(nir_function_impl *impl)
       memset(store_blocks, 0,
              BITSET_WORDS(state.impl->num_blocks) * sizeof(*store_blocks));
 
-      assert(node->path.path[0]->var->constant_initializer == NULL);
+      assert(node->path.path[0]->var->constant_initializer == NULL &&
+             node->path.path[0]->var->pointer_initializer == NULL);
 
       if (node->stores) {
          set_foreach(node->stores, store_entry) {