diff options
author | Christian König <[email protected]> | 2010-10-28 20:24:56 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2010-10-28 20:24:56 +0200 |
commit | 41ed47d6b8fb6c032e2907ef2e49e414c26f35c1 (patch) | |
tree | 8cf267ee3ac5d8b530dd70a28a0d568344aa8304 /src/glsl/builtins/ir | |
parent | 97a7cf230a70c64fff300931ae7c00aa00449c97 (diff) | |
parent | 5479fa34d9acebd55f68c23a278cf382d0e84248 (diff) |
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into pipe-video
Conflicts:
src/gallium/include/pipe/p_format.h
Diffstat (limited to 'src/glsl/builtins/ir')
-rw-r--r-- | src/glsl/builtins/ir/modf | 41 | ||||
-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 |
4 files changed, 104 insertions, 0 deletions
diff --git a/src/glsl/builtins/ir/modf b/src/glsl/builtins/ir/modf new file mode 100644 index 00000000000..2b935a91a7c --- /dev/null +++ b/src/glsl/builtins/ir/modf @@ -0,0 +1,41 @@ +((function modf + (signature float + (parameters + (declare (in) float x) + (declare (out) float i)) + ((declare () float t) + (assign (constant bool (1)) (x) (var_ref t) + (expression float trunc (var_ref x))) + (assign (constant bool (1)) (x) (var_ref i) (var_ref t)) + (return (expression float - (var_ref x) (var_ref t))))) + + (signature vec2 + (parameters + (declare (in) vec2 x) + (declare (out) vec2 i)) + ((declare () vec2 t) + (assign (constant bool (1)) (xy) (var_ref t) + (expression vec2 trunc (var_ref x))) + (assign (constant bool (1)) (xy) (var_ref i) (var_ref t)) + (return (expression vec2 - (var_ref x) (var_ref t))))) + + (signature vec3 + (parameters + (declare (in) vec3 x) + (declare (out) vec3 i)) + ((declare () vec3 t) + (assign (constant bool (1)) (xyz) (var_ref t) + (expression vec3 trunc (var_ref x))) + (assign (constant bool (1)) (xyz) (var_ref i) (var_ref t)) + (return (expression vec3 - (var_ref x) (var_ref t))))) + + (signature vec4 + (parameters + (declare (in) vec4 x) + (declare (out) vec4 i)) + ((declare () vec4 t) + (assign (constant bool (1)) (xyzw) (var_ref t) + (expression vec4 trunc (var_ref x))) + (assign (constant bool (1)) (xyzw) (var_ref i) (var_ref t)) + (return (expression vec4 - (var_ref x) (var_ref t))))) +)) 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))))) +)) |