mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
nir: Add fclamp_pos opcode
Corresponds to the .pos modifier on all Mali GPUs (lima and panfrost). Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102>
This commit is contained in:
parent
0aedce417a
commit
c2b0f3c17d
1 changed files with 1 additions and 0 deletions
|
|
@ -201,6 +201,7 @@ unop("iabs", tint, "(src0 < 0) ? -src0 : src0")
|
|||
unop("fabs", tfloat, "fabs(src0)")
|
||||
unop("fsat", tfloat, ("fmin(fmax(src0, 0.0), 1.0)"))
|
||||
unop("fsat_signed", tfloat, ("fmin(fmax(src0, -1.0), 1.0)"))
|
||||
unop("fclamp_pos", tfloat, ("fmax(src0, 0.0)"))
|
||||
unop("frcp", tfloat, "bit_size == 64 ? 1.0 / src0 : 1.0f / src0")
|
||||
unop("frsq", tfloat, "bit_size == 64 ? 1.0 / sqrt(src0) : 1.0f / sqrtf(src0)")
|
||||
unop("fsqrt", tfloat, "bit_size == 64 ? sqrt(src0) : sqrtf(src0)")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue