You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an isnormal function to HLSL with 16 bit and 32 bit float overloads.
Targeting DirectX:
The 32 bit overload uses the IsNormal DXIL Op
In SM6.8 and earlier the 16 bit overload is emulated using LLVM IR
In SM6.9 and later the 16 bit overload uses the IsNormal DXIL Op
Adds unit tests showing the correct IR/DXIL Op is generated for each
float size and SM.
Targeting SPIRV:
OpIsNormal requires the kernel capability, so it cannot be used;
therefore, the isnormal op is emulated.
IsNormal = !(Nan || Inf || Zero || Subnormal)
In the bit pattern of a 16 bit or 32 bit float; a normal number
corresponds to one whose exponent bits are neither all zeros nor all
ones. The emulation code checks that the exponent bits are neither all
zeroes nor all ones.
Adds unit tests showing isnormal is emulated.
Closesmicrosoft#7648
0 commit comments