makeFunction(descriptor:completionHandler:)
Asynchronously creates an object representing a shader function, using the specified descriptor.
Declaration
func makeFunction(descriptor: MTLFunctionDescriptor, completionHandler: @escaping @Sendable ((any MTLFunction)?, (any Error)?) -> Void)func makeFunction(descriptor: MTLFunctionDescriptor) async throws -> any MTLFunctionParameters
- descriptor:
The description of the function object to create.
- completionHandler:
A Swift closure or an Objective-C block that Metal calls after it creates the function.