mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-09 05:30:35 +01:00
get mov working
This commit is contained in:
parent
53c2963b84
commit
4c8456264c
4 changed files with 12 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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!");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue