shader: Add support for forward declarations

This commit is contained in:
ReinUsesLisp 2021-02-14 22:46:40 -03:00 committed by ameerj
parent cbfb7d182a
commit 1b0cf2309c
11 changed files with 80 additions and 69 deletions

View file

@ -6,13 +6,13 @@
namespace Shader::IR {
enum class FmzMode {
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)
};
enum class FpRounding {
enum class FpRounding : u8 {
RN, // Round to nearest even,
RM, // Round towards negative infinity
RP, // Round towards positive infinity
@ -21,8 +21,8 @@ enum class FpRounding {
struct FpControl {
bool no_contraction{false};
FpRounding rounding : 8 = FpRounding::RN;
FmzMode fmz_mode : 8 = FmzMode::FTZ;
FpRounding rounding{FpRounding::RN};
FmzMode fmz_mode{FmzMode::FTZ};
};
static_assert(sizeof(FpControl) <= sizeof(u64));
static_assert(sizeof(FpControl) <= sizeof(u32));
} // namespace Shader::IR