summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/llvm/llvmtgsi.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-10-26 19:12:02 -0400
committerZack Rusin <zack@tungstengraphics.com>2007-10-26 19:12:56 -0400
commit789d248558061fe4d65f664d6770a12b90fa2e34 (patch)
tree51d17829b47536c8a8a0b0c929e8b28532f29ab3 /src/mesa/pipe/llvm/llvmtgsi.cpp
parent78c1f8b2decf168d183c52e7b414adb29dd18988 (diff)
Hold a stack of temporaries so that we can redeclare them
for all defined functions. Fixes crashes in function calls.
Diffstat (limited to 'src/mesa/pipe/llvm/llvmtgsi.cpp')
-rw-r--r--src/mesa/pipe/llvm/llvmtgsi.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/pipe/llvm/llvmtgsi.cpp b/src/mesa/pipe/llvm/llvmtgsi.cpp
index cfeb19e4ba..af602326ae 100644
--- a/src/mesa/pipe/llvm/llvmtgsi.cpp
+++ b/src/mesa/pipe/llvm/llvmtgsi.cpp
@@ -508,19 +508,21 @@ translate_instruction(llvm::Module *module,
case TGSI_OPCODE_BGNSUB: {
instr->bgnSub(instno, storage);
storage->setCurrentBlock(instr->currentBlock());
+ storage->pushTemps();
return;
}
break;
case TGSI_OPCODE_ENDLOOP2: {
instr->endLoop();
storage->setCurrentBlock(instr->currentBlock());
- storage->popArguments();
return;
}
break;
case TGSI_OPCODE_ENDSUB: {
instr->endSub();
storage->setCurrentBlock(instr->currentBlock());
+ storage->popArguments();
+ storage->popTemps();
return;
}
break;