diff options
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 ab13be0915..da0105c2c9 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 5f1268bf4f..011cba55c2 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 786511204a..ef14e29bfe 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 d4e9a21a13..070c9a67f3 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(), |