projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0aedce4
)
nir: Add fclamp_pos opcode
author
Alyssa Rosenzweig
<alyssa.rosenzweig@collabora.com>
Fri, 1 May 2020 16:15:10 +0000
(12:15 -0400)
committer
Marge Bot
<eric+marge@anholt.net>
Tue, 19 May 2020 20:21:27 +0000
(20:21 +0000)
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>
src/compiler/nir/nir_opcodes.py
patch
|
blob
|
history
diff --git
a/src/compiler/nir/nir_opcodes.py
b/src/compiler/nir/nir_opcodes.py
index dd70640caa2c275225d51a1f0a44dee2fd1feee9..03f00d1263991032631d876abd215a7061081182 100644
(file)
--- 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)")