mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
nir: unmark 24b multiply as associative
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Suggested-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Mel Henning <mhenning@darkrefraction.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36257>
This commit is contained in:
parent
076f245df8
commit
b9c2579ae0
1 changed files with 4 additions and 4 deletions
|
|
@ -1442,7 +1442,7 @@ opcode("lea_nv", 0, tuint, [0, 0, 0], [tuint, tuint, tuint32], False,
|
|||
"", "src0 + (src1 << (src2 % bit_size))")
|
||||
|
||||
# 24b multiply into 32b result (with sign extension)
|
||||
binop("imul24", tint32, _2src_commutative + associative,
|
||||
binop("imul24", tint32, _2src_commutative,
|
||||
"(((int32_t)src0 << 8) >> 8) * (((int32_t)src1 << 8) >> 8)")
|
||||
|
||||
# unsigned 24b multiply into 32b result plus 32b int
|
||||
|
|
@ -1450,13 +1450,13 @@ triop("umad24", tuint32, _2src_commutative,
|
|||
"(((uint32_t)src0 << 8) >> 8) * (((uint32_t)src1 << 8) >> 8) + src2")
|
||||
|
||||
# unsigned 24b multiply into 32b result uint
|
||||
binop("umul24", tint32, _2src_commutative + associative,
|
||||
binop("umul24", tint32, _2src_commutative,
|
||||
"(((uint32_t)src0 << 8) >> 8) * (((uint32_t)src1 << 8) >> 8)")
|
||||
|
||||
# relaxed versions of the above, which assume input is in the 24bit range (no clamping)
|
||||
binop("imul24_relaxed", tint32, _2src_commutative + associative, "src0 * src1")
|
||||
binop("imul24_relaxed", tint32, _2src_commutative, "src0 * src1")
|
||||
triop("umad24_relaxed", tuint32, _2src_commutative, "src0 * src1 + src2")
|
||||
binop("umul24_relaxed", tuint32, _2src_commutative + associative, "src0 * src1")
|
||||
binop("umul24_relaxed", tuint32, _2src_commutative, "src0 * src1")
|
||||
|
||||
unop_convert("fisnormal", tbool1, tfloat, "isnormal(src0)")
|
||||
unop_convert("fisfinite", tbool1, tfloat, "isfinite(src0)")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue