diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2007-11-05 13:41:56 -0500 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2007-12-11 09:48:13 -0500 |
commit | 8681deddd7a7e749adaf43c7df4313ea54922e62 (patch) | |
tree | 8b67c83fd0819b73c8c4842929a833292a8ceefd /src/mesa/pipe/llvm/gallivm.cpp | |
parent | c3af68dc5022715cc8f126b7df12f3f5248aefe7 (diff) |
Rewrite argument passing to prepare for handling of the kil instruction.
Pass the inputs/outputs pointer in the structure instead of infinitely
expanding arguments to the functions.
Diffstat (limited to 'src/mesa/pipe/llvm/gallivm.cpp')
-rw-r--r-- | src/mesa/pipe/llvm/gallivm.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/mesa/pipe/llvm/gallivm.cpp b/src/mesa/pipe/llvm/gallivm.cpp index a60440022a..65c95074fd 100644 --- a/src/mesa/pipe/llvm/gallivm.cpp +++ b/src/mesa/pipe/llvm/gallivm.cpp @@ -485,11 +485,7 @@ translate_instruction(llvm::Module *module, case TGSI_OPCODE_BRA: break; case TGSI_OPCODE_CAL: { - instr->cal(inst->InstructionExtLabel.Label, - storage->outputPtr(), - storage->inputPtr(), - storage->constPtr(), - storage->tempPtr()); + instr->cal(inst->InstructionExtLabel.Label, storage->inputPtr()); return; } break; @@ -740,14 +736,8 @@ tgsi_to_llvm(struct gallivm_prog *prog, const struct tgsi_token *tokens) shader->setName(func_name.c_str()); Function::arg_iterator args = shader->arg_begin(); - Value *ptr_OUT = args++; - ptr_OUT->setName("OUT"); - Value *ptr_IN = args++; - ptr_IN->setName("IN"); - Value *ptr_CONST = args++; - ptr_CONST->setName("CONST"); - Value *ptr_TEMPS = args++; - ptr_TEMPS->setName("TEMPS"); + Value *ptr_INPUT = args++; + ptr_INPUT->setName("input"); BasicBlock *label_entry = new BasicBlock("entry", shader, 0); @@ -755,7 +745,7 @@ tgsi_to_llvm(struct gallivm_prog *prog, const struct tgsi_token *tokens) fi = tgsi_default_full_instruction(); fd = tgsi_default_full_declaration(); - Storage storage(label_entry, ptr_OUT, ptr_IN, ptr_CONST, ptr_TEMPS); + Storage storage(label_entry, ptr_INPUT); Instructions instr(mod, shader, label_entry, &storage); while(!tgsi_parse_end_of_tokens(&parse)) { tgsi_parse_token(&parse); |