diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-08 06:54:35 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:22 +0200 |
commit | 2930dccecc933d6748772e9f51a5724fe1e6771b (patch) | |
tree | ec4aa48062f8a2fcba31b1c64f769ddf25a87832 /src/shader_recompiler/main.cpp | |
parent | shader: Better constant folding (diff) | |
download | yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.gz yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.bz2 yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.lz yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.xz yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.zst yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.zip |
Diffstat (limited to 'src/shader_recompiler/main.cpp')
-rw-r--r-- | src/shader_recompiler/main.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/shader_recompiler/main.cpp b/src/shader_recompiler/main.cpp index 19e36590c..9887e066d 100644 --- a/src/shader_recompiler/main.cpp +++ b/src/shader_recompiler/main.cpp @@ -6,6 +6,7 @@ #include <fmt/format.h> +#include "shader_recompiler/backend/spirv/emit_spirv.h" #include "shader_recompiler/file_environment.h" #include "shader_recompiler/frontend/ir/basic_block.h" #include "shader_recompiler/frontend/ir/ir_emitter.h" @@ -51,18 +52,18 @@ void RunDatabase() { int main() { // RunDatabase(); - // FileEnvironment env{"D:\\Shaders\\Database\\test.bin"}; - FileEnvironment env{"D:\\Shaders\\Database\\Oninaki\\CS15C2FB1F0B965767.bin"}; - auto cfg{std::make_unique<Flow::CFG>(env, 0)}; - // fmt::print(stdout, "{}\n", cfg->Dot()); - auto inst_pool{std::make_unique<ObjectPool<IR::Inst>>()}; auto block_pool{std::make_unique<ObjectPool<IR::Block>>()}; - for (int i = 0; i < 8192 * 4; ++i) { - void(inst_pool->Create(IR::Opcode::Void, 0)); + // FileEnvironment env{"D:\\Shaders\\Database\\test.bin"}; + FileEnvironment env{"D:\\Shaders\\Database\\Oninaki\\CS15C2FB1F0B965767.bin"}; + for (int i = 0; i < 1; ++i) { + block_pool->ReleaseContents(); + inst_pool->ReleaseContents(); + auto cfg{std::make_unique<Flow::CFG>(env, 0)}; + // fmt::print(stdout, "{}\n", cfg->Dot()); + IR::Program program{TranslateProgram(*inst_pool, *block_pool, env, *cfg)}; + // fmt::print(stdout, "{}\n", IR::DumpProgram(program)); + Backend::SPIRV::EmitSPIRV spirv{program}; } - - IR::Program program{TranslateProgram(*inst_pool, *block_pool, env, *cfg)}; - fmt::print(stdout, "{}\n", IR::DumpProgram(program)); } |