pan/bi: Get rid of the regs argument in bi_assign_fau_idx()

Regs are already part of the bundle struct, let's just pass a pointer
to this bundle object instead of passing both the bundle and regs.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
This commit is contained in:
Boris Brezillon
2020-10-12 11:07:45 +02:00
parent f25850bf5f
commit 6dd2a76126
+4 -5
View File
@@ -196,13 +196,12 @@ bi_assign_fau_idx_single(bi_registers *regs,
static void
bi_assign_fau_idx(bi_clause *clause,
bi_registers *regs,
bi_bundle bundle)
bi_bundle *bundle)
{
bool assigned =
bi_assign_fau_idx_single(regs, clause, bundle.fma, false, true);
bi_assign_fau_idx_single(&bundle->regs, clause, bundle->fma, false, true);
bi_assign_fau_idx_single(regs, clause, bundle.add, assigned, false);
bi_assign_fau_idx_single(&bundle->regs, clause, bundle->add, assigned, false);
}
/* Assigns a slot for reading, before anything is written */
@@ -894,7 +893,7 @@ static struct bi_packed_bundle
bi_pack_bundle(bi_clause *clause, bi_bundle bundle, bi_bundle prev, bool first_bundle, gl_shader_stage stage)
{
bi_assign_slots(&bundle, &prev);
bi_assign_fau_idx(clause, &bundle.regs, bundle);
bi_assign_fau_idx(clause, &bundle);
bundle.regs.first_instruction = first_bundle;
bi_flip_slots(&bundle.regs);