summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/maxwell/program.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-02-16 08:10:22 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:22 +0200
commitb5d7279d878211654b4abb165d94af763a365f47 (patch)
tree9b3a7b6e9d7d2b8945fe87d27ff75f1712ef06aa /src/shader_recompiler/frontend/maxwell/program.cpp
parentshader: Improve object pool (diff)
downloadyuzu-b5d7279d878211654b4abb165d94af763a365f47.tar
yuzu-b5d7279d878211654b4abb165d94af763a365f47.tar.gz
yuzu-b5d7279d878211654b4abb165d94af763a365f47.tar.bz2
yuzu-b5d7279d878211654b4abb165d94af763a365f47.tar.lz
yuzu-b5d7279d878211654b4abb165d94af763a365f47.tar.xz
yuzu-b5d7279d878211654b4abb165d94af763a365f47.tar.zst
yuzu-b5d7279d878211654b4abb165d94af763a365f47.zip
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/program.cpp')
-rw-r--r--src/shader_recompiler/frontend/maxwell/program.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/program.cpp b/src/shader_recompiler/frontend/maxwell/program.cpp
index dab6d68c0..8331d576c 100644
--- a/src/shader_recompiler/frontend/maxwell/program.cpp
+++ b/src/shader_recompiler/frontend/maxwell/program.cpp
@@ -53,21 +53,22 @@ IR::Program TranslateProgram(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Blo
for (Flow::Function& cfg_function : cfg.Functions()) {
functions.push_back(IR::Function{
.blocks{TranslateCode(inst_pool, block_pool, env, cfg_function)},
+ .post_order_blocks{},
});
}
-
- fmt::print(stdout, "No optimizations: {}", IR::DumpProgram(program));
for (IR::Function& function : functions) {
function.post_order_blocks = PostOrder(function.blocks);
Optimization::SsaRewritePass(function.post_order_blocks);
}
+ fmt::print(stdout, "{}\n", IR::DumpProgram(program));
+ Optimization::GlobalMemoryToStorageBufferPass(program);
for (IR::Function& function : functions) {
- Optimization::PostOrderInvoke(Optimization::GlobalMemoryToStorageBufferPass, function);
Optimization::PostOrderInvoke(Optimization::ConstantPropagationPass, function);
Optimization::PostOrderInvoke(Optimization::DeadCodeEliminationPass, function);
Optimization::IdentityRemovalPass(function);
Optimization::VerificationPass(function);
}
+ Optimization::CollectShaderInfoPass(program);
//*/
return program;
}