Commit Graph

3 Commits

Author SHA1 Message Date
Bill Hollings
ec054dad7f MSL: Support synthetic functions in function constants.
Emit synthetic functions before function constants.
Support use of spvQuantizeToF16() in function constants for numerical
behavior consistency with the op code.
Ensure subnormal results from OpQuantizeToF16 are flushed to zero per SPIR-V spec.

Adjust SPIRV-Cross unit test reference shaders to accommodate these changes.
Any MSL reference shader that inclues a synthetic function is affected,
since the location it is emitted has changed.
2021-09-28 19:10:16 -04:00
Bill Hollings
fb3defc9ef MSL: Honor DecorationNoContraction when compiling using fast-math.
Add [[clang::optnone]] attribute to spvF*() functions used for handling
floating point operations decorated with DecorationNoContraction.

Just using precise::fma() did not work.

Adjust SPIRV-Cross unit test reference shaders to accommodate these changes.
2021-09-23 14:37:08 -04:00
Lukas Hermanns
ffbd801853 Added '--msl-invariant-float-math' option and new test case for it. 2019-10-09 14:03:06 -04:00