spirv: Flush denormals if possible (#1302)

This commit is contained in:
TheTurtle 2024-10-10 17:47:39 +03:00 committed by GitHub
parent 56e8ed7833
commit 100036aecf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 130 additions and 98 deletions

View file

@ -92,6 +92,12 @@ struct Liverpool {
union {
BitField<0, 6, u64> num_vgprs;
BitField<6, 4, u64> num_sgprs;
BitField<10, 2, u64> priority;
BitField<12, 2, FpRoundMode> fp_round_mode32;
BitField<14, 2, FpRoundMode> fp_round_mode64;
BitField<16, 2, FpDenormMode> fp_denorm_mode32;
BitField<18, 2, FpDenormMode> fp_denorm_mode64;
BitField<12, 8, u64> float_mode;
BitField<24, 2, u64> vgpr_comp_cnt; // SPI provided per-thread inputs
BitField<33, 5, u64> num_user_regs;
} settings;

View file

@ -7,6 +7,20 @@
namespace AmdGpu {
enum class FpRoundMode : u32 {
NearestEven = 0,
PlusInf = 1,
MinInf = 2,
ToZero = 3,
};
enum class FpDenormMode : u32 {
InOutFlush = 0,
InAllowOutFlush = 1,
InFlushOutAllow = 2,
InOutAllow = 3,
};
// See `VGT_PRIMITIVE_TYPE` description in [Radeon Sea Islands 3D/Compute Register Reference Guide]
enum class PrimitiveType : u32 {
None = 0,
@ -103,4 +117,4 @@ enum class NumberFormat : u32 {
Ubscaled = 13,
};
} // namespace AmdGpu
} // namespace AmdGpu