Contents

makeFunction(descriptor:)

Synchronously creates an object representing a shader function, using the specified descriptor.

Declaration

func makeFunction(descriptor: MTLFunctionDescriptor) throws -> any MTLFunction

Parameters

  • 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.

See Also

Creating shader function instances