---
title: index
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlargument/index
---

# index

The index in the argument table that corresponds to the function argument.

## Declaration

```swift
var index: Int { get }
```

## Discussion

Discussion A command encoder (MTLComputeCommandEncoder or MTLRenderCommandEncoder) specifies the index in the corresponding argument table. For example, an app can call the setTexture(_:index:) method of MTLComputeCommandEncoder to specify an index in the texture argument table for an MTLTexture instance that is used as an argument of a compute function.

## See Also

### Describing the argument

- [name](metal/mtlargument/name.md)
- [isActive](metal/mtlargument/isactive.md)
- [type](metal/mtlargument/type.md)
- [access](metal/mtlargument/access.md)
