mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-06 10:00:30 +01:00
nir: use MIN2/MAX2 opcodes for imin/umax folding
This is more idiomatic and already #include'd. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30075>
This commit is contained in:
parent
e8db5759b8
commit
7fc5a2296b
1 changed files with 4 additions and 4 deletions
|
|
@ -928,11 +928,11 @@ opcode("fdph_replicated", 0, tfloat, [3, 4], [tfloat, tfloat], False, "",
|
|||
"src0.x * src1.x + src0.y * src1.y + src0.z * src1.z + src1.w")
|
||||
|
||||
binop("fmin", tfloat, _2src_commutative + associative, "fmin(src0, src1)")
|
||||
binop("imin", tint, _2src_commutative + associative, "src1 > src0 ? src0 : src1")
|
||||
binop("umin", tuint, _2src_commutative + associative, "src1 > src0 ? src0 : src1")
|
||||
binop("imin", tint, _2src_commutative + associative, "MIN2(src0, src1)")
|
||||
binop("umin", tuint, _2src_commutative + associative, "MIN2(src0, src1)")
|
||||
binop("fmax", tfloat, _2src_commutative + associative, "fmax(src0, src1)")
|
||||
binop("imax", tint, _2src_commutative + associative, "src1 > src0 ? src1 : src0")
|
||||
binop("umax", tuint, _2src_commutative + associative, "src1 > src0 ? src1 : src0")
|
||||
binop("imax", tint, _2src_commutative + associative, "MAX2(src0, src1)")
|
||||
binop("umax", tuint, _2src_commutative + associative, "MAX2(src0, src1)")
|
||||
|
||||
binop("fpow", tfloat, "", "bit_size == 64 ? pow(src0, src1) : powf(src0, src1)")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue