diff options
author | Eric Anholt <[email protected]> | 2010-06-30 17:25:09 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-06-30 17:29:12 -0700 |
commit | f5b3b2a01a320d136df3cf1f8c6fa78685d164d1 (patch) | |
tree | 9ca43e64ea5495acfd90d49d1a310d9113e78bd3 /src/glsl/builtins | |
parent | 3acd92a91f3e799b9f839a074f4d76a0e88d71fe (diff) |
glsl2: Don't break sign() down by vector components.
Diffstat (limited to 'src/glsl/builtins')
-rw-r--r-- | src/glsl/builtins/110/sign | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/glsl/builtins/110/sign b/src/glsl/builtins/110/sign index 7d540de405b..fa475197cf5 100644 --- a/src/glsl/builtins/110/sign +++ b/src/glsl/builtins/110/sign @@ -7,28 +7,15 @@ (signature vec2 (parameters (declare (in) vec2 x)) - ((declare () vec2 t) - (assign (constant bool (1)) (swiz x (var_ref t)) (expression float sign (swiz x (var_ref x)))) - (assign (constant bool (1)) (swiz y (var_ref t)) (expression float sign (swiz y (var_ref x)))) - (return (var_ref t)))) + ((return (expression vec2 sign (var_ref x))))) (signature vec3 (parameters (declare (in) vec3 x)) - ((declare () vec3 t) - (assign (constant bool (1)) (swiz x (var_ref t)) (expression float sign (swiz x (var_ref x)))) - (assign (constant bool (1)) (swiz y (var_ref t)) (expression float sign (swiz y (var_ref x)))) - (assign (constant bool (1)) (swiz z (var_ref t)) (expression float sign (swiz z (var_ref x)))) - (return (var_ref t)))) + ((return (expression vec3 sign (var_ref x))))) (signature vec4 (parameters (declare (in) vec4 x)) - ((declare () vec4 t) - (assign (constant bool (1)) (swiz x (var_ref t)) (expression float sign (swiz x (var_ref x)))) - (assign (constant bool (1)) (swiz y (var_ref t)) (expression float sign (swiz y (var_ref x)))) - (assign (constant bool (1)) (swiz z (var_ref t)) (expression float sign (swiz z (var_ref x)))) - (assign (constant bool (1)) (swiz w (var_ref t)) (expression float sign (swiz w (var_ref x)))) - (return (var_ref t)))) + ((return (expression vec4 sign (var_ref x))))) )) - |