---
title: "functionHandle(withName:stage:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlrenderpipelinestate/functionhandle(withname:stage:)"
---

# functionHandle(withName:stage:)

Obtains a function handle for the a specific function this pipeline links at the Metal IR level.

## Declaration

```swift
func functionHandle(withName name: String, stage: MTLRenderStages) -> (any MTLFunctionHandle)?
```

## Parameters

- `name`: A string containing the name of the function.
- `stage`: The shader stage that uses the function.

## Return Value

Return Value A function handle representing the function if present, otherwise nil.
