diff options
author | Keith Whitwell <[email protected]> | 2010-10-17 19:03:42 -0700 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-10-17 19:09:42 -0700 |
commit | 0072acd447dc6be652e63752e50215c3105322c8 (patch) | |
tree | 847d1763b54772d336a04e606f8248291c3092b7 /src/glsl/builtins | |
parent | 543fb77ddece7e1806e8eaa0d65bb2a945ef9a75 (diff) | |
parent | ca2b2ac131933b4171b519813df1aaa3a81621cd (diff) |
Merge remote branch 'origin/master' into lp-setup-llvm
Conflicts:
src/gallium/drivers/llvmpipe/lp_setup_coef.c
src/gallium/drivers/llvmpipe/lp_setup_coef.h
src/gallium/drivers/llvmpipe/lp_setup_coef_intrin.c
src/gallium/drivers/llvmpipe/lp_setup_point.c
src/gallium/drivers/llvmpipe/lp_setup_tri.c
src/gallium/drivers/llvmpipe/lp_state_derived.c
src/gallium/drivers/llvmpipe/lp_state_fs.h
Diffstat (limited to 'src/glsl/builtins')
-rw-r--r-- | src/glsl/builtins/ir/equal | 24 | ||||
-rw-r--r-- | src/glsl/builtins/ir/greaterThan | 54 | ||||
-rw-r--r-- | src/glsl/builtins/ir/greaterThanEqual | 54 | ||||
-rw-r--r-- | src/glsl/builtins/ir/lessThan | 54 | ||||
-rw-r--r-- | src/glsl/builtins/ir/lessThanEqual | 54 | ||||
-rw-r--r-- | src/glsl/builtins/ir/noise2 | 16 | ||||
-rw-r--r-- | src/glsl/builtins/ir/noise3 | 24 | ||||
-rw-r--r-- | src/glsl/builtins/ir/noise4 | 34 | ||||
-rw-r--r-- | src/glsl/builtins/ir/notEqual | 24 | ||||
-rw-r--r-- | src/glsl/builtins/ir/round | 21 | ||||
-rw-r--r-- | src/glsl/builtins/ir/roundEven | 21 | ||||
-rw-r--r-- | src/glsl/builtins/ir/trunc | 21 | ||||
-rw-r--r-- | src/glsl/builtins/profiles/130.frag | 15 | ||||
-rw-r--r-- | src/glsl/builtins/profiles/130.vert | 15 | ||||
-rwxr-xr-x | src/glsl/builtins/tools/generate_builtins.py | 4 |
15 files changed, 192 insertions, 243 deletions
diff --git a/src/glsl/builtins/ir/equal b/src/glsl/builtins/ir/equal index f6578dc1e32..a414b3e535f 100644 --- a/src/glsl/builtins/ir/equal +++ b/src/glsl/builtins/ir/equal @@ -3,71 +3,71 @@ (parameters (declare (in) vec2 arg0) (declare (in) vec2 arg1)) - ((return (expression bvec2 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec2 == (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) vec3 arg0) (declare (in) vec3 arg1)) - ((return (expression bvec3 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec3 == (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) vec4 arg0) (declare (in) vec4 arg1)) - ((return (expression bvec4 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec4 == (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) bvec2 arg0) (declare (in) bvec2 arg1)) - ((return (expression bvec2 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec2 == (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) bvec3 arg0) (declare (in) bvec3 arg1)) - ((return (expression bvec3 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec3 == (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) bvec4 arg0) (declare (in) bvec4 arg1)) - ((return (expression bvec4 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec4 == (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) ivec2 arg0) (declare (in) ivec2 arg1)) - ((return (expression bvec2 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec2 == (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) ivec3 arg0) (declare (in) ivec3 arg1)) - ((return (expression bvec3 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec3 == (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) ivec4 arg0) (declare (in) ivec4 arg1)) - ((return (expression bvec4 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec4 == (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) uvec2 arg0) (declare (in) uvec2 arg1)) - ((return (expression bvec2 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec2 == (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) uvec3 arg0) (declare (in) uvec3 arg1)) - ((return (expression bvec3 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec3 == (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) uvec4 arg0) (declare (in) uvec4 arg1)) - ((return (expression bvec4 all_equal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec4 == (var_ref arg0) (var_ref arg1))))) )) diff --git a/src/glsl/builtins/ir/greaterThan b/src/glsl/builtins/ir/greaterThan index f5489008ed2..18af865288f 100644 --- a/src/glsl/builtins/ir/greaterThan +++ b/src/glsl/builtins/ir/greaterThan @@ -3,89 +3,53 @@ (parameters (declare (in) vec2 arg0) (declare (in) vec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 > (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) vec3 arg0) (declare (in) vec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 > (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) vec4 arg0) (declare (in) vec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 > (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) ivec2 arg0) (declare (in) ivec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 > (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) ivec3 arg0) (declare (in) ivec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 > (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) ivec4 arg0) (declare (in) ivec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 > (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) uvec2 arg0) (declare (in) uvec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 > (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) uvec3 arg0) (declare (in) uvec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 > (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) uvec4 arg0) (declare (in) uvec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool > (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool > (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool > (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool > (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 > (var_ref arg0) (var_ref arg1))))) )) diff --git a/src/glsl/builtins/ir/greaterThanEqual b/src/glsl/builtins/ir/greaterThanEqual index d00354042a8..6d3bc892cb7 100644 --- a/src/glsl/builtins/ir/greaterThanEqual +++ b/src/glsl/builtins/ir/greaterThanEqual @@ -3,89 +3,53 @@ (parameters (declare (in) vec2 arg0) (declare (in) vec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) vec3 arg0) (declare (in) vec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) vec4 arg0) (declare (in) vec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) ivec2 arg0) (declare (in) ivec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) ivec3 arg0) (declare (in) ivec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) ivec4 arg0) (declare (in) ivec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) uvec2 arg0) (declare (in) uvec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) uvec3 arg0) (declare (in) uvec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) uvec4 arg0) (declare (in) uvec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool >= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool >= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool >= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool >= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1))))) )) diff --git a/src/glsl/builtins/ir/lessThan b/src/glsl/builtins/ir/lessThan index e29288a972f..8401fe9db60 100644 --- a/src/glsl/builtins/ir/lessThan +++ b/src/glsl/builtins/ir/lessThan @@ -3,89 +3,53 @@ (parameters (declare (in) vec2 arg0) (declare (in) vec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 < (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) vec3 arg0) (declare (in) vec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 < (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) vec4 arg0) (declare (in) vec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 < (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) ivec2 arg0) (declare (in) ivec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 < (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) ivec3 arg0) (declare (in) ivec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 < (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) ivec4 arg0) (declare (in) ivec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 < (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) uvec2 arg0) (declare (in) uvec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 < (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) uvec3 arg0) (declare (in) uvec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 < (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) uvec4 arg0) (declare (in) uvec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool < (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool < (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool < (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool < (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 < (var_ref arg0) (var_ref arg1))))) )) diff --git a/src/glsl/builtins/ir/lessThanEqual b/src/glsl/builtins/ir/lessThanEqual index 669f2341d44..c1cdd3fb605 100644 --- a/src/glsl/builtins/ir/lessThanEqual +++ b/src/glsl/builtins/ir/lessThanEqual @@ -3,89 +3,53 @@ (parameters (declare (in) vec2 arg0) (declare (in) vec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) vec3 arg0) (declare (in) vec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) vec4 arg0) (declare (in) vec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) ivec2 arg0) (declare (in) ivec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) ivec3 arg0) (declare (in) ivec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) ivec4 arg0) (declare (in) ivec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) uvec2 arg0) (declare (in) uvec2 arg1)) - ((declare () bvec2 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) uvec3 arg0) (declare (in) uvec3 arg1)) - ((declare () bvec3 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) uvec4 arg0) (declare (in) uvec4 arg1)) - ((declare () bvec4 temp) - (assign (constant bool (1)) (x) (var_ref temp) (expression bool <= (swiz x (var_ref arg0))(swiz x (var_ref arg1)))) - (assign (constant bool (1)) (y) (var_ref temp) (expression bool <= (swiz y (var_ref arg0))(swiz y (var_ref arg1)))) - (assign (constant bool (1)) (z) (var_ref temp) (expression bool <= (swiz z (var_ref arg0))(swiz z (var_ref arg1)))) - (assign (constant bool (1)) (w) (var_ref temp) (expression bool <= (swiz w (var_ref arg0))(swiz w (var_ref arg1)))) - (return (var_ref temp)))) + ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1))))) )) diff --git a/src/glsl/builtins/ir/noise2 b/src/glsl/builtins/ir/noise2 index 008f8b00f1f..383fccfadfb 100644 --- a/src/glsl/builtins/ir/noise2 +++ b/src/glsl/builtins/ir/noise2 @@ -8,8 +8,8 @@ (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p))) (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0))))) - (assign (constant bool (1)) (x) (var_ref t) (swiz xx (var_ref a))) - (assign (constant bool (1)) (y) (var_ref t) (swiz xx (var_ref b))) + (assign (constant bool (1)) (x) (var_ref t) (var_ref a)) + (assign (constant bool (1)) (y) (var_ref t) (var_ref b)) (return (var_ref t)) )) @@ -22,8 +22,8 @@ (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p))) (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0))))) - (assign (constant bool (1)) (x) (var_ref t) (swiz xx (var_ref a))) - (assign (constant bool (1)) (y) (var_ref t) (swiz xx (var_ref b))) + (assign (constant bool (1)) (x) (var_ref t) (var_ref a)) + (assign (constant bool (1)) (y) (var_ref t) (var_ref b)) (return (var_ref t)) )) @@ -38,8 +38,8 @@ (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p))) (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0))))) - (assign (constant bool (1)) (x) (var_ref t) (swiz xx (var_ref a))) - (assign (constant bool (1)) (y) (var_ref t) (swiz xx (var_ref b))) + (assign (constant bool (1)) (x) (var_ref t) (var_ref a)) + (assign (constant bool (1)) (y) (var_ref t) (var_ref b)) (return (var_ref t)) )) @@ -54,8 +54,8 @@ (assign (constant bool (1)) (x) (var_ref a) (expression float noise (var_ref p))) (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0))))) - (assign (constant bool (1)) (x) (var_ref t) (swiz xx (var_ref a))) - (assign (constant bool (1)) (y) (var_ref t) (swiz xx (var_ref b))) + (assign (constant bool (1)) (x) (var_ref t) (var_ref a)) + (assign (constant bool (1)) (y) (var_ref t) (var_ref b)) (return (var_ref t)) )) )) diff --git a/src/glsl/builtins/ir/noise3 b/src/glsl/builtins/ir/noise3 index f191e145f99..ed7ad5190f2 100644 --- a/src/glsl/builtins/ir/noise3 +++ b/src/glsl/builtins/ir/noise3 @@ -11,9 +11,9 @@ (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0))))) (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))))) - (assign (constant bool (1)) (x) (var_ref t) (swiz xxx (var_ref a))) - (assign (constant bool (1)) (y) (var_ref t) (swiz xxx (var_ref b))) - (assign (constant bool (1)) (z) (var_ref t) (swiz xxx (var_ref c))) + (assign (constant bool (1)) (x) (var_ref t) (var_ref a)) + (assign (constant bool (1)) (y) (var_ref t) (var_ref b)) + (assign (constant bool (1)) (z) (var_ref t) (var_ref c)) (return (var_ref t)) )) @@ -29,9 +29,9 @@ (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0))))) (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))))) - (assign (constant bool (1)) (x) (var_ref t) (swiz xxx (var_ref a))) - (assign (constant bool (1)) (y) (var_ref t) (swiz xxx (var_ref b))) - (assign (constant bool (1)) (z) (var_ref t) (swiz xxx (var_ref c))) + (assign (constant bool (1)) (x) (var_ref t) (var_ref a)) + (assign (constant bool (1)) (y) (var_ref t) (var_ref b)) + (assign (constant bool (1)) (z) (var_ref t) (var_ref c)) (return (var_ref t)) )) @@ -47,9 +47,9 @@ (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0))))) (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))))) - (assign (constant bool (1)) (x) (var_ref t) (swiz xxx (var_ref a))) - (assign (constant bool (1)) (y) (var_ref t) (swiz xxx (var_ref b))) - (assign (constant bool (1)) (z) (var_ref t) (swiz xxx (var_ref c))) + (assign (constant bool (1)) (x) (var_ref t) (var_ref a)) + (assign (constant bool (1)) (y) (var_ref t) (var_ref b)) + (assign (constant bool (1)) (z) (var_ref t) (var_ref c)) (return (var_ref t)) )) @@ -65,9 +65,9 @@ (assign (constant bool (1)) (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0))))) (assign (constant bool (1)) (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0))))) - (assign (constant bool (1)) (x) (var_ref t) (swiz xxx (var_ref a))) - (assign (constant bool (1)) (y) (var_ref t) (swiz xxx (var_ref b))) - (assign (constant bool (1)) (z) (var_ref t) (swiz xxx (var_ref c))) + (assign (constant bool (1)) (x) (var_ref t) (var_ref a)) + (assign (constant bool (1)) (y) (var_ref t) (var_ref b)) + (assign (constant bool (1)) (z) (var_ref t) (var_ref c)) (return (var_ref t)) )) )) diff --git a/src/glsl/builtins/ir/noise4 b/src/glsl/builtins/ir/noise4 index fb300fd1486..77a2529a180 100644 --- a/src/glsl/builtins/ir/noise4 +++ b/src/glsl/builtins/ir/noise4 @@ -16,10 +16,10 @@ (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p))) (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0))))) - (assign (constant bool (1)) (x) (var_ref _r) (swiz xxxx (var_ref _x))) - (assign (constant bool (1)) (y) (var_ref _r) (swiz xxxx (var_ref _y))) - (assign (constant bool (1)) (z) (var_ref _r) (swiz xxxx (var_ref _z))) - (assign (constant bool (1)) (w) (var_ref _r) (swiz xxxx (var_ref _w))) + (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x)) + (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y)) + (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z)) + (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w)) (return (var_ref _r)) )) @@ -40,10 +40,10 @@ (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p))) (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0))))) - (assign (constant bool (1)) (x) (var_ref _r) (swiz xxxx (var_ref _x))) - (assign (constant bool (1)) (y) (var_ref _r) (swiz xxxx (var_ref _y))) - (assign (constant bool (1)) (z) (var_ref _r) (swiz xxxx (var_ref _z))) - (assign (constant bool (1)) (w) (var_ref _r) (swiz xxxx (var_ref _w))) + (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x)) + (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y)) + (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z)) + (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w)) (return (var_ref _r)) )) @@ -64,10 +64,10 @@ (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p))) (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0))))) - (assign (constant bool (1)) (x) (var_ref _r) (swiz xxxx (var_ref _x))) - (assign (constant bool (1)) (y) (var_ref _r) (swiz xxxx (var_ref _y))) - (assign (constant bool (1)) (z) (var_ref _r) (swiz xxxx (var_ref _z))) - (assign (constant bool (1)) (w) (var_ref _r) (swiz xxxx (var_ref _w))) + (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x)) + (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y)) + (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z)) + (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w)) (return (var_ref _r)) )) @@ -81,17 +81,17 @@ (declare () vec4 _r) (declare () float _p) - (assign (constant bool (1)) (xy) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) ) + (assign (constant bool (1)) (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) ) (assign (constant bool (1)) (x) (var_ref _x) (expression float noise(var_ref p))) (assign (constant bool (1)) (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0 313.0 29.0 277.0))))) (assign (constant bool (1)) (x) (var_ref _z) (expression float noise(var_ref _p))) (assign (constant bool (1)) (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0 313.0 29.0 277.0))))) - (assign (constant bool (1)) (x) (var_ref _r) (swiz xxxx (var_ref _x))) - (assign (constant bool (1)) (y) (var_ref _r) (swiz xxxx (var_ref _y))) - (assign (constant bool (1)) (z) (var_ref _r) (swiz xxxx (var_ref _z))) - (assign (constant bool (1)) (w) (var_ref _r) (swiz xxxx (var_ref _w))) + (assign (constant bool (1)) (x) (var_ref _r) (var_ref _x)) + (assign (constant bool (1)) (y) (var_ref _r) (var_ref _y)) + (assign (constant bool (1)) (z) (var_ref _r) (var_ref _z)) + (assign (constant bool (1)) (w) (var_ref _r) (var_ref _w)) (return (var_ref _r)) )) )) diff --git a/src/glsl/builtins/ir/notEqual b/src/glsl/builtins/ir/notEqual index d07cdbf41f1..abaf1914c9f 100644 --- a/src/glsl/builtins/ir/notEqual +++ b/src/glsl/builtins/ir/notEqual @@ -3,71 +3,71 @@ (parameters (declare (in) vec2 arg0) (declare (in) vec2 arg1)) - ((return (expression bvec2 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec2 != (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) vec3 arg0) (declare (in) vec3 arg1)) - ((return (expression bvec3 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec3 != (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) vec4 arg0) (declare (in) vec4 arg1)) - ((return (expression bvec4 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec4 != (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) bvec2 arg0) (declare (in) bvec2 arg1)) - ((return (expression bvec2 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec2 != (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) bvec3 arg0) (declare (in) bvec3 arg1)) - ((return (expression bvec3 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec3 != (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) bvec4 arg0) (declare (in) bvec4 arg1)) - ((return (expression bvec4 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec4 != (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) ivec2 arg0) (declare (in) ivec2 arg1)) - ((return (expression bvec2 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec2 != (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) ivec3 arg0) (declare (in) ivec3 arg1)) - ((return (expression bvec3 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec3 != (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) ivec4 arg0) (declare (in) ivec4 arg1)) - ((return (expression bvec4 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec4 != (var_ref arg0) (var_ref arg1))))) (signature bvec2 (parameters (declare (in) uvec2 arg0) (declare (in) uvec2 arg1)) - ((return (expression bvec2 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec2 != (var_ref arg0) (var_ref arg1))))) (signature bvec3 (parameters (declare (in) uvec3 arg0) (declare (in) uvec3 arg1)) - ((return (expression bvec3 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec3 != (var_ref arg0) (var_ref arg1))))) (signature bvec4 (parameters (declare (in) uvec4 arg0) (declare (in) uvec4 arg1)) - ((return (expression bvec4 any_nequal (var_ref arg0) (var_ref arg1))))) + ((return (expression bvec4 != (var_ref arg0) (var_ref arg1))))) )) diff --git a/src/glsl/builtins/ir/round b/src/glsl/builtins/ir/round new file mode 100644 index 00000000000..d0d425bd656 --- /dev/null +++ b/src/glsl/builtins/ir/round @@ -0,0 +1,21 @@ +((function round + (signature float + (parameters + (declare (in) float arg0)) + ((return (expression float round_even (var_ref arg0))))) + + (signature vec2 + (parameters + (declare (in) vec2 arg0)) + ((return (expression vec2 round_even (var_ref arg0))))) + + (signature vec3 + (parameters + (declare (in) vec3 arg0)) + ((return (expression vec3 round_even (var_ref arg0))))) + + (signature vec4 + (parameters + (declare (in) vec4 arg0)) + ((return (expression vec4 round_even (var_ref arg0))))) +)) diff --git a/src/glsl/builtins/ir/roundEven b/src/glsl/builtins/ir/roundEven new file mode 100644 index 00000000000..a9c99b6f44c --- /dev/null +++ b/src/glsl/builtins/ir/roundEven @@ -0,0 +1,21 @@ +((function roundEven + (signature float + (parameters + (declare (in) float arg0)) + ((return (expression float round_even (var_ref arg0))))) + + (signature vec2 + (parameters + (declare (in) vec2 arg0)) + ((return (expression vec2 round_even (var_ref arg0))))) + + (signature vec3 + (parameters + (declare (in) vec3 arg0)) + ((return (expression vec3 round_even (var_ref arg0))))) + + (signature vec4 + (parameters + (declare (in) vec4 arg0)) + ((return (expression vec4 round_even (var_ref arg0))))) +)) diff --git a/src/glsl/builtins/ir/trunc b/src/glsl/builtins/ir/trunc new file mode 100644 index 00000000000..d320a2a7722 --- /dev/null +++ b/src/glsl/builtins/ir/trunc @@ -0,0 +1,21 @@ +((function trunc + (signature float + (parameters + (declare (in) float arg0)) + ((return (expression float trunc (var_ref arg0))))) + + (signature vec2 + (parameters + (declare (in) vec2 arg0)) + ((return (expression vec2 trunc (var_ref arg0))))) + + (signature vec3 + (parameters + (declare (in) vec3 arg0)) + ((return (expression vec3 trunc (var_ref arg0))))) + + (signature vec4 + (parameters + (declare (in) vec4 arg0)) + ((return (expression vec4 trunc (var_ref arg0))))) +)) diff --git a/src/glsl/builtins/profiles/130.frag b/src/glsl/builtins/profiles/130.frag index aa7a6adb1d7..96440703bd3 100644 --- a/src/glsl/builtins/profiles/130.frag +++ b/src/glsl/builtins/profiles/130.frag @@ -143,6 +143,21 @@ vec2 floor(vec2 x); vec3 floor(vec3 x); vec4 floor(vec4 x); +float trunc(float x); +vec2 trunc(vec2 x); +vec3 trunc(vec3 x); +vec4 trunc(vec4 x); + +float round(float x); +vec2 round(vec2 x); +vec3 round(vec3 x); +vec4 round(vec4 x); + +float roundEven(float x); +vec2 roundEven(vec2 x); +vec3 roundEven(vec3 x); +vec4 roundEven(vec4 x); + float ceil(float x); vec2 ceil(vec2 x); vec3 ceil(vec3 x); diff --git a/src/glsl/builtins/profiles/130.vert b/src/glsl/builtins/profiles/130.vert index d0152b03748..eb765186fc8 100644 --- a/src/glsl/builtins/profiles/130.vert +++ b/src/glsl/builtins/profiles/130.vert @@ -143,6 +143,21 @@ vec2 floor(vec2 x); vec3 floor(vec3 x); vec4 floor(vec4 x); +float trunc(float x); +vec2 trunc(vec2 x); +vec3 trunc(vec3 x); +vec4 trunc(vec4 x); + +float round(float x); +vec2 round(vec2 x); +vec3 round(vec3 x); +vec4 round(vec4 x); + +float roundEven(float x); +vec2 roundEven(vec2 x); +vec3 roundEven(vec3 x); +vec4 roundEven(vec4 x); + float ceil(float x); vec2 ceil(vec2 x); vec3 ceil(vec3 x); diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py index 691a318c1cb..e8191ee9fdc 100755 --- a/src/glsl/builtins/tools/generate_builtins.py +++ b/src/glsl/builtins/tools/generate_builtins.py @@ -123,12 +123,12 @@ if __name__ == "__main__": #include "ast.h" extern "C" struct gl_shader * -_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type); +_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type); gl_shader * read_builtins(GLenum target, const char *protos, const char **functions, unsigned count) { - GLcontext fakeCtx; + struct gl_context fakeCtx; fakeCtx.API = API_OPENGL; gl_shader *sh = _mesa_new_shader(NULL, 0, target); struct _mesa_glsl_parse_state *st = |