diff options
author | Kenneth Graunke <[email protected]> | 2010-07-02 02:12:34 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2010-07-02 18:03:58 -0700 |
commit | ddc3aa07832c3fa35382b57ce2539dbac5a6158d (patch) | |
tree | 6476b867b76bb7e32242940c7e1e6b5ac6a114c4 | |
parent | 9a7ac272fb7d87e56277ed88585f389446a4a1b9 (diff) |
glsl2/builtins: Use vector ops in the 130 version of "sign."
-rw-r--r-- | src/glsl/builtins/130/sign | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/glsl/builtins/130/sign b/src/glsl/builtins/130/sign index 0bdc0e09d25..170795948b2 100644 --- a/src/glsl/builtins/130/sign +++ b/src/glsl/builtins/130/sign @@ -7,28 +7,16 @@ (signature ivec2 (parameters (declare (in) ivec2 x)) - ((declare () ivec2 t) - (assign (constant bool (1)) (swiz x (var_ref t)) (expression int sign (swiz x (var_ref x)))) - (assign (constant bool (1)) (swiz y (var_ref t)) (expression int sign (swiz y (var_ref x)))) - (return (var_ref t)))) + ((return (expression ivec2 sign (var_ref x))))) (signature ivec3 (parameters (declare (in) ivec3 x)) - ((declare () ivec3 t) - (assign (constant bool (1)) (swiz x (var_ref t)) (expression int sign (swiz x (var_ref x)))) - (assign (constant bool (1)) (swiz y (var_ref t)) (expression int sign (swiz y (var_ref x)))) - (assign (constant bool (1)) (swiz z (var_ref t)) (expression int sign (swiz z (var_ref x)))) - (return (var_ref t)))) + ((return (expression ivec3 sign (var_ref x))))) (signature ivec4 (parameters (declare (in) ivec4 x)) - ((declare () ivec4 t) - (assign (constant bool (1)) (swiz x (var_ref t)) (expression int sign (swiz x (var_ref x)))) - (assign (constant bool (1)) (swiz y (var_ref t)) (expression int sign (swiz y (var_ref x)))) - (assign (constant bool (1)) (swiz z (var_ref t)) (expression int sign (swiz z (var_ref x)))) - (assign (constant bool (1)) (swiz w (var_ref t)) (expression int sign (swiz w (var_ref x)))) - (return (var_ref t)))) + ((return (expression ivec4 sign (var_ref x))))) )) |