diff options
author | Zack Rusin <[email protected]> | 2008-02-12 23:08:42 -0500 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2008-02-12 23:11:05 -0500 |
commit | 3c3c1ff5cd19af23033e080d8f0b9b5ae8363f2e (patch) | |
tree | de5cfa513de1fd1fd73403fdb2f1cc7c3a13befd /src/mesa/pipe/llvm/storagesoa.cpp | |
parent | cad7bc74d69ee053452aa4bd20740dc79ad6eab6 (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.cpp | 14 |
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, |