diff --git a/src/panfrost/compiler/compiler.h b/src/panfrost/compiler/compiler.h index 244e5a7ce86..b4dc34c47b1 100644 --- a/src/panfrost/compiler/compiler.h +++ b/src/panfrost/compiler/compiler.h @@ -34,6 +34,7 @@ #include "util/u_worklist.h" #include "bi_opcodes.h" #include "bifrost.h" +#include "valhall_enums.h" #ifdef __cplusplus extern "C" { @@ -473,9 +474,11 @@ typedef struct { bool format; /* LEA_TEX */ struct { - enum bi_special special; /* FADD_RSCALE, FMA_RSCALE */ - enum bi_round round; /* FMA, converts, FADD, _RSCALE, etc */ - bool ftz; /* Flush-to-zero for F16_TO_F32 */ + enum bi_special special; /* FADD_RSCALE, FMA_RSCALE */ + enum bi_round round; /* FMA, converts, FADD, _RSCALE, etc */ + bool ftz; /* Flush-to-zero for F16_TO_F32 and FLUSH */ + enum va_nan_mode nan_mode; /* NaN flush mode, for FLUSH */ + bool flush_inf; /* Flush infinity to finite, for FLUSH */ }; struct { diff --git a/src/panfrost/compiler/valhall/ISA.xml b/src/panfrost/compiler/valhall/ISA.xml index 5bdecf2a8cd..18e23d02493 100644 --- a/src/panfrost/compiler/valhall/ISA.xml +++ b/src/panfrost/compiler/valhall/ISA.xml @@ -778,6 +778,16 @@ aor1 + + + Flush specific NaN values in FLUSH.f32 and FLUSH.v2f16. flush_nan flushes + all NaN values to zero. quiet_nan flushes signaling NaNs to quiet NaNs. + + none + flush_nan + quiet_nan + +