From d00d2ae701cc4e61bc14857f0d6b0cf6f8b3dccd Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 23 Jun 2022 18:06:03 -0400 Subject: [PATCH] pan/bi: Lower swizzles for 8-bit CSEL With OpenCL we can generate stuff like CSEL.u32.eq r0.b0000, we need to handle it when lowering swizzles. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/compiler/bi_lower_swizzle.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panfrost/compiler/bi_lower_swizzle.c b/src/panfrost/compiler/bi_lower_swizzle.c index fb9fe07..c9872ce 100644 --- a/src/panfrost/compiler/bi_lower_swizzle.c +++ b/src/panfrost/compiler/bi_lower_swizzle.c @@ -168,7 +168,10 @@ lower_swizzle(bi_context *ctx, bi_instr *ins, unsigned src) /* Lower it away */ bi_builder b = bi_init_builder(ctx, bi_before_instr(ins)); - bool is_8 = (bi_opcode_props[ins->op].size == BI_SIZE_8); + bool is_8 = (bi_opcode_props[ins->op].size == BI_SIZE_8) || + (bi_opcode_props[ins->op].size == BI_SIZE_32 && + ins->src[src].swizzle >= BI_SWIZZLE_B0000); + bi_index orig = ins->src[src]; bi_index stripped = bi_replace_index(bi_null(), orig); stripped.swizzle = ins->src[src].swizzle; -- 2.7.4