Make lit work but in a very lame way - will have to be rewritten.
authorZack Rusin <zack@tungstengraphics.com>
Sat, 20 Oct 2007 20:59:37 +0000 (16:59 -0400)
committerZack Rusin <zack@tungstengraphics.com>
Wed, 24 Oct 2007 15:21:04 +0000 (11:21 -0400)
src/mesa/pipe/llvm/instructions.cpp
src/mesa/pipe/llvm/instructions.h
src/mesa/pipe/llvm/llvmtgsi.cpp

index 3105c49bccc924e966993a6479eb4f6426cc9d1d..5a40888696f8474836719c397c70ceb80d042466 100644 (file)
@@ -167,7 +167,7 @@ llvm::Value *Instructions::callFAbs(llvm::Value *val)
 
 llvm::Value * Instructions::lit(llvm::Value *in)
 {
-#if 1
+#if 0
    printVector(in);
    return in;
 
@@ -191,7 +191,7 @@ llvm::Value * Instructions::lit(llvm::Value *in)
       m_llvmLit = makeLitFunction(m_mod);
    }
    CallInst *call = new CallInst(m_llvmLit, in, name("litres"), m_block);
-   //call->setCallingConv(CallingConv::C);
+   call->setCallingConv(CallingConv::C);
    call->setTailCall(false);
    return call;
 #endif
@@ -897,8 +897,3 @@ void Instructions::printVector(llvm::Value *val)
    call->setCallingConv(CallingConv::C);
    call->setTailCall(true);
 }
-
-llvm::Value * Instructions::swizzleWrite(llvm::Value *in, int mask)
-{
-    
-}
index bb71cc8520f099a83c9a252db7ee8dfe6c925dd3..87203fdc10bf035d2b670454e1012bb1133af976 100644 (file)
@@ -34,7 +34,6 @@ public:
    llvm::Value *rcp(llvm::Value *in);
    llvm::Value *rsq(llvm::Value *in);
    llvm::Value *sub(llvm::Value *in1, llvm::Value *in2);
-   llvm::Value *swizzleWrite(llvm::Value *in, int mask);
 
    void printVector(llvm::Value *val);
 private:
index 2a86a4e44250177c0ff6fc96f09aaebbb4a73a57..049bf0fa6e76df7d600e413c86e7b5385c7289e2 100644 (file)
@@ -184,8 +184,7 @@ translate_instruction(llvm::Module *module,
    }
       break;
    case TGSI_OPCODE_LIT: {
-      //out = instr->lit(inputs[0]);
-      return;
+      out = instr->lit(inputs[0]);
    }
       break;
    case TGSI_OPCODE_RCP: {