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/storage.cpp | |
parent | 56da35ef76b062f2d37f37a4d3d986e333c4954d (diff) |
Get basic function calls working in the shaders.
Diffstat (limited to 'src/mesa/pipe/llvm/storage.cpp')
-rw-r--r-- | src/mesa/pipe/llvm/storage.cpp | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/src/mesa/pipe/llvm/storage.cpp b/src/mesa/pipe/llvm/storage.cpp index cba719a8be..88ef6711cf 100644 --- a/src/mesa/pipe/llvm/storage.cpp +++ b/src/mesa/pipe/llvm/storage.cpp @@ -46,7 +46,7 @@ using namespace llvm; Storage::Storage(llvm::BasicBlock *block, llvm::Value *out, - llvm::Value *in, llvm::Value *consts) + llvm::Value *in, llvm::Value *consts) : m_block(block), m_OUT(out), m_IN(in), m_CONST(consts), m_temps(32), m_addrs(32), @@ -331,3 +331,41 @@ llvm::Value * Storage::outputElement(int idx, llvm::Value *indIdx ) return load; } + +llvm::Value * Storage::inputPtr() const +{ + return m_IN; +} + +llvm::Value * Storage::outputPtr() const +{ + return m_OUT; +} + +llvm::Value * Storage::constPtr() const +{ + return m_CONST; +} + +void Storage::pushArguments(llvm::Value *out, llvm::Value *in, + llvm::Value *constPtr) +{ + Args arg; + arg.out = m_OUT; + arg.in = m_IN; + arg.cst = m_CONST; + m_argStack.push(arg); + + m_OUT = out; + m_IN = in; + m_CONST = constPtr; +} + +void Storage::popArguments() +{ + Args arg = m_argStack.top(); + m_OUT = arg.out; + m_IN = arg.in; + m_CONST = arg.cst; + m_argStack.pop(); +} |