summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/main.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-02-20 07:30:13 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:22 +0200
commite2bc05b17d91854cbb9c0ce3647141bf7d33143e (patch)
tree96769db006b6015cd536483db98ee0697aee4992 /src/shader_recompiler/main.cpp
parentspirv: Add lower fp16 to fp32 pass (diff)
downloadyuzu-e2bc05b17d91854cbb9c0ce3647141bf7d33143e.tar
yuzu-e2bc05b17d91854cbb9c0ce3647141bf7d33143e.tar.gz
yuzu-e2bc05b17d91854cbb9c0ce3647141bf7d33143e.tar.bz2
yuzu-e2bc05b17d91854cbb9c0ce3647141bf7d33143e.tar.lz
yuzu-e2bc05b17d91854cbb9c0ce3647141bf7d33143e.tar.xz
yuzu-e2bc05b17d91854cbb9c0ce3647141bf7d33143e.tar.zst
yuzu-e2bc05b17d91854cbb9c0ce3647141bf7d33143e.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/shader_recompiler/main.cpp b/src/shader_recompiler/main.cpp
index abd44e323..72565f477 100644
--- a/src/shader_recompiler/main.cpp
+++ b/src/shader_recompiler/main.cpp
@@ -60,6 +60,17 @@ void RunDatabase() {
fmt::print(stdout, "{} ms", duration_cast<milliseconds>(t - t0).count() / double(N));
}
+static constexpr Profile PROFILE{
+ .unified_descriptor_binding = true,
+ .support_float_controls = true,
+ .support_separate_denorm_behavior = true,
+ .support_separate_rounding_mode = true,
+ .support_fp16_denorm_preserve = true,
+ .support_fp32_denorm_preserve = true,
+ .support_fp16_denorm_flush = true,
+ .support_fp32_denorm_flush = true,
+};
+
int main() {
// RunDatabase();
@@ -76,7 +87,7 @@ int main() {
fmt::print(stdout, "{}\n", cfg.Dot());
IR::Program program{TranslateProgram(inst_pool, block_pool, env, cfg)};
fmt::print(stdout, "{}\n", IR::DumpProgram(program));
- const std::vector<u32> spirv{Backend::SPIRV::EmitSPIRV(env, program)};
+ const std::vector<u32> spirv{Backend::SPIRV::EmitSPIRV(PROFILE, env, program)};
std::FILE* const file{std::fopen("D:\\shader.spv", "wb")};
std::fwrite(spirv.data(), spirv.size(), sizeof(u32), file);
std::fclose(file);