ir3: Set branchstack earlier

We were relying on it in RA to tell us whether we could give more
registers to the shader mostly "for free" (because occupancy is bounded
by the branchstack), but it turns out it was actually 0 so we weren't
taking advantage of it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22072>
This commit is contained in:
Connor Abbott
2023-02-13 12:58:24 +01:00
committed by Marge Bot
parent fa22b0901a
commit 6ad0cbafe8

View File

@@ -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: */