Mesa (main): pan/va: Add MUX.v2i16 and MUX.v4i8 opcodes
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 25 22:14:24 UTC 2022
Module: Mesa
Branch: main
Commit: 20fce28dfd5e41cc6e455e83d569475df74990f5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=20fce28dfd5e41cc6e455e83d569475df74990f5
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Fri Feb 25 14:18:44 2022 -0500
pan/va: Add MUX.v2i16 and MUX.v4i8 opcodes
Basically identical to MUX.i32, slight differences in opcode and swizzling only.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15182>
---
src/panfrost/bifrost/valhall/ISA.xml | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/src/panfrost/bifrost/valhall/ISA.xml b/src/panfrost/bifrost/valhall/ISA.xml
index 5ab5eae2f7a..30728e033e3 100644
--- a/src/panfrost/bifrost/valhall/ISA.xml
+++ b/src/panfrost/bifrost/valhall/ISA.xml
@@ -1721,6 +1721,34 @@
<src>Mask</src>
</ins>
+ <ins name="MUX.v2i16" title="Mux" dests="1" opcode="0xB9" unit="SFU">
+ <desc>
+ Mux between A and B based on the provided mask. The condition specified
+ as the `mux` modifier is evaluated on the mask. If true, `A` is chosen,
+ else `B` is chosen. The `bit` modifier acts bitwise, equivalent to
+ `bitselect()` in OpenCL, so `MUX.i32.bit A, B, mask` calculates
+ `(A & mask) | (A & ~mask)`.
+ </desc>
+ <mod name="mux" start="32" size="2"/>
+ <src swizzle="true">A</src>
+ <src swizzle="true">B</src>
+ <src swizzle="true">Mask</src>
+ </ins>
+
+ <ins name="MUX.v4i8" title="Mux" dests="1" opcode="0xBA" unit="SFU">
+ <desc>
+ Mux between A and B based on the provided mask. The condition specified
+ as the `mux` modifier is evaluated on the mask. If true, `A` is chosen,
+ else `B` is chosen. The `bit` modifier acts bitwise, equivalent to
+ `bitselect()` in OpenCL, so `MUX.i32.bit A, B, mask` calculates
+ `(A & mask) | (A & ~mask)`.
+ </desc>
+ <mod name="mux" start="32" size="2"/>
+ <src>A</src>
+ <src>B</src>
+ <src>Mask</src>
+ </ins>
+
<ins name="CUBE_SSEL" title="Cube S-coordinate select" dests="1" opcode="0xBC" opcode2="0" unit="SFU">
<desc>During a cube map transform, select the S coordinate given a selected face.</desc>
<src absneg="true">Z coordinate as 32-bit floating point</src>
More information about the mesa-commit
mailing list