---
title: "setArgumentTable(_:stages:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4rendercommandencoder/setargumenttable(_:stages:)"
---

# setArgumentTable(_:stages:)

Associates an argument table with a set of render stages.

## Declaration

```swift
func setArgumentTable(_ argumentTable: (any MTL4ArgumentTable)?, stages: MTLRenderStages)
```

## Parameters

- `argumentTable`: doc://com.apple.metal/documentation/Metal/MTL4ArgumentTable to set.
- `stages`: A doc://com.apple.metal/documentation/Metal/MTLRenderStages bitmask that specifies the shader stages with visibility over the table.

## Discussion

Discussion Metal takes a snapshot of the resources in the argument table when you encode a draw, dispatch, or execute command. This snapshot becomes available to the stages you specify to this method.
