diff options
| author | 2021-02-03 16:43:04 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:21 -0400 | |
| commit | d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f (patch) | |
| tree | 0108a028b437bc59dfe7864f333cf4c50a46d3b5 /src/shader_recompiler/frontend/ir/modifiers.h | |
| parent | shader: SSA and dominance (diff) | |
| download | yuzu-d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f.tar.gz yuzu-d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f.tar.xz yuzu-d24a16045f0f6b0b873d5e3b5bf187c1a8c4343f.zip | |
shader: Initial instruction support
Diffstat (limited to 'src/shader_recompiler/frontend/ir/modifiers.h')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/modifiers.h | 28 |
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 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Shader::IR { | ||
| 8 | |||
| 9 | enum class FmzMode { | ||
| 10 | None, // Denorms are not flushed, NAN is propagated (nouveau) | ||
| 11 | FTZ, // Flush denorms to zero, NAN is propagated (D3D11, NVN, GL, VK) | ||
| 12 | FMZ, // Flush denorms to zero, x * 0 == 0 (D3D9) | ||
| 13 | }; | ||
| 14 | |||
| 15 | enum class FpRounding { | ||
| 16 | RN, // Round to nearest even, | ||
| 17 | RM, // Round towards negative infinity | ||
| 18 | RP, // Round towards positive infinity | ||
| 19 | RZ, // Round towards zero | ||
| 20 | }; | ||
| 21 | |||
| 22 | struct FpControl { | ||
| 23 | bool no_contraction{false}; | ||
| 24 | FpRounding rounding : 8 = FpRounding::RN; | ||
| 25 | FmzMode fmz_mode : 8 = FmzMode::FTZ; | ||
| 26 | }; | ||
| 27 | static_assert(sizeof(FpControl) <= sizeof(u64)); | ||
| 28 | } // namespace Shader::IR | ||