From 0181385f36463ff03f4ed657b180acd8567c05d4 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 1 Sep 2010 11:47:52 -0700 Subject: glsl: Add forgotten implementations of equal/notEqual on bvecs. --- src/glsl/builtins/ir/equal | 30 ++++++++++++++++++++++++++++++ src/glsl/builtins/ir/notEqual | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) (limited to 'src/glsl/builtins') diff --git a/src/glsl/builtins/ir/equal b/src/glsl/builtins/ir/equal index d7a4bc6063f..c394776770b 100644 --- a/src/glsl/builtins/ir/equal +++ b/src/glsl/builtins/ir/equal @@ -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) diff --git a/src/glsl/builtins/ir/notEqual b/src/glsl/builtins/ir/notEqual index bcc7339bb6e..eeeda790421 100644 --- a/src/glsl/builtins/ir/notEqual +++ b/src/glsl/builtins/ir/notEqual @@ -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) -- cgit v1.2.3