From 3c3c1ff5cd19af23033e080d8f0b9b5ae8363f2e Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Tue, 12 Feb 2008 23:08:42 -0500 Subject: stop generate llvm entry points entrypoints are useless because we use the same paths as all other code. also simplify llvm swizzling code --- src/mesa/pipe/llvm/storagesoa.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/mesa/pipe/llvm/storagesoa.cpp') diff --git a/src/mesa/pipe/llvm/storagesoa.cpp b/src/mesa/pipe/llvm/storagesoa.cpp index ff94307c85..8f82989cc5 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 &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 &val, -- cgit v1.2.3