From 0e2e2dedf0bb3f10c0d60b1c19e6f1192d0aa21b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 11 Jun 2026 12:15:09 +1000 Subject: [PATCH] ir3: use the correct builder for adding preamble to main. ir3 switches builder from main to preamble, but then adds instructions to main using the preamble builder. This wasn't a problem before, but we now store function impl in blocks and this breaks that. Reviewed-by: Job Noorman Part-of: --- src/freedreno/ir3/ir3_nir_opt_preamble.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedreno/ir3/ir3_nir_opt_preamble.c b/src/freedreno/ir3/ir3_nir_opt_preamble.c index 5a8675e6ceb..9888fa9b6d8 100644 --- a/src/freedreno/ir3/ir3_nir_opt_preamble.c +++ b/src/freedreno/ir3/ir3_nir_opt_preamble.c @@ -964,6 +964,7 @@ ir3_nir_lower_preamble(nir_shader *nir, struct ir3_shader_variant *v) */ /* @decl_regs need to stay in the first block. */ + b = &builder_main; b->cursor = nir_after_reg_decls(main); nir_if *outer_if = nir_push_if(b, nir_preamble_start_ir3(b, 1));