---
title: MTLFunctionOptions
framework: metal
role: symbol
role_heading: Structure
path: metal/mtlfunctionoptions
---

# MTLFunctionOptions

Options that define how Metal compiles a GPU function.

## Declaration

```swift
struct MTLFunctionOptions
```

## Topics

### Function compilation options

- [failOnBinaryArchiveMiss](metal/mtlfunctionoptions/failonbinaryarchivemiss.md)
- [compileToBinary](metal/mtlfunctionoptions/compiletobinary.md)
- [pipelineIndependent](metal/mtlfunctionoptions/pipelineindependent.md)
- [storeFunctionInMetalPipelinesScript](metal/mtlfunctionoptions/storefunctioninmetalpipelinesscript.md)
- [storeFunctionInMetalScript](metal/mtlfunctionoptions/storefunctioninmetalscript.md)

### Swift support

- [init(rawValue:)](metal/mtlfunctionoptions/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Identifying shader functions

- [device](metal/mtlfunction/device.md)
- [label](metal/mtlfunction/label.md)
- [functionType](metal/mtlfunction/functiontype.md)
- [name](metal/mtlfunction/name.md)
- [MTLFunctionType](metal/mtlfunctiontype.md)
- [options](metal/mtlfunction/options.md)
