From 2b1d9a2afcc74185c1f901a2949c87b0288fad84 Mon Sep 17 00:00:00 2001 From: Ahmed Hesham Date: Tue, 21 Apr 2026 23:24:50 +0100 Subject: [PATCH] pan/bi: Restore b3210 as a valid swizzle `b3210` was not removed in v11, and is causing a failure in OpenCL-CTS when running `test_basic vector_swizzle`. `invalid_instruction` assertion was triggered with the message: ``` Invalid 8-bit widen: r3 = LSHIFT_OR.v4i8.flow2 u1.b3210, u256, u256.b0 ``` Restore `b3210` in the ISA XML file, and handle the case for it in `va_pack_widen`. Fixes: c36326d3 ("pan/bi: Remove b3210 from valid swizzle") Signed-off-by: Ahmed Hesham Reviewed-by: Lorenzo Rossi Reviewed-by: Christoph Pillmayer Part-of: --- src/panfrost/compiler/bifrost/valhall/ISA.xml | 3 +-- src/panfrost/compiler/bifrost/valhall/va_pack.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/panfrost/compiler/bifrost/valhall/ISA.xml b/src/panfrost/compiler/bifrost/valhall/ISA.xml index 43b292f2c57..47ba6928e89 100644 --- a/src/panfrost/compiler/bifrost/valhall/ISA.xml +++ b/src/panfrost/compiler/bifrost/valhall/ISA.xml @@ -164,8 +164,7 @@ b0123 - - + b3210 b0101 b2323 b0000 diff --git a/src/panfrost/compiler/bifrost/valhall/va_pack.c b/src/panfrost/compiler/bifrost/valhall/va_pack.c index 9665cc1cfd5..0790005e49a 100644 --- a/src/panfrost/compiler/bifrost/valhall/va_pack.c +++ b/src/panfrost/compiler/bifrost/valhall/va_pack.c @@ -250,6 +250,8 @@ va_pack_widen(const bi_instr *I, enum bi_swizzle swz, enum va_size size) switch (swz) { case BI_SWIZZLE_B0123: return VA_SWIZZLES_8_BIT_B0123; + case BI_SWIZZLE_B3210: + return VA_SWIZZLES_8_BIT_B3210; case BI_SWIZZLE_B0101: return VA_SWIZZLES_8_BIT_B0101; case BI_SWIZZLE_B2323: