makeFunction(descriptor:)
Synchronously creates an object representing a shader function, using the specified descriptor.
Declaration
func makeFunction(descriptor: MTLFunctionDescriptor) throws -> any MTLFunctionParameters
- descriptor:
The description of the function object to create.
Return Value
A new MTLFunction instance if the method finds the function in the library; otherwise Swift throws an error and Objective-C returns nil.