summaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-03-18 23:12:38 -0400
committerMarge Bot <[email protected]>2020-03-19 03:23:07 +0000
commit73812999d92ed9812993f22a8807895d670fa4b8 (patch)
treee16bbc0423b549a380e603801fe96822d2897b38 /src/panfrost
parenta4fb88723e74041b53d3dddda5b08f3ec94510b6 (diff)
pan/bi: Pack BI_BLEND
MRT not yet supported to keep things easy. Signed-off-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4242> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4242>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/bifrost/bi_pack.c16
-rw-r--r--src/panfrost/bifrost/bifrost.h2
2 files changed, 18 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c
index 705a43e3531..2494cb55cdd 100644
--- a/src/panfrost/bifrost/bi_pack.c
+++ b/src/panfrost/bifrost/bi_pack.c
@@ -456,6 +456,20 @@ bi_pack_add_atest(bi_clause *clause, bi_instruction *ins, struct bi_registers *r
}
static unsigned
+bi_pack_add_blend(bi_instruction *ins, struct bi_registers *regs)
+{
+ struct bifrost_add_inst pack = {
+ .src0 = bi_get_src(ins, regs, 0, false),
+ .op = BIFROST_ADD_OP_BLEND
+ };
+
+ /* TODO: Pack location in uniform_const */
+ assert(ins->blend_location == 0);
+
+ RETURN_PACKED(pack);
+}
+
+static unsigned
bi_pack_add(bi_clause *clause, bi_bundle bundle, struct bi_registers *regs)
{
if (!bundle.add)
@@ -468,7 +482,9 @@ bi_pack_add(bi_clause *clause, bi_bundle bundle, struct bi_registers *regs)
return bi_pack_add_atest(clause, bundle.add, regs);
case BI_BRANCH:
case BI_CMP:
+ return BIFROST_ADD_NOP;
case BI_BLEND:
+ return bi_pack_add_blend(bundle.add, regs);
case BI_BITWISE:
case BI_CONVERT:
case BI_DISCARD:
diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h
index 9fb063c32af..dac4ad190dd 100644
--- a/src/panfrost/bifrost/bifrost.h
+++ b/src/panfrost/bifrost/bifrost.h
@@ -100,6 +100,8 @@ struct bifrost_fma_inst {
unsigned op : 20;
} __attribute__((packed));
+#define BIFROST_ADD_OP_BLEND (0x1952c)
+
struct bifrost_add_inst {
unsigned src0 : 3;
unsigned op : 17;