From e6293425bfe582e15b7a1460b14e33835b90c98f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 13 May 2020 18:24:25 -0400 Subject: [PATCH] pan/mdg: Pack 8-bit swizzles in 16-bit ops Let's inch closer to 8-bit. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/midgard/midgard_emit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panfrost/midgard/midgard_emit.c b/src/panfrost/midgard/midgard_emit.c index e4911c1faf4..c8340f9e44d 100644 --- a/src/panfrost/midgard/midgard_emit.c +++ b/src/panfrost/midgard/midgard_emit.c @@ -257,9 +257,12 @@ mir_pack_swizzle(unsigned mask, unsigned *swizzle, /* Replicate for now.. should really pick a side for * dot products */ - if (reg_mode == midgard_reg_mode_16) { + if (reg_mode == midgard_reg_mode_16 && sz == 16) { *rep_low = !upper; *rep_high = upper; + } else if (reg_mode == midgard_reg_mode_16 && sz == 8) { + *rep_low = upper; + *rep_high = upper; } else if (reg_mode == midgard_reg_mode_32) { *rep_low = upper; } else { -- 2.30.2