From f9a01af4f31067b83a0b02a3dfd4af4296eef80d Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 24 Jun 2022 14:53:48 -0400 Subject: [PATCH] pan/bi: Allow selecting from an 8-bit vec8 The word offset is already handled by the above code, there's no need to restrict the further restrict the swizzle. This pattern can come up with OpenCL. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 4ed0806518f..a3ceea42912 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -1992,8 +1992,7 @@ bi_alu_src_index(bi_builder *b, nir_alu_src src, unsigned comps) } else if (bitsize == 8) { /* 8-bit vectors not yet supported */ assert(comps == 1 && "8-bit vectors not supported"); - assert(src.swizzle[0] < 4 && "8-bit vectors not supported"); - idx.swizzle = BI_SWIZZLE_B0000 + src.swizzle[0]; + idx.swizzle = BI_SWIZZLE_B0000 + (src.swizzle[0] & 3); } return idx;