glsl: Add forgotten implementations of equal/notEqual on bvecs.

This commit is contained in:
Kenneth Graunke
2010-09-01 11:47:52 -07:00
parent c70459a1b9
commit 0181385f36
3 changed files with 120 additions and 0 deletions
+60
View File
@@ -827,6 +827,36 @@ static const char *builtin_equal =
"\n"
" (signature bvec2\n"
" (parameters\n"
" (declare (in) bvec2 arg0)\n"
" (declare (in) bvec2 arg1))\n"
" ((declare () bvec2 temp)\n"
" (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
" (return (var_ref temp))))\n"
"\n"
" (signature bvec3\n"
" (parameters\n"
" (declare (in) bvec3 arg0)\n"
" (declare (in) bvec3 arg1))\n"
" ((declare () bvec3 temp)\n"
" (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
" (return (var_ref temp))))\n"
"\n"
" (signature bvec4\n"
" (parameters\n"
" (declare (in) bvec4 arg0)\n"
" (declare (in) bvec4 arg1))\n"
" ((declare () bvec4 temp)\n"
" (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n"
" (return (var_ref temp))))\n"
"\n"
" (signature bvec2\n"
" (parameters\n"
" (declare (in) ivec2 arg0)\n"
" (declare (in) ivec2 arg1))\n"
" ((declare () bvec2 temp)\n"
@@ -2192,6 +2222,36 @@ static const char *builtin_notEqual =
"\n"
" (signature bvec2\n"
" (parameters\n"
" (declare (in) bvec2 arg0)\n"
" (declare (in) bvec2 arg1))\n"
" ((declare () bvec2 temp)\n"
" (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
" (return (var_ref temp))))\n"
"\n"
" (signature bvec3\n"
" (parameters\n"
" (declare (in) bvec3 arg0)\n"
" (declare (in) bvec3 arg1))\n"
" ((declare () bvec3 temp)\n"
" (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
" (return (var_ref temp))))\n"
"\n"
" (signature bvec4\n"
" (parameters\n"
" (declare (in) bvec4 arg0)\n"
" (declare (in) bvec4 arg1))\n"
" ((declare () bvec4 temp)\n"
" (assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))\n"
" (assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1))))\n"
" (return (var_ref temp))))\n"
"\n"
" (signature bvec2\n"
" (parameters\n"
" (declare (in) ivec2 arg0)\n"
" (declare (in) ivec2 arg1))\n"
" ((declare () bvec2 temp)\n"
+30
View File
@@ -29,6 +29,36 @@
(assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
(return (var_ref temp))))
(signature bvec2
(parameters
(declare (in) bvec2 arg0)
(declare (in) bvec2 arg1))
((declare () bvec2 temp)
(assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
(assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
(return (var_ref temp))))
(signature bvec3
(parameters
(declare (in) bvec3 arg0)
(declare (in) bvec3 arg1))
((declare () bvec3 temp)
(assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
(assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
(assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
(return (var_ref temp))))
(signature bvec4
(parameters
(declare (in) bvec4 arg0)
(declare (in) bvec4 arg1))
((declare () bvec4 temp)
(assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool == (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
(assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool == (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
(assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool == (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
(assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool == (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
(return (var_ref temp))))
(signature bvec2
(parameters
(declare (in) ivec2 arg0)
+30
View File
@@ -29,6 +29,36 @@
(assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
(return (var_ref temp))))
(signature bvec2
(parameters
(declare (in) bvec2 arg0)
(declare (in) bvec2 arg1))
((declare () bvec2 temp)
(assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
(assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
(return (var_ref temp))))
(signature bvec3
(parameters
(declare (in) bvec3 arg0)
(declare (in) bvec3 arg1))
((declare () bvec3 temp)
(assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
(assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
(assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
(return (var_ref temp))))
(signature bvec4
(parameters
(declare (in) bvec4 arg0)
(declare (in) bvec4 arg1))
((declare () bvec4 temp)
(assign (constant bool (1)) (swiz x (var_ref temp)) (expression bool != (swiz x (var_ref arg0))(swiz x (var_ref arg1))))
(assign (constant bool (1)) (swiz y (var_ref temp)) (expression bool != (swiz y (var_ref arg0))(swiz y (var_ref arg1))))
(assign (constant bool (1)) (swiz z (var_ref temp)) (expression bool != (swiz z (var_ref arg0))(swiz z (var_ref arg1))))
(assign (constant bool (1)) (swiz w (var_ref temp)) (expression bool != (swiz w (var_ref arg0))(swiz w (var_ref arg1))))
(return (var_ref temp))))
(signature bvec2
(parameters
(declare (in) ivec2 arg0)