nir: Add new opcode for ternary addition

v2:
- Make it 2src commutative (Connor Abbott)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11596>
This commit is contained in:
Sagar Ghuge 2020-06-05 22:52:33 -07:00 committed by Marge Bot
parent 6e17931d21
commit e8dff256c0

View file

@ -957,6 +957,9 @@ if (nir_is_rounding_mode_rtz(execution_mode, bit_size)) {
triop("flrp", tfloat, "", "src0 * (1 - src2) + src1 * src2")
# Ternary addition
triop("iadd3", tint, _2src_commutative + associative, "src0 + src1 + src2")
# Conditional Select
#
# A vector conditional select instruction (like ?:, but operating per-