summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/llvm/storage.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-11-06 06:06:04 -0500
committerZack Rusin <zack@tungstengraphics.com>2007-12-11 09:49:33 -0500
commit1f30efb7365075de0ae119a40ab70a16bc547670 (patch)
tree37d55d99729c36993ff279469d88635b690b633d /src/mesa/pipe/llvm/storage.cpp
parent8681deddd7a7e749adaf43c7df4313ea54922e62 (diff)
Implement kilp and make it work
Diffstat (limited to 'src/mesa/pipe/llvm/storage.cpp')
-rw-r--r--src/mesa/pipe/llvm/storage.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/storage.cpp b/src/mesa/pipe/llvm/storage.cpp
index 71045fa37f..c33b9bf45d 100644
--- a/src/mesa/pipe/llvm/storage.cpp
+++ b/src/mesa/pipe/llvm/storage.cpp
@@ -343,6 +343,20 @@ llvm::Value * Storage::element(Args arg, int idx, llvm::Value *indIdx )
return elemIdx(val, idx, indIdx);
}
+void Storage::setKilElement(llvm::Value *val)
+{
+ std::vector<Value*> indices;
+ indices.push_back(constantInt(0));
+ indices.push_back(constantInt(static_cast<int>(KilArg)));
+ GetElementPtrInst *elem = new GetElementPtrInst(m_INPUT,
+ indices.begin(),
+ indices.end(),
+ name("kil_ptr"),
+ m_block);
+ StoreInst *st = new StoreInst(val, elem, false, m_block);
+ st->setAlignment(8);
+}
+
#endif //MESA_LLVM