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 <ahmed.hesham@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
(cherry picked from commit 2b1d9a2afc)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41402>
This commit is contained in:
Ahmed Hesham 2026-04-21 23:24:50 +01:00 committed by Eric Engestrom
parent 4a4d410ba7
commit 7a1977a4e0
3 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -164,8 +164,7 @@
<enum name="Swizzles (8-bit)">
<value default="true">b0123</value>
<!-- b3210 until v11 -->
<reserved/>
<value>b3210</value>
<value>b0101</value>
<value>b2323</value>
<value>b0000</value>

View file

@ -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: