pan/mdg: externalize mir_pack_mod
authorItalo Nicola <italonicola@collabora.com>
Thu, 30 Jul 2020 16:20:26 +0000 (16:20 +0000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Jul 2020 22:55:36 +0000 (22:55 +0000)
midgard_print.c requires mir_pack_mod to remove references to ins->alu.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>

src/panfrost/midgard/helpers.h
src/panfrost/midgard/midgard_emit.c

index c11cdf65f0f048f680f9ad8f93f56331cb1af168..36d64957f4729b73f811fabf85b247e671f16f66 100644 (file)
@@ -328,6 +328,10 @@ midgard_is_branch_unit(unsigned unit)
         return (unit == ALU_ENAB_BRANCH) || (unit == ALU_ENAB_BR_COMPACT);
 }
 
+/* Packs ALU mod argument */
+struct midgard_instruction;
+unsigned mir_pack_mod(struct midgard_instruction *ins, unsigned i, bool scalar);
+
 void
 mir_print_constant_component(FILE *fp, const midgard_constants *consts,
                              unsigned c, midgard_reg_mode reg_mode, bool half,
index 5878669afe15fc3289fc246428d23caa7a6a8f27..d69cc05a798f92971285082514a2460b53d5a3dd 100644 (file)
@@ -43,7 +43,7 @@ mir_get_imod(bool shift, nir_alu_type T, bool half, bool scalar)
                 return midgard_int_zero_extend;
 }
 
-static unsigned
+unsigned
 mir_pack_mod(midgard_instruction *ins, unsigned i, bool scalar)
 {
         bool integer = midgard_is_integer_op(ins->op);