summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir/modifiers.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-02-03 20:43:04 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:21 +0200
commitd24a16045f0f6b0b873d5e3b5bf187c1a8c4343f (patch)
tree0108a028b437bc59dfe7864f333cf4c50a46d3b5 /src/shader_recompiler/frontend/ir/modifiers.h
parentshader: SSA and dominance (diff)
downloadyuzu-d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f.tar
yuzu-d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f.tar.gz
yuzu-d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f.tar.bz2
yuzu-d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f.tar.lz
yuzu-d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f.tar.xz
yuzu-d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f.tar.zst
yuzu-d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f.zip
Diffstat (limited to 'src/shader_recompiler/frontend/ir/modifiers.h')
-rw-r--r--src/shader_recompiler/frontend/ir/modifiers.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/modifiers.h b/src/shader_recompiler/frontend/ir/modifiers.h
new file mode 100644
index 000000000..28bb9e798
--- /dev/null
+++ b/src/shader_recompiler/frontend/ir/modifiers.h
@@ -0,0 +1,28 @@
+// Copyright 2021 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+namespace Shader::IR {
+
+enum class FmzMode {
+ None, // Denorms are not flushed, NAN is propagated (nouveau)
+ FTZ, // Flush denorms to zero, NAN is propagated (D3D11, NVN, GL, VK)
+ FMZ, // Flush denorms to zero, x * 0 == 0 (D3D9)
+};
+
+enum class FpRounding {
+ RN, // Round to nearest even,
+ RM, // Round towards negative infinity
+ RP, // Round towards positive infinity
+ RZ, // Round towards zero
+};
+
+struct FpControl {
+ bool no_contraction{false};
+ FpRounding rounding : 8 = FpRounding::RN;
+ FmzMode fmz_mode : 8 = FmzMode::FTZ;
+};
+static_assert(sizeof(FpControl) <= sizeof(u64));
+} // namespace Shader::IR