From: Kenneth Graunke Date: Fri, 2 Jul 2010 09:12:34 +0000 (-0700) Subject: glsl2/builtins: Use vector ops in the 130 version of "sign." X-Git-Tag: 062012170305~10660^2~507 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddc3aa07832c3fa35382b57ce2539dbac5a6158d;p=profile%2Fivi%2Fmesa.git glsl2/builtins: Use vector ops in the 130 version of "sign." --- diff --git a/src/glsl/builtins/130/sign b/src/glsl/builtins/130/sign index 0bdc0e0..1707959 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))))) ))