summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/llvm/llvmtgsi.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-10-17 13:34:25 -0400
committerZack Rusin <zack@tungstengraphics.com>2007-10-24 11:21:04 -0400
commit7abe3364b2c463fd3e96c2bc9d07aaa91bcfbc2c (patch)
treeb12db4c361215d69e3afb5094c8c3fa1c5ed3f60 /src/mesa/pipe/llvm/llvmtgsi.cpp
parente20294be114c2593035afaf6fe0726e0ce628ed0 (diff)
Implement dot4 opcode
Diffstat (limited to 'src/mesa/pipe/llvm/llvmtgsi.cpp')
-rw-r--r--src/mesa/pipe/llvm/llvmtgsi.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/pipe/llvm/llvmtgsi.cpp b/src/mesa/pipe/llvm/llvmtgsi.cpp
index 45114abe4e..45bc96cb1a 100644
--- a/src/mesa/pipe/llvm/llvmtgsi.cpp
+++ b/src/mesa/pipe/llvm/llvmtgsi.cpp
@@ -205,7 +205,9 @@ translate_instruction(llvm::Module *module,
out = instr->dp3(inputs[0], inputs[1]);
}
break;
- case TGSI_OPCODE_DP4:
+ case TGSI_OPCODE_DP4: {
+ out = instr->dp4(inputs[0], inputs[1]);
+ }
break;
case TGSI_OPCODE_DST:
break;
@@ -767,6 +769,10 @@ ga_llvm_from_tgsi(struct pipe_context *pipe, const struct tgsi_token *tokens)
std::cout << "Creating llvm " <<std::endl;
struct ga_llvm_prog *ga_llvm =
(struct ga_llvm_prog *)malloc(sizeof(struct ga_llvm_prog));
+ fprintf(stderr, "DUMPX \n");
+ //tgsi_dump(tokens, TGSI_DUMP_VERBOSE);
+ tgsi_dump(tokens, 0);
+ fprintf(stderr, "DUMPEND \n");
llvm::Module *mod = tgsi_to_llvm(tokens);
/* Run optimization passes over it */
@@ -789,10 +795,6 @@ ga_llvm_from_tgsi(struct pipe_context *pipe, const struct tgsi_token *tokens)
ee->addModuleProvider(mp);
}
ga_llvm->module = mod;
- fprintf(stderr, "DUMPX \n");
- //tgsi_dump(tokens, TGSI_DUMP_VERBOSE);
- tgsi_dump(tokens, 0);
- fprintf(stderr, "DUMPEND \n");
Function *func = mod->getFunction("run_vertex_shader");
std::cout << "run_vertex_shader = "<<func<<std::endl;