From fcbde5e9f44ee7254b6618b6fe2be98a1c803ed2 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Wed, 17 Oct 2007 12:13:33 -0400 Subject: [PATCH] Add the "add" opcode and assert one vp if an opcode isn't supported --- src/mesa/pipe/llvm/llvmtgsi.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mesa/pipe/llvm/llvmtgsi.cpp b/src/mesa/pipe/llvm/llvmtgsi.cpp index c6cf2de4fc2..c934c002f08 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: -- 2.30.2