This ensures names are meaningful.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260>
_mesa_hash_pointer,
_mesa_key_pointer_equal);
- blk->base.name = ctx->block_name_count++;
-
return blk;
}
break; /* TODO: Multi-function shaders */
}
+ unsigned block_source_count = 0;
+
bi_foreach_block(ctx, _block) {
bi_block *block = (bi_block *) _block;
+
+ /* Name blocks now that we're done emitting so the order is
+ * consistent */
+ block->base.name = block_source_count++;
+
bi_lower_combine(ctx, block);
}
/* During NIR->BIR */
nir_function_impl *impl;
bi_block *current_block;
- unsigned block_name_count;
bi_block *after_block;
bi_block *break_block;
bi_block *continue_block;