summaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-04-14 16:13:53 -0400
committerAlyssa Rosenzweig <[email protected]>2020-04-17 16:25:35 -0400
commit4570c34fc76c16c149d6040883b92c30abe70531 (patch)
tree7714ab00686330df7e71ab9a5114e39f595f2552 /src/panfrost
parentd3643cdd81bf2f1ad6ddf10d80e38d0ddaf9f908 (diff)
pan/bi: Add _MSCALE flag for FMA/ADD
So we can bias by exponents. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/bifrost/bi_print.c3
-rw-r--r--src/panfrost/bifrost/compiler.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c
index 5dc5947882e..d6440a5765a 100644
--- a/src/panfrost/bifrost/bi_print.c
+++ b/src/panfrost/bifrost/bi_print.c
@@ -366,6 +366,9 @@ bi_print_instruction(bi_instruction *ins, FILE *fp)
else
fprintf(fp, "%s", bi_class_name(ins->type));
+ if ((ins->type == BI_ADD || ins->type == BI_FMA) && ins->op.mscale)
+ fprintf(fp, ".mscale");
+
if (ins->type == BI_MINMAX)
fprintf(fp, "%s", bi_minmax_mode_name(ins->minmax));
else if (ins->type == BI_LOAD_VAR)
diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h
index c1350f480c5..2d3f1a13588 100644
--- a/src/panfrost/bifrost/compiler.h
+++ b/src/panfrost/bifrost/compiler.h
@@ -275,6 +275,9 @@ typedef struct {
enum bi_table_op table;
enum bi_frexp_op frexp;
enum bi_cond compare;
+
+ /* For FMA/ADD, should we add a biased exponent? */
+ bool mscale;
} op;
/* Union for class-specific information */