diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 0da15340814..f22506989b1 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -4687,6 +4687,8 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler, goto out; } + so->branchstack = ctx->max_stack; + ir = so->ir = ctx->ir; if (gl_shader_stage_is_compute(so->type)) { @@ -5055,8 +5057,6 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler, ir3_instr_move_before(unlock, end); } - so->branchstack = ctx->max_stack; - so->pvtmem_size = ALIGN(so->pvtmem_size, compiler->pvtmem_per_fiber_align); /* Note that max_bary counts inputs that are not bary.f'd for FS: */