Commit 693271c0 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜 Committed by Marge Bot
Browse files

pan/bi: Add builder initialization helper

When going out of NIR, it's useful to start inserting instructions at
the end of the current block.
Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <>
Part-of: <mesa/mesa!8135>
parent 226dfa94
......@@ -36,6 +36,7 @@
#include "compiler.h"
#include "bi_quirks.h"
#include "bi_print.h"
#include "bi_builder.h"
static const struct debug_named_value debug_options[] = {
{"msgs", BIFROST_DBG_MSGS, "Print debug messages"},
......@@ -57,6 +58,15 @@ int bifrost_debug = 0;
fprintf(stderr, "%s:%d: "fmt, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0)
static inline bi_builder
bi_init_builder(bi_context *ctx)
return (bi_builder) {
.shader = ctx,
.cursor = bi_after_block(ctx->current_block)
static bi_block *emit_cf_list(bi_context *ctx, struct exec_list *list);
static bi_instruction *bi_emit_branch(bi_context *ctx);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment