diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2008-01-24 07:49:36 -0500 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2008-01-24 07:49:36 -0500 |
commit | bac991d6452a12a9c6cb85293a17448540761ca7 (patch) | |
tree | 5e4065da16cada4f2020218b69cf130611347975 /src/mesa/pipe/llvm/gallivm.cpp | |
parent | 11349b6a5f648bbad8765bf744a8e42b0f5e5f50 (diff) |
change the name of the shaders to reflect what they do.
remove stale code and do some general cleanups.
Diffstat (limited to 'src/mesa/pipe/llvm/gallivm.cpp')
-rw-r--r-- | src/mesa/pipe/llvm/gallivm.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/pipe/llvm/gallivm.cpp b/src/mesa/pipe/llvm/gallivm.cpp index 49bbf753c4..afa1446890 100644 --- a/src/mesa/pipe/llvm/gallivm.cpp +++ b/src/mesa/pipe/llvm/gallivm.cpp @@ -733,7 +733,11 @@ tgsi_to_llvm(struct gallivm_prog *prog, const struct tgsi_token *tokens) unsigned instno = 0; Function* shader = mod->getFunction("execute_shader"); std::ostringstream stream; - stream << "execute_shader"; + if (prog->type == GALLIVM_VS) { + stream << "vs_shader"; + } else { + stream << "fs_shader"; + } stream << prog->id; std::string func_name = stream.str(); shader->setName(func_name.c_str()); @@ -799,6 +803,7 @@ gallivm_from_tgsi(const struct tgsi_token *tokens, enum gallivm_shader_type type struct gallivm_prog *gallivm = (struct gallivm_prog *)calloc(1, sizeof(struct gallivm_prog)); gallivm->id = GLOBAL_ID; + gallivm->type = type; tgsi_dump(tokens, 0); llvm::Module *mod = tgsi_to_llvm(gallivm, tokens); @@ -812,7 +817,6 @@ gallivm_from_tgsi(const struct tgsi_token *tokens, enum gallivm_shader_type type passes.run(*mod); gallivm->module = mod; - gallivm->type = type; gallivm_prog_dump(gallivm, 0); @@ -966,7 +970,8 @@ void gallivm_prog_dump(struct gallivm_prog *prog, const char *file_prefix) const llvm::Function &func = (*itr); std::string name = func.getName(); const llvm::Function *found = 0; - if (name.find("execute_shader") != std::string::npos || + if (name.find("vs_shader") != std::string::npos || + name.find("fs_shader") != std::string::npos || name.find("function") != std::string::npos) found = &func; if (found) { |