summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/llvm/storage.h
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-10-26 14:52:10 -0400
committerZack Rusin <zack@tungstengraphics.com>2007-10-26 14:59:38 -0400
commit67e4b8299620db2e2f33795621b23e9827604bb1 (patch)
tree42ca87bc94e3753ec04d46010766cc3acf2d699f /src/mesa/pipe/llvm/storage.h
parent56da35ef76b062f2d37f37a4d3d986e333c4954d (diff)
Get basic function calls working in the shaders.
Diffstat (limited to 'src/mesa/pipe/llvm/storage.h')
-rw-r--r--src/mesa/pipe/llvm/storage.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/storage.h b/src/mesa/pipe/llvm/storage.h
index ebdfcdefd6..b8d6eb0604 100644
--- a/src/mesa/pipe/llvm/storage.h
+++ b/src/mesa/pipe/llvm/storage.h
@@ -35,6 +35,7 @@
#include <map>
#include <set>
+#include <stack>
#include <vector>
namespace llvm {
@@ -53,6 +54,10 @@ public:
llvm::Value *out,
llvm::Value *in, llvm::Value *consts);
+ llvm::Value *inputPtr() const;
+ llvm::Value *outputPtr() const;
+ llvm::Value *constPtr() const;
+
void setCurrentBlock(llvm::BasicBlock *block);
llvm::ConstantInt *constantInt(int);
@@ -76,6 +81,10 @@ public:
int numConsts() const;
+ void pushArguments(llvm::Value *out, llvm::Value *in,
+ llvm::Value *constPtr);
+ void popArguments();
+
private:
llvm::Value *maskWrite(llvm::Value *src, int mask, llvm::Value *templ);
const char *name(const char *prefix);
@@ -106,6 +115,13 @@ private:
int m_numConsts;
std::map<int, bool > m_destWriteMap;
+
+ struct Args {
+ llvm::Value *out;
+ llvm::Value *in;
+ llvm::Value *cst;
+ };
+ std::stack<Args> m_argStack;
};
#endif