diff options
author | Paul Berry <[email protected]> | 2011-10-06 10:31:34 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-10-31 11:24:03 -0700 |
commit | b6f32bbe12e1082e78951b6ef073bf244ba0b8b7 (patch) | |
tree | fed07bc4fc6b1d5d0a78d1dcb3403e6bf920c9d6 /src/glsl/builtins/ir/atan.ir | |
parent | b726639e1be0614fb6bbb75a6f07c63eacc6d787 (diff) |
glsl: Add '.ir' extension to builtin IR files
This patch adds the extension '.ir' to all the files in
src/glsl/builtins/ir/, and changes generate_builtins.py so that it no
longer globs on '*' to find the files to build. This prevents
spurious files (such as EMACS' infamous *~ backup files) from breaking
the build.
Diffstat (limited to 'src/glsl/builtins/ir/atan.ir')
-rw-r--r-- | src/glsl/builtins/ir/atan.ir | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/src/glsl/builtins/ir/atan.ir b/src/glsl/builtins/ir/atan.ir new file mode 100644 index 00000000000..7b5ea13c6ba --- /dev/null +++ b/src/glsl/builtins/ir/atan.ir @@ -0,0 +1,128 @@ +((function atan + (signature float + (parameters + (declare (in) float y_over_x)) + ((return (call asin ((expression float * + (var_ref y_over_x) + (expression float rsq + (expression float + + (expression float * + (var_ref y_over_x) + (var_ref y_over_x)) + (constant float (1.0)))))))))) + + (signature vec2 + (parameters + (declare (in) vec2 y_over_x)) + ((return (call asin ((expression vec2 * + (var_ref y_over_x) + (expression vec2 rsq + (expression vec2 + + (expression vec2 * + (var_ref y_over_x) + (var_ref y_over_x)) + (constant float (1.0)))))))))) + + (signature vec3 + (parameters + (declare (in) vec3 y_over_x)) + ((return (call asin ((expression vec3 * + (var_ref y_over_x) + (expression vec3 rsq + (expression vec3 + + (expression vec3 * + (var_ref y_over_x) + (var_ref y_over_x)) + (constant float (1.0)))))))))) + + (signature vec4 + (parameters + (declare (in) vec4 y_over_x)) + ((return (call asin ((expression vec4 * + (var_ref y_over_x) + (expression vec4 rsq + (expression vec4 + + (expression vec4 * + (var_ref y_over_x) + (var_ref y_over_x)) + (constant float (1.0)))))))))) + + (signature float + (parameters + (declare (in ) float y) + (declare (in ) float x) + ) + ( + (declare () float r) + (if (expression bool > + (expression float abs (var_ref x)) + (expression float * (constant float (1.0e-8)) (expression float abs (var_ref y)))) ( + (assign (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x))))) + (if (expression bool < (var_ref x) (constant float (0.000000)) ) ( + (if (expression bool >= (var_ref y) (constant float (0.000000)) ) + ((assign (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593))))) + ((assign (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593)))))) + ) + ( + )) + ) + ( + (declare () float sgn) + (assign (x) (var_ref sgn) (expression float sign (var_ref y))) + (assign (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965)))) + )) + + (return (var_ref r) ) + )) + + + + (signature vec2 + (parameters + (declare (in) vec2 y) + (declare (in) vec2 x)) + ((declare () vec2 r) + (assign (x) (var_ref r) + (call atan ((swiz x (var_ref y)) + (swiz x (var_ref x))))) + (assign (y) (var_ref r) + (call atan ((swiz y (var_ref y)) + (swiz y (var_ref x))))) + (return (var_ref r)))) + + (signature vec3 + (parameters + (declare (in) vec3 y) + (declare (in) vec3 x)) + ((declare () vec3 r) + (assign (x) (var_ref r) + (call atan ((swiz x (var_ref y)) + (swiz x (var_ref x))))) + (assign (y) (var_ref r) + (call atan ((swiz y (var_ref y)) + (swiz y (var_ref x))))) + (assign (z) (var_ref r) + (call atan ((swiz z (var_ref y)) + (swiz z (var_ref x))))) + (return (var_ref r)))) + + (signature vec4 + (parameters + (declare (in) vec4 y) + (declare (in) vec4 x)) + ((declare () vec4 r) + (assign (x) (var_ref r) + (call atan ((swiz x (var_ref y)) + (swiz x (var_ref x))))) + (assign (y) (var_ref r) + (call atan ((swiz y (var_ref y)) + (swiz y (var_ref x))))) + (assign (z) (var_ref r) + (call atan ((swiz z (var_ref y)) + (swiz z (var_ref x))))) + (assign (w) (var_ref r) + (call atan ((swiz w (var_ref y)) + (swiz w (var_ref x))))) + (return (var_ref r))))) + +)) |