pan/bi: Get rid of the regs argument in bi_assign_fau_idx()
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 12 Oct 2020 09:07:45 +0000 (11:07 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Thu, 15 Oct 2020 06:05:23 +0000 (08:05 +0200)
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>

src/panfrost/bifrost/bi_pack.c

index 195cc72..1d33bed 100644 (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);