diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-15 04:09:11 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:22 +0200 |
commit | d5d468cf2cbe235ee149dbd37951389d2a7e61da (patch) | |
tree | e99fe0e09c130d6171add858f6e9520d6b3948d5 /src/shader_recompiler/main.cpp | |
parent | shader: Fix tracking (diff) | |
download | yuzu-d5d468cf2cbe235ee149dbd37951389d2a7e61da.tar yuzu-d5d468cf2cbe235ee149dbd37951389d2a7e61da.tar.gz yuzu-d5d468cf2cbe235ee149dbd37951389d2a7e61da.tar.bz2 yuzu-d5d468cf2cbe235ee149dbd37951389d2a7e61da.tar.lz yuzu-d5d468cf2cbe235ee149dbd37951389d2a7e61da.tar.xz yuzu-d5d468cf2cbe235ee149dbd37951389d2a7e61da.tar.zst yuzu-d5d468cf2cbe235ee149dbd37951389d2a7e61da.zip |
Diffstat (limited to '')
-rw-r--r-- | src/shader_recompiler/main.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/shader_recompiler/main.cpp b/src/shader_recompiler/main.cpp index 3b110af61..216345e91 100644 --- a/src/shader_recompiler/main.cpp +++ b/src/shader_recompiler/main.cpp @@ -37,7 +37,7 @@ void RunDatabase() { ForEachFile("D:\\Shaders\\Database", [&](const std::filesystem::path& path) { map.emplace_back(std::make_unique<FileEnvironment>(path.string().c_str())); }); - auto block_pool{std::make_unique<ObjectPool<Flow::Block>>()}; + ObjectPool<Flow::Block> block_pool; using namespace std::chrono; auto t0 = high_resolution_clock::now(); int N = 1; @@ -48,8 +48,8 @@ void RunDatabase() { // fmt::print(stdout, "Decoding {}\n", path.string()); const Location start_address{0}; - block_pool->ReleaseContents(); - Flow::CFG cfg{*env, *block_pool, start_address}; + block_pool.ReleaseContents(); + Flow::CFG cfg{*env, block_pool, start_address}; // fmt::print(stdout, "{}\n", cfg->Dot()); // IR::Program program{env, cfg}; // Optimize(program); @@ -63,18 +63,18 @@ void RunDatabase() { int main() { // RunDatabase(); - auto flow_block_pool{std::make_unique<ObjectPool<Flow::Block>>()}; - auto inst_pool{std::make_unique<ObjectPool<IR::Inst>>()}; - auto block_pool{std::make_unique<ObjectPool<IR::Block>>()}; + ObjectPool<Flow::Block> flow_block_pool; + ObjectPool<IR::Inst> inst_pool; + ObjectPool<IR::Block> block_pool; // FileEnvironment env{"D:\\Shaders\\Database\\Oninaki\\CS8F146B41DB6BD826.bin"}; FileEnvironment env{"D:\\Shaders\\shader.bin"}; - block_pool->ReleaseContents(); - inst_pool->ReleaseContents(); - flow_block_pool->ReleaseContents(); - Flow::CFG cfg{env, *flow_block_pool, 0}; + block_pool.ReleaseContents(); + inst_pool.ReleaseContents(); + flow_block_pool.ReleaseContents(); + Flow::CFG cfg{env, flow_block_pool, 0}; fmt::print(stdout, "{}\n", cfg.Dot()); - IR::Program program{TranslateProgram(*inst_pool, *block_pool, env, cfg)}; + IR::Program program{TranslateProgram(inst_pool, block_pool, env, cfg)}; fmt::print(stdout, "{}\n", IR::DumpProgram(program)); Backend::SPIRV::EmitSPIRV spirv{program}; } |