diff options
author | Zack Rusin <[email protected]> | 2007-11-02 12:09:23 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2007-11-02 12:09:23 -0400 |
commit | a2debc2704b9126d92d947c0407a0fbd709ab932 (patch) | |
tree | e5a9996a5474e568c781fdc07e0afd767092f823 /src/mesa/pipe/llvm/instructions.cpp | |
parent | e0e91e7ceb50f0e23311788559a8547dd24c7a80 (diff) |
Implement sin opcode.
Seems to have similar rounding border problems as cos.
Diffstat (limited to 'src/mesa/pipe/llvm/instructions.cpp')
-rw-r--r-- | src/mesa/pipe/llvm/instructions.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/instructions.cpp b/src/mesa/pipe/llvm/instructions.cpp index c4a1b2d5c1d..232dd9cd5de 100644 --- a/src/mesa/pipe/llvm/instructions.cpp +++ b/src/mesa/pipe/llvm/instructions.cpp @@ -874,5 +874,15 @@ llvm::Value * Instructions::scs(llvm::Value *in) return call; } + +llvm::Value * Instructions::sin(llvm::Value *in) +{ + llvm::Function *func = m_mod->getFunction("vsin"); + assert(func); + + CallInst *call = m_builder.CreateCall(func, in, name("sinres")); + call->setTailCall(false); + return call; +} #endif //MESA_LLVM |