pan/bi: Delete a few instruction encodings

The non-trivial non-replicate swizzles on IADD.v4x8 and ISUB.v4x8 are
either documented wrong or broken in hardware.  Instead of swizzling
b0101 and b2323, they swizzle b0011 and b2233 on G52.  This is either a
hardware bug or an issue with documentation.  In either case, it's
probably best not to trust it.  Those swizzles aren't all that useful
anyway.  We also weren't using any of them before (or they'd have
broken) so this isn't a performance regression.

Cc: mesa-stable
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit 538b5c411e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
This commit is contained in:
Faith Ekstrand 2026-03-30 20:59:46 -04:00 committed by Eric Engestrom
parent 7cf57ccd9c
commit ddf6c31b8e
2 changed files with 37 additions and 1 deletions

View file

@ -3964,7 +3964,7 @@
"description": "pan/bi: Delete a few instruction encodings",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -5350,8 +5350,15 @@
<opt>b1111</opt>
<opt>b2222</opt>
<opt>b3333</opt>
<!--
The docs claim that b0101 and b2323 are also supported but they don't
appear to work. Instead, they seem to be b0011 and b2233 swizzles in
practice. Instead of emitting shaders that violate the HW docs, we
simply don't claim support for these swizzles. These swizzles aren't
that useful anyway.
<opt>b0101</opt>
<opt>b2323</opt>
-->
</mod>
<encoding mask="0xffec0" exact="0xbc400">
<and>
@ -5376,6 +5383,7 @@
<eq left="lanes1" right="#b3333"/>
</derived>
</encoding>
<!--
<encoding mask="0xffcc0" exact="0xbe840">
<and>
<eq left="lanes0" right="#b0123"/>
@ -5389,6 +5397,7 @@
<eq left="lanes1" right="#b2323"/>
</derived>
</encoding>
-->
</ins>
<ins name="IADD.v4u8" unit="add">
@ -5404,8 +5413,15 @@
<opt>b1111</opt>
<opt>b2222</opt>
<opt>b3333</opt>
<!--
The docs claim that b0101 and b2323 are also supported but they don't
appear to work. Instead, they seem to be b0011 and b2233 swizzles in
practice. Instead of emitting shaders that violate the HW docs, we
simply don't claim support for these swizzles. These swizzles aren't
that useful anyway.
<opt>b0101</opt>
<opt>b2323</opt>
-->
</mod>
<encoding mask="0xffe40" exact="0xbc400">
<and>
@ -5438,6 +5454,7 @@
<eq left="lanes1" right="#b3333"/>
</derived>
</encoding>
<!--
<encoding mask="0xffc40" exact="0xbe840">
<and>
<eq left="lanes0" right="#b0123"/>
@ -5455,6 +5472,7 @@
<eq left="lanes1" right="#b2323"/>
</derived>
</encoding>
-->
</ins>
<ins name="ICMP.i32" mask="0xffb80" exact="0x7b300" unit="add">
@ -6075,8 +6093,15 @@
<opt>b1111</opt>
<opt>b2222</opt>
<opt>b3333</opt>
<!--
The docs claim that b0101 and b2323 are also supported but they don't
appear to work. Instead, they seem to be b0011 and b2233 swizzles in
practice. Instead of emitting shaders that violate the HW docs, we
simply don't claim support for these swizzles. These swizzles aren't
that useful anyway.
<opt>b0101</opt>
<opt>b2323</opt>
-->
</mod>
<encoding mask="0xffec0" exact="0xbd400">
<and>
@ -6101,6 +6126,7 @@
<eq left="lanes1" right="#b3333"/>
</derived>
</encoding>
<!--
<encoding mask="0xffcc0" exact="0xbf840">
<and>
<eq left="lanes0" right="#b0123"/>
@ -6114,6 +6140,7 @@
<eq left="lanes1" right="#b2323"/>
</derived>
</encoding>
-->
</ins>
<ins name="ISUB.v4u8" unit="add">
@ -6129,8 +6156,15 @@
<opt>b1111</opt>
<opt>b2222</opt>
<opt>b3333</opt>
<!--
The docs claim that b0101 and b2323 are also supported but they don't
appear to work. Instead, they seem to be b0011 and b2233 swizzles in
practice. Instead of emitting shaders that violate the HW docs, we
simply don't claim support for these swizzles. These swizzles aren't
that useful anyway.
<opt>b0101</opt>
<opt>b2323</opt>
-->
</mod>
<encoding mask="0xffe40" exact="0xbd400">
<and>
@ -6163,6 +6197,7 @@
<eq left="lanes1" right="#b3333"/>
</derived>
</encoding>
<!--
<encoding mask="0xffc40" exact="0xbf840">
<and>
<eq left="lanes0" right="#b0123"/>
@ -6180,6 +6215,7 @@
<eq left="lanes1" right="#b2323"/>
</derived>
</encoding>
-->
</ins>
<ins name="JUMP" mask="0xffe3f" exact="0x6fe34" last="true" dests="0" unit="add">