summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/llvm/instructions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/llvm/instructions.h')
-rw-r--r--src/mesa/pipe/llvm/instructions.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/pipe/llvm/instructions.h b/src/mesa/pipe/llvm/instructions.h
index dd1e76728a..bb71cc8520 100644
--- a/src/mesa/pipe/llvm/instructions.h
+++ b/src/mesa/pipe/llvm/instructions.h
@@ -7,12 +7,13 @@
namespace llvm {
class VectorType;
+ class Function;
}
class Instructions
{
public:
- Instructions(llvm::Module *mod, llvm::BasicBlock *block);
+ Instructions(llvm::Module *mod, llvm::Function *func, llvm::BasicBlock *block);
llvm::Value *add(llvm::Value *in1, llvm::Value *in2);
llvm::Value *dp3(llvm::Value *in1, llvm::Value *in2);
@@ -33,6 +34,9 @@ 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:
const char *name(const char *prefix);
@@ -46,6 +50,7 @@ private:
llvm::Value *z, llvm::Value *w=0);
private:
llvm::Module *m_mod;
+ llvm::Function *m_func;
char m_name[32];
llvm::BasicBlock *m_block;
int m_idx;
@@ -57,6 +62,9 @@ private:
llvm::Function *m_llvmPow;
llvm::Function *m_llvmFloor;
llvm::Function *m_llvmFlog;
+ llvm::Function *m_llvmLit;
+
+ llvm::Constant *m_fmtPtr;
};
#endif