diff options
Diffstat (limited to 'src/mesa/pipe/llvm/storage.cpp')
-rw-r--r-- | src/mesa/pipe/llvm/storage.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/pipe/llvm/storage.cpp b/src/mesa/pipe/llvm/storage.cpp index 88ef6711cf..7300cdfef0 100644 --- a/src/mesa/pipe/llvm/storage.cpp +++ b/src/mesa/pipe/llvm/storage.cpp @@ -369,3 +369,24 @@ void Storage::popArguments() m_CONST = arg.cst; m_argStack.pop(); } + +void Storage::pushTemps() +{ + m_tempStack.push(m_temps); + std::vector<llvm::Value*> oldTemps = m_temps; + m_temps = std::vector<llvm::Value*>(32); + int i = 0; + for (std::vector<llvm::Value*>::iterator itr = oldTemps.begin(); + itr != oldTemps.end(); ++itr) { + if (*itr) { + declareTemp(i); + } + ++i; + } +} + +void Storage::popTemps() +{ + m_temps = m_tempStack.top(); + m_tempStack.pop(); +} |