summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtins/110/cross
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/builtins/110/cross')
-rw-r--r--src/glsl/builtins/110/cross17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/glsl/builtins/110/cross b/src/glsl/builtins/110/cross
new file mode 100644
index 00000000000..deb2f952bfc
--- /dev/null
+++ b/src/glsl/builtins/110/cross
@@ -0,0 +1,17 @@
+((function cross
+ (signature vec3
+ (parameters
+ (declare (in) vec3 arg0)
+ (declare (in) vec3 arg1))
+ ((declare () vec3 t)
+ (assign (constant bool (1)) (swiz x (var_ref t))
+ (expression float - (expression float * (swiz y (var_ref arg0)) (swiz z (var_ref arg1)))
+ (expression float * (swiz y (var_ref arg1)) (swiz z (var_ref arg0)))))
+ (assign (constant bool (1)) (swiz y (var_ref t))
+ (expression float - (expression float * (swiz z (var_ref arg0)) (swiz x (var_ref arg1)))
+ (expression float * (swiz z (var_ref arg1)) (swiz x (var_ref arg0)))))
+ (assign (constant bool (1)) (swiz z (var_ref t))
+ (expression float - (expression float * (swiz x (var_ref arg0)) (swiz y (var_ref arg1)))
+ (expression float * (swiz x (var_ref arg1)) (swiz y (var_ref arg0)))))
+ (return (var_ref t))))
+))