From 1c0e786084f865d27b7be9d834855555fb0f049f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 18 Mar 2020 11:08:07 -0400 Subject: pan/bi: List ADD classes in bi_pack_add Handling will be... somewhat tricky. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_pack.c | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'src') 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 { -- cgit v1.2.3