From 1f30efb7365075de0ae119a40ab70a16bc547670 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Tue, 6 Nov 2007 06:06:04 -0500 Subject: Implement kilp and make it work --- src/mesa/pipe/llvm/llvm_builtins.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/mesa/pipe/llvm/llvm_builtins.c') diff --git a/src/mesa/pipe/llvm/llvm_builtins.c b/src/mesa/pipe/llvm/llvm_builtins.c index 517aa2e84b..4f98d754ba 100644 --- a/src/mesa/pipe/llvm/llvm_builtins.c +++ b/src/mesa/pipe/llvm/llvm_builtins.c @@ -32,7 +32,6 @@ */ typedef __attribute__(( ocu_vector_type(4) )) float float4; - extern float powf(float a, float b); inline float approx(float a, float b) @@ -106,3 +105,11 @@ inline float4 vsin(float4 val) result.w = res; return result; } + +inline int kilp(float4 val) +{ + if (val.x < 0 || val.y < 0 || val.z < 0 || val.w < 0) + return 1; + else + return 0; +} -- cgit v1.2.3