Compilation settings for a Metal shader library.
- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
MTLCompile object to specify how a new Metal shader library should be compiled. If you want to set the following options, use standard allocation and initialization techniques to create a
MTLCompile object and then set any or all of these properties:
To allow the compiler to perform optimizations for floating-point arithmetic that may violate the IEEE 754 standard, set
To target previous OS releases, set
languageto a supported Metal shading language version.
preprocessorto a list of preprocessor macros to be considered when compiling this code.
MTLCompile object is used with either the
new method of
MTLDevice to compile shading language functions into a new library.