MTLLibrary
A collection of Metal shader functions.
Declaration
protocol MTLLibrary : NSObjectProtocol, SendableMentioned in
Overview
An MTLLibrary instance contains Metal shading language source code compiled during an app’s build process or at runtime from a text string.
Don’t implement this protocol yourself; instead, use the library creation methods provided by the MTLDevice protocol. To create an MTLLibrary from a precompiled Metal library binary, call one of these MTLDevice methods:
To create an MTLLibrary by compiling source code at runtime, call one of these MTLDevice methods:
Topics
Querying basic library attributes
Querying library contents
Creating shader function instances
makeFunction(name:)makeFunction(name:constantValues:completionHandler:)makeFunction(name:constantValues:)makeFunction(descriptor:completionHandler:)makeFunction(descriptor:)