suyu/src/shader_recompiler/frontend/ir/modifiers.h

29 lines
781 B
C++
Raw Normal View History

2021-02-03 20:43:04 +01:00
// 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 : u8 {
2021-02-03 20:43:04 +01:00
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 : u8 {
2021-02-03 20:43:04 +01:00
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};
2021-02-03 20:43:04 +01:00
};
static_assert(sizeof(FpControl) <= sizeof(u32));
2021-02-03 20:43:04 +01:00
} // namespace Shader::IR