From 04d6c593d03efbda42140754b9053bb0df7aac8d Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 2 Jun 2021 10:17:55 +0200 Subject: [PATCH] pan/bi: Relax check on 8bit swizzles Allow extracting components Y, Z or W from an 8bit vector. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Reviewed-by: Tomeu Vizoso Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 16c12780d49..3c4cf106d5e 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -1445,8 +1445,8 @@ bi_alu_src_index(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] == 0 && "8-bit vectors not supported"); - idx.swizzle = BI_SWIZZLE_B0000; + assert(src.swizzle[0] < 4 && "8-bit vectors not supported"); + idx.swizzle = BI_SWIZZLE_B0000 + src.swizzle[0]; } return idx;