From: Zack Rusin Date: Wed, 13 Feb 2008 05:48:08 +0000 (-0500) Subject: get mov working X-Git-Tag: android-x86-1.6~16^2~1465^2~390^2~2633 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4c8456264ca9c826165c41810b20dfbfbfb322e3;p=android-x86%2Fexternal-mesa.git get mov working --- 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:"<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 StorageSoa::inputElement(int idx, int swizzle, std::vector 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 StorageSoa::outputElement(int idx, int swizzle, std::vector 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(mod->getOrInsertFunction( func_name.c_str(),