diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2010-09-08 15:38:09 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2010-09-08 15:38:09 -0700 |
commit | fc1daab2a2846912d3da5eb69e1ce0afbf08ab04 (patch) | |
tree | ddbef3d328b6ca3cf7d07de0ce0077c42ebd02cd /src/glsl/builtins | |
parent | c3db43df046daf46e98cc3043129b5b56c513799 (diff) |
glsl: Fix for scalar float built-in definitions.
These need abs, and we need more tests.
Diffstat (limited to 'src/glsl/builtins')
-rw-r--r-- | src/glsl/builtins/ir/distance | 2 | ||||
-rw-r--r-- | src/glsl/builtins/ir/length | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/builtins/ir/distance b/src/glsl/builtins/ir/distance index f73f755b32..7789ca6314 100644 --- a/src/glsl/builtins/ir/distance +++ b/src/glsl/builtins/ir/distance @@ -3,7 +3,7 @@ (parameters (declare (in) float p0) (declare (in) float p1)) - ((return (expression float - (var_ref p0) (var_ref p1))))) + ((return (expression float abs (expression float - (var_ref p0) (var_ref p1)))))) (signature float (parameters diff --git a/src/glsl/builtins/ir/length b/src/glsl/builtins/ir/length index 3fc3103da1..b72334ee8a 100644 --- a/src/glsl/builtins/ir/length +++ b/src/glsl/builtins/ir/length @@ -2,7 +2,7 @@ (signature float (parameters (declare (in) float arg0)) - ((return (var_ref arg0)))) + ((return (expression float abs (var_ref arg0))))) (signature float (parameters |