diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2007-10-17 12:13:33 -0400 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2007-10-24 11:21:03 -0400 |
commit | fcbde5e9f44ee7254b6618b6fe2be98a1c803ed2 (patch) | |
tree | 36ba59303a995cff26848422913fb6187a0a5bd2 | |
parent | b0f80693434cb203f63d8fbab56c1522000ed88f (diff) |
Add the "add" opcode and assert one vp if an opcode isn't supported
-rw-r--r-- | src/mesa/pipe/llvm/llvmtgsi.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/pipe/llvm/llvmtgsi.cpp b/src/mesa/pipe/llvm/llvmtgsi.cpp index c6cf2de4fc..c934c002f0 100644 --- a/src/mesa/pipe/llvm/llvmtgsi.cpp +++ b/src/mesa/pipe/llvm/llvmtgsi.cpp @@ -190,7 +190,9 @@ translate_instruction(llvm::Module *module, out = instr->mul(inputs[0], inputs[1]); } break; - case TGSI_OPCODE_ADD: + case TGSI_OPCODE_ADD: { + out = instr->add(inputs[0], inputs[1]); + } break; case TGSI_OPCODE_DP3: { out = instr->dp3(inputs[0], inputs[1]); @@ -447,6 +449,7 @@ translate_instruction(llvm::Module *module, case TGSI_OPCODE_KIL: break; case TGSI_OPCODE_END: + return; break; default: fprintf(stderr, "ERROR: Unknown opcode %d\n", @@ -455,6 +458,11 @@ translate_instruction(llvm::Module *module, break; } + if (!out) { + fprintf(stderr, "ERROR: unsupported opcode %d\n", + inst->Instruction.Opcode); + assert(!"Unsupported opcode"); + } switch( inst->Instruction.Saturate ) { case TGSI_SAT_NONE: |