diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-05-01 12:15:10 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-19 20:21:27 +0000 |
commit | c2b0f3c17d055152795c022da8202043baa3e15f (patch) | |
tree | 6d1b95d4bbdfb9cf5ee7ead38bf5e6a34322ac41 | |
parent | 0aedce417ae48293f8bebd41c3d69b759b003cf1 (diff) |
nir: Add fclamp_pos opcode
Corresponds to the .pos modifier on all Mali GPUs (lima and panfrost).
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5102>
-rw-r--r-- | src/compiler/nir/nir_opcodes.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py index dd70640caa2..03f00d12639 100644 --- a/src/compiler/nir/nir_opcodes.py +++ b/src/compiler/nir/nir_opcodes.py @@ -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)") |