From 3d78cc5876060015bfa277e2c3dfa424e599af1a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 4 May 2021 12:01:06 -0400 Subject: [PATCH] pan/bi: Change swizzled scalars to identity Allows packing for things like IADD.v2s16 Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_lower_swizzle.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/bifrost/bi_lower_swizzle.c b/src/panfrost/bifrost/bi_lower_swizzle.c index bae7739660d..5f396827fdf 100644 --- a/src/panfrost/bifrost/bi_lower_swizzle.c +++ b/src/panfrost/bifrost/bi_lower_swizzle.c @@ -77,7 +77,10 @@ bi_lower_swizzle_16(bi_context *ctx, bi_instr *ins, unsigned src) /* If the instruction is scalar we can ignore the other component */ if (ins->dest[0].swizzle == BI_SWIZZLE_H00 && ins->src[src].swizzle == BI_SWIZZLE_H00) + { + ins->src[src].swizzle = BI_SWIZZLE_H01; return; + } /* Lower it away */ bi_builder b = bi_init_builder(ctx, bi_before_instr(ins));