diff options
| author | 2021-02-19 18:10:18 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:22 -0400 | |
| commit | 6db69990da9f232e6d982cdcb69c2e27d93075cf (patch) | |
| tree | 9367909cd030622ea36c4cadccd2fabc6f28d471 /src/shader_recompiler/main.cpp | |
| parent | shader: Primitive Vulkan integration (diff) | |
| download | yuzu-6db69990da9f232e6d982cdcb69c2e27d93075cf.tar.gz yuzu-6db69990da9f232e6d982cdcb69c2e27d93075cf.tar.xz yuzu-6db69990da9f232e6d982cdcb69c2e27d93075cf.zip | |
spirv: Add lower fp16 to fp32 pass
Diffstat (limited to 'src/shader_recompiler/main.cpp')
| -rw-r--r-- | src/shader_recompiler/main.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/shader_recompiler/main.cpp b/src/shader_recompiler/main.cpp index 050a37f18..abd44e323 100644 --- a/src/shader_recompiler/main.cpp +++ b/src/shader_recompiler/main.cpp | |||
| @@ -67,8 +67,8 @@ int main() { | |||
| 67 | ObjectPool<IR::Inst> inst_pool; | 67 | ObjectPool<IR::Inst> inst_pool; |
| 68 | ObjectPool<IR::Block> block_pool; | 68 | ObjectPool<IR::Block> block_pool; |
| 69 | 69 | ||
| 70 | FileEnvironment env{"D:\\Shaders\\Database\\Oninaki\\CS8F146B41DB6BD826.bin"}; | 70 | // FileEnvironment env{"D:\\Shaders\\Database\\Oninaki\\CS8F146B41DB6BD826.bin"}; |
| 71 | // FileEnvironment env{"D:\\Shaders\\shader.bin"}; | 71 | FileEnvironment env{"D:\\Shaders\\shader.bin"}; |
| 72 | block_pool.ReleaseContents(); | 72 | block_pool.ReleaseContents(); |
| 73 | inst_pool.ReleaseContents(); | 73 | inst_pool.ReleaseContents(); |
| 74 | flow_block_pool.ReleaseContents(); | 74 | flow_block_pool.ReleaseContents(); |
| @@ -76,5 +76,9 @@ int main() { | |||
| 76 | fmt::print(stdout, "{}\n", cfg.Dot()); | 76 | fmt::print(stdout, "{}\n", cfg.Dot()); |
| 77 | IR::Program program{TranslateProgram(inst_pool, block_pool, env, cfg)}; | 77 | IR::Program program{TranslateProgram(inst_pool, block_pool, env, cfg)}; |
| 78 | fmt::print(stdout, "{}\n", IR::DumpProgram(program)); | 78 | fmt::print(stdout, "{}\n", IR::DumpProgram(program)); |
| 79 | void(Backend::SPIRV::EmitSPIRV(env, program)); | 79 | const std::vector<u32> spirv{Backend::SPIRV::EmitSPIRV(env, program)}; |
| 80 | std::FILE* const file{std::fopen("D:\\shader.spv", "wb")}; | ||
| 81 | std::fwrite(spirv.data(), spirv.size(), sizeof(u32), file); | ||
| 82 | std::fclose(file); | ||
| 83 | std::system("spirv-dis D:\\shader.spv"); | ||
| 80 | } | 84 | } |