From 7a1977a4e07b1d6bdad16fb8b48b9b1a70bc55e1 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 (cherry picked from commit 2b1d9a2afcc74185c1f901a2949c87b0288fad84) Part-of: --- .pick_status.json | 2 +- src/panfrost/compiler/bifrost/valhall/ISA.xml | 3 +-- src/panfrost/compiler/bifrost/valhall/va_pack.c | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d86967e0184..ab8f2c950a7 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -394,7 +394,7 @@ "description": "pan/bi: Restore b3210 as a valid swizzle", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "c36326d3afc453c23c8e3bb55d27a7443c89f06c", "notes": null 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: