<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLFunctionDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLFunctionDescriptor"
  },
  "title" : "MTLFunctionDescriptor"
}
-->

# MTLFunctionDescriptor

A description of a function object to create.

```
class MTLFunctionDescriptor
```

## Topics

### Creating a function descriptor

[`functionDescriptor`](/documentation/Metal/MTLFunctionDescriptor/functionDescriptor)

Creates a default function descriptor.

### Specifying the function configuration

[`name`](/documentation/Metal/MTLFunctionDescriptor/name)

The name of the function to fetch from the library.

[`specializedName`](/documentation/Metal/MTLFunctionDescriptor/specializedName)

A new name for the created function object.

[`constantValues`](/documentation/Metal/MTLFunctionDescriptor/constantValues)

The set of constant values assigned to the function constants.

[`options`](/documentation/Metal/MTLFunctionDescriptor/options)

Flags specifying how Metal should create the new function object.

[`binaryArchives`](/documentation/Metal/MTLFunctionDescriptor/binaryArchives)

The binary archives to search for a previously-compiled version of this function.

[`MTLFunctionOptions`](/documentation/Metal/MTLFunctionOptions)

Options that define how Metal compiles a GPU function.

[`MTLLinkedFunctions`](/documentation/Metal/MTLLinkedFunctions)

A set of related functions that Metal links to when necessary to create the function instance.

## See Also

[`makeFunction(descriptor:completionHandler:)`](/documentation/Metal/MTLLibrary/makeFunction(descriptor:completionHandler:))

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

[`makeFunction(descriptor:)`](/documentation/Metal/MTLLibrary/makeFunction(descriptor:))

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



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)