Mesa (master): pan/mdg: externalize mir_pack_mod
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 30 23:13:18 UTC 2020
Module: Mesa
Branch: master
Commit: 5299239c2eab480f4fc1c3ee375d3d3f82102598
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5299239c2eab480f4fc1c3ee375d3d3f82102598
Author: Italo Nicola <italonicola at collabora.com>
Date: Thu Jul 30 16:20:26 2020 +0000
pan/mdg: externalize mir_pack_mod
midgard_print.c requires mir_pack_mod to remove references to ins->alu.
Signed-off-by: Italo Nicola <italonicola at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
---
src/panfrost/midgard/helpers.h | 4 ++++
src/panfrost/midgard/midgard_emit.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/panfrost/midgard/helpers.h b/src/panfrost/midgard/helpers.h
index c11cdf65f0f..36d64957f47 100644
--- a/src/panfrost/midgard/helpers.h
+++ b/src/panfrost/midgard/helpers.h
@@ -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,
diff --git a/src/panfrost/midgard/midgard_emit.c b/src/panfrost/midgard/midgard_emit.c
index 5878669afe1..d69cc05a798 100644
--- a/src/panfrost/midgard/midgard_emit.c
+++ b/src/panfrost/midgard/midgard_emit.c
@@ -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);
More information about the mesa-commit
mailing list