diff options
author | Zack Rusin <[email protected]> | 2008-02-13 00:48:08 -0500 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2008-02-13 00:48:08 -0500 |
commit | 4c8456264ca9c826165c41810b20dfbfbfb322e3 (patch) | |
tree | fdb016ed0a0f158b74d51db48d48fecad3cf24d6 /src/mesa/pipe | |
parent | 53c2963b84f7a8538d2a2c67e3fbb8a22f644c57 (diff) |
get mov working
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r-- | src/mesa/pipe/llvm/gallivm.cpp | 3 | ||||
-rw-r--r-- | src/mesa/pipe/llvm/gallivm_cpu.cpp | 4 | ||||
-rw-r--r-- | src/mesa/pipe/llvm/storagesoa.cpp | 12 | ||||
-rw-r--r-- | src/mesa/pipe/llvm/tgsitollvm.cpp | 2 |
4 files changed, 12 insertions, 9 deletions
diff --git a/src/mesa/pipe/llvm/gallivm.cpp b/src/mesa/pipe/llvm/gallivm.cpp index ab13be09151..da0105c2c98 100644 --- a/src/mesa/pipe/llvm/gallivm.cpp +++ b/src/mesa/pipe/llvm/gallivm.cpp @@ -318,6 +318,9 @@ struct gallivm_prog * gallivm_ir_compile(struct gallivm_ir *ir) passes.run(*mod); prog->module = mod; + std::cout << "After optimizations:"<<std::endl; + mod->dump(); + return prog; } diff --git a/src/mesa/pipe/llvm/gallivm_cpu.cpp b/src/mesa/pipe/llvm/gallivm_cpu.cpp index 5f1268bf4f8..011cba55c23 100644 --- a/src/mesa/pipe/llvm/gallivm_cpu.cpp +++ b/src/mesa/pipe/llvm/gallivm_cpu.cpp @@ -105,10 +105,10 @@ static inline llvm::Function *func_for_shader(struct gallivm_prog *prog) switch (prog->type) { case GALLIVM_VS: - func = mod->getFunction("run_vertex_shader"); + func = mod->getFunction("vs_shader"); break; case GALLIVM_FS: - func = mod->getFunction("run_fragment_shader"); + func = mod->getFunction("fs_shader"); break; default: assert(!"Unknown shader type!"); diff --git a/src/mesa/pipe/llvm/storagesoa.cpp b/src/mesa/pipe/llvm/storagesoa.cpp index 786511204a3..ef14e29bfed 100644 --- a/src/mesa/pipe/llvm/storagesoa.cpp +++ b/src/mesa/pipe/llvm/storagesoa.cpp @@ -68,9 +68,9 @@ std::vector<llvm::Value*> StorageSoa::inputElement(int idx, int swizzle, std::vector<llvm::Value*> res(4); res[0] = element(m_input, idx, 0); - res[1] = element(m_input, idx, 0); - res[2] = element(m_input, idx, 0); - res[3] = element(m_input, idx, 0); + res[1] = element(m_input, idx, 1); + res[2] = element(m_input, idx, 2); + res[3] = element(m_input, idx, 3); return res; } @@ -89,9 +89,9 @@ std::vector<llvm::Value*> StorageSoa::outputElement(int idx, int swizzle, std::vector<llvm::Value*> res(4); res[0] = element(m_output, idx, 0); - res[1] = element(m_output, idx, 0); - res[2] = element(m_output, idx, 0); - res[3] = element(m_output, idx, 0); + res[1] = element(m_output, idx, 1); + res[2] = element(m_output, idx, 2); + res[3] = element(m_output, idx, 3); return res; } diff --git a/src/mesa/pipe/llvm/tgsitollvm.cpp b/src/mesa/pipe/llvm/tgsitollvm.cpp index d4e9a21a139..070c9a67f3c 100644 --- a/src/mesa/pipe/llvm/tgsitollvm.cpp +++ b/src/mesa/pipe/llvm/tgsitollvm.cpp @@ -1149,7 +1149,7 @@ llvm::Module * tgsi_to_llvmir(struct gallivm_ir *ir, } else { stream << "fs_shader"; } - stream << ir->id; + //stream << ir->id; std::string func_name = stream.str(); Function *shader = llvm::cast<Function>(mod->getOrInsertFunction( func_name.c_str(), |