diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2007-10-26 14:52:10 -0400 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2007-10-26 14:59:38 -0400 |
commit | 67e4b8299620db2e2f33795621b23e9827604bb1 (patch) | |
tree | 42ca87bc94e3753ec04d46010766cc3acf2d699f /src/mesa/pipe/llvm/instructions.h | |
parent | 56da35ef76b062f2d37f37a4d3d986e333c4954d (diff) |
Get basic function calls working in the shaders.
Diffstat (limited to 'src/mesa/pipe/llvm/instructions.h')
-rw-r--r-- | src/mesa/pipe/llvm/instructions.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/instructions.h b/src/mesa/pipe/llvm/instructions.h index 82d871d410..85feb1665d 100644 --- a/src/mesa/pipe/llvm/instructions.h +++ b/src/mesa/pipe/llvm/instructions.h @@ -37,6 +37,7 @@ #include <llvm/Module.h> #include <llvm/Value.h> +#include <map> #include <stack> namespace llvm { @@ -44,6 +45,8 @@ namespace llvm { class Function; } +class Storage; + class Instructions { public: @@ -55,7 +58,10 @@ public: llvm::Value *arl(llvm::Value *in1); llvm::Value *add(llvm::Value *in1, llvm::Value *in2); void beginLoop(); + void bgnSub(unsigned, Storage *); void brk(); + void cal(int label, llvm::Value *out, llvm::Value *in, + llvm::Value *cst); llvm::Value *cross(llvm::Value *in1, llvm::Value *in2); llvm::Value *dp3(llvm::Value *in1, llvm::Value *in2); llvm::Value *dp4(llvm::Value *in1, llvm::Value *in2); @@ -65,6 +71,7 @@ public: void endif(); void endLoop(); void end(); + void endSub(); llvm::Value *ex2(llvm::Value *in); llvm::Value *floor(llvm::Value *in); llvm::Value *frc(llvm::Value *in); @@ -101,6 +108,9 @@ private: llvm::Value *z, llvm::Value *w=0); llvm::Function *declarePrintf(); + llvm::Function *declareFunc(int label); + + llvm::Function *findFunction(int label); private: llvm::Module *m_mod; llvm::Function *m_func; @@ -125,6 +135,7 @@ private: llvm::BasicBlock *end; }; std::stack<Loop> m_loopStack; + std::map<int, llvm::Function*> m_functions; }; #endif |