27af716c3a
This roughly matches their semantics in SPIR-V and MSL. For `FMin`, `FMax`, and `FClamp`, and the Metal functions `fast::min()`, `fast::max()`, and `fast::clamp()`, the result is undefined if any operand is NaN. For the 'N' operations and their corresponding MSL `precise::` functions, the result is consistent with IEEE 754 (first non-NaN wins; result is NaN if all operands are NaN). We can only do this with 32-bit floats, though, because Metal only provides these variants for `float`. `half` only has one variant of these functions that is presumably consistent with IEEE 754. I guess that's OK; the SPIR-V spec only says that `F{Min,Max,Clamp}` are undefined for NaNs. Performance might suffer, though. |
||
---|---|---|
.. | ||
opt | ||
shaders | ||
shaders-hlsl | ||
shaders-hlsl-no-opt | ||
shaders-msl | ||
shaders-msl-no-opt | ||
shaders-no-opt | ||
shaders-reflection |