aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-03-18 11:08:07 -0400
committerMarge Bot <[email protected]>2020-03-19 03:23:07 +0000
commit1c0e786084f865d27b7be9d834855555fb0f049f (patch)
tree789e792d0921d977806ce0f42fa574c95e5a9526 /src/panfrost
parent6069904bbd46592d13a87520dc256c6006b12c50 (diff)
pan/bi: List ADD classes in bi_pack_add
Handling will be... somewhat tricky. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4242>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/bifrost/bi_pack.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c
index 325bd30a83a..a2bb6fed25c 100644
--- a/src/panfrost/bifrost/bi_pack.c
+++ b/src/panfrost/bifrost/bi_pack.c
@@ -348,8 +348,38 @@ bi_pack_fma(bi_clause *clause, bi_bundle bundle, struct bi_registers *regs)
static unsigned
bi_pack_add(bi_clause *clause, bi_bundle bundle, struct bi_registers *regs)
{
- /* TODO */
- return BIFROST_ADD_NOP;
+ if (!bundle.add)
+ return BIFROST_ADD_NOP;
+
+ switch (bundle.add->type) {
+ case BI_ADD:
+ case BI_ATEST:
+ case BI_BRANCH:
+ case BI_CMP:
+ case BI_BLEND:
+ case BI_BITWISE:
+ case BI_CONVERT:
+ case BI_DISCARD:
+ case BI_FREXP:
+ case BI_ISUB:
+ case BI_LOAD:
+ case BI_LOAD_UNIFORM:
+ case BI_LOAD_ATTR:
+ case BI_LOAD_VAR:
+ case BI_LOAD_VAR_ADDRESS:
+ case BI_MINMAX:
+ case BI_MOV:
+ case BI_SHIFT:
+ case BI_STORE:
+ case BI_STORE_VAR:
+ case BI_SPECIAL:
+ case BI_SWIZZLE:
+ case BI_TEX:
+ case BI_ROUND:
+ return BIFROST_ADD_NOP;
+ default:
+ unreachable("Cannot encode class as ADD");
+ }
}
struct bi_packed_bundle {