diff options
author | Zack Rusin <[email protected]> | 2007-10-17 13:46:00 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2007-10-24 11:21:04 -0400 |
commit | bd38f4d92125e648b276344ebb2ab9d517b3e7a5 (patch) | |
tree | 73d5f059bfed125c4a25ac347f5b9d07794ba5e6 /src/mesa/pipe/llvm/instructions.cpp | |
parent | 3c558e17f03a9813d905e7dc38b59ff0ad142ee9 (diff) |
Implement dst opcode
Diffstat (limited to 'src/mesa/pipe/llvm/instructions.cpp')
-rw-r--r-- | src/mesa/pipe/llvm/instructions.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/instructions.cpp b/src/mesa/pipe/llvm/instructions.cpp index 62289ba62af..ee67ae0eeda 100644 --- a/src/mesa/pipe/llvm/instructions.cpp +++ b/src/mesa/pipe/llvm/instructions.cpp @@ -280,3 +280,25 @@ llvm::Value * Instructions::dph(llvm::Value *in1, llvm::Value *in2) return vectorFromVals(dph, dph, dph, dph); } +llvm::Value * Instructions::dst(llvm::Value *in1, llvm::Value *in2) +{ + ExtractElementInst *y1 = new ExtractElementInst(in1, unsigned(1), + name("y1"), + m_block); + ExtractElementInst *z = new ExtractElementInst(in1, unsigned(2), + name("z"), + m_block); + ExtractElementInst *y2 = new ExtractElementInst(in2, unsigned(1), + name("y2"), + m_block); + ExtractElementInst *w = new ExtractElementInst(in2, unsigned(3), + name("w"), + m_block); + BinaryOperator *ry = BinaryOperator::create(Instruction::Mul, + y1, y2, + name("tyuy"), + m_block); + return vectorFromVals(ConstantFP::get(Type::FloatTy, APFloat(1.f)), + ry, z, w); +} + |