summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/llvm/llvm_builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/llvm/llvm_builtins.c')
-rw-r--r--src/mesa/pipe/llvm/llvm_builtins.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/llvm_builtins.c b/src/mesa/pipe/llvm/llvm_builtins.c
index a570e0e0894..ca159955570 100644
--- a/src/mesa/pipe/llvm/llvm_builtins.c
+++ b/src/mesa/pipe/llvm/llvm_builtins.c
@@ -71,6 +71,7 @@ inline float4 cmp(float4 tmp0, float4 tmp1, float4 tmp2)
}
extern float cosf(float val);
+extern float sinf(float val);
inline float4 vcos(float4 val)
{
@@ -83,3 +84,12 @@ inline float4 vcos(float4 val)
printf("VEC OUT is %f %f %f %f\n", result.x, result.y, result.z, result.w);
return result;
}
+
+inline float4 scs(float4 val)
+{
+ float4 result;
+ float tmp = val.x;
+ result.x = cosf(tmp);
+ result.y = sinf(tmp);
+ return result;
+}