aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/modifiers.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-02-20 03:30:13 -0300
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-22 21:51:22 -0400
commite2bc05b17d91854cbb9c0ce3647141bf7d33143e (patch)
tree96769db006b6015cd536483db98ee0697aee4992 /src/shader_recompiler/frontend/ir/modifiers.h
parent6db69990da9f232e6d982cdcb69c2e27d93075cf (diff)
shader: Add denorm flush support
Diffstat (limited to 'src/shader_recompiler/frontend/ir/modifiers.h')
-rw-r--r--src/shader_recompiler/frontend/ir/modifiers.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/shader_recompiler/frontend/ir/modifiers.h b/src/shader_recompiler/frontend/ir/modifiers.h
index c288eede03..44652eae7c 100644
--- a/src/shader_recompiler/frontend/ir/modifiers.h
+++ b/src/shader_recompiler/frontend/ir/modifiers.h
@@ -4,25 +4,30 @@
#pragma once
+#include "common/common_types.h"
+
namespace Shader::IR {
enum class FmzMode : u8 {
- 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)
+ DontCare, // Not specified for this instruction
+ FTZ, // Flush denorms to zero, NAN is propagated (D3D11, NVN, GL, VK)
+ FMZ, // Flush denorms to zero, x * 0 == 0 (D3D9)
+ None, // Denorms are not flushed, NAN is propagated (nouveau)
};
enum class FpRounding : u8 {
- RN, // Round to nearest even,
- RM, // Round towards negative infinity
- RP, // Round towards positive infinity
- RZ, // Round towards zero
+ DontCare, // Not specified for this instruction
+ 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{FpRounding::RN};
- FmzMode fmz_mode{FmzMode::FTZ};
+ FpRounding rounding{FpRounding::DontCare};
+ FmzMode fmz_mode{FmzMode::DontCare};
};
static_assert(sizeof(FpControl) <= sizeof(u32));
+
} // namespace Shader::IR