summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/llvm/storagesoa.cpp
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2008-02-12 23:08:42 -0500
committerZack Rusin <[email protected]>2008-02-12 23:11:05 -0500
commit3c3c1ff5cd19af23033e080d8f0b9b5ae8363f2e (patch)
treede5cfa513de1fd1fd73403fdb2f1cc7c3a13befd /src/mesa/pipe/llvm/storagesoa.cpp
parentcad7bc74d69ee053452aa4bd20740dc79ad6eab6 (diff)
stop generate llvm entry points
entrypoints are useless because we use the same paths as all other code. also simplify llvm swizzling code
Diffstat (limited to 'src/mesa/pipe/llvm/storagesoa.cpp')
-rw-r--r--src/mesa/pipe/llvm/storagesoa.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/storagesoa.cpp b/src/mesa/pipe/llvm/storagesoa.cpp
index ff94307c85d..8f82989cc5d 100644
--- a/src/mesa/pipe/llvm/storagesoa.cpp
+++ b/src/mesa/pipe/llvm/storagesoa.cpp
@@ -119,6 +119,20 @@ llvm::Value * StorageSoa::extractIndex(llvm::Value *vec)
void StorageSoa::storeOutput(int dstIdx, const std::vector<llvm::Value*> &val,
int mask)
{
+ if (mask != TGSI_WRITEMASK_XYZW) {
+ fprintf(stderr, "requires swizzle!!\n");
+ assert(0);
+ } else {
+ llvm::Value *xChannel = elementPointer(m_output, dstIdx, 0);
+ llvm::Value *yChannel = elementPointer(m_output, dstIdx, 1);
+ llvm::Value *zChannel = elementPointer(m_output, dstIdx, 2);
+ llvm::Value *wChannel = elementPointer(m_output, dstIdx, 3);
+
+ StoreInst *st = new StoreInst(val[0], xChannel, false, m_block);
+ st = new StoreInst(val[1], yChannel, false, m_block);
+ st = new StoreInst(val[2], zChannel, false, m_block);
+ st = new StoreInst(val[3], wChannel, false, m_block);
+ }
}
void StorageSoa::storeTemp(int idx, const std::vector<llvm::Value*> &val,