diff options
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/modifiers.h | 23 |
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 c288eede0..44652eae7 100644 --- a/src/shader_recompiler/frontend/ir/modifiers.h +++ b/src/shader_recompiler/frontend/ir/modifiers.h | |||
| @@ -4,25 +4,30 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | ||
| 8 | |||
| 7 | namespace Shader::IR { | 9 | namespace Shader::IR { |
| 8 | 10 | ||
| 9 | enum class FmzMode : u8 { | 11 | enum class FmzMode : u8 { |
| 10 | None, // Denorms are not flushed, NAN is propagated (nouveau) | 12 | DontCare, // Not specified for this instruction |
| 11 | FTZ, // Flush denorms to zero, NAN is propagated (D3D11, NVN, GL, VK) | 13 | FTZ, // Flush denorms to zero, NAN is propagated (D3D11, NVN, GL, VK) |
| 12 | FMZ, // Flush denorms to zero, x * 0 == 0 (D3D9) | 14 | FMZ, // Flush denorms to zero, x * 0 == 0 (D3D9) |
| 15 | None, // Denorms are not flushed, NAN is propagated (nouveau) | ||
| 13 | }; | 16 | }; |
| 14 | 17 | ||
| 15 | enum class FpRounding : u8 { | 18 | enum class FpRounding : u8 { |
| 16 | RN, // Round to nearest even, | 19 | DontCare, // Not specified for this instruction |
| 17 | RM, // Round towards negative infinity | 20 | RN, // Round to nearest even, |
| 18 | RP, // Round towards positive infinity | 21 | RM, // Round towards negative infinity |
| 19 | RZ, // Round towards zero | 22 | RP, // Round towards positive infinity |
| 23 | RZ, // Round towards zero | ||
| 20 | }; | 24 | }; |
| 21 | 25 | ||
| 22 | struct FpControl { | 26 | struct FpControl { |
| 23 | bool no_contraction{false}; | 27 | bool no_contraction{false}; |
| 24 | FpRounding rounding{FpRounding::RN}; | 28 | FpRounding rounding{FpRounding::DontCare}; |
| 25 | FmzMode fmz_mode{FmzMode::FTZ}; | 29 | FmzMode fmz_mode{FmzMode::DontCare}; |
| 26 | }; | 30 | }; |
| 27 | static_assert(sizeof(FpControl) <= sizeof(u32)); | 31 | static_assert(sizeof(FpControl) <= sizeof(u32)); |
| 32 | |||
| 28 | } // namespace Shader::IR | 33 | } // namespace Shader::IR |