projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0340109
)
nir/spirv/glsl450: Implement Clamp/SClamp/UClamp.
author
Kenneth Graunke
<kenneth@whitecape.org>
Tue, 29 Dec 2015 04:40:10 +0000
(20:40 -0800)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Tue, 29 Dec 2015 23:27:03 +0000
(15:27 -0800)
src/glsl/nir/spirv/vtn_glsl450.c
patch
|
blob
|
history
diff --git
a/src/glsl/nir/spirv/vtn_glsl450.c
b/src/glsl/nir/spirv/vtn_glsl450.c
index ecd24c4a3d95b03e2bea40c4cba31acf7e0db6d0..2d5faa7d574dc549f7fc50a399830ac94e4caaad 100644
(file)
--- a/
src/glsl/nir/spirv/vtn_glsl450.c
+++ b/
src/glsl/nir/spirv/vtn_glsl450.c
@@
-156,8
+156,15
@@
handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint,
return;
case GLSLstd450FClamp:
+ val->ssa->def = build_fclamp(nb, src[0], src[1], src[2]);
+ return;
case GLSLstd450UClamp:
+ val->ssa->def = nir_umin(nb, nir_umax(nb, src[0], src[1]), src[2]);
+ return;
case GLSLstd450SClamp:
+ val->ssa->def = nir_imin(nb, nir_imax(nb, src[0], src[1]), src[2]);
+ return;
+
case GLSLstd450Asin:
case GLSLstd450Acos:
case GLSLstd450Atan: