---
title: MTLArgumentDescriptor
framework: metal
role: symbol
role_heading: Class
path: metal/mtlargumentdescriptor
---

# MTLArgumentDescriptor

A representation of an argument within an argument buffer.

## Declaration

```swift
class MTLArgumentDescriptor
```

## Overview

Overview This descriptor can represent arguments within flat structures only. It can represent arrays of allowed argument buffer data types, but it cannot represent arguments within nested structures. Argument buffers with simple, flat structures can be represented by an array of MTLArgumentDescriptor instances. You can then use this array to create an MTLArgumentEncoder instance by calling the makeArgumentEncoder(arguments:) method. Argument buffers with complex, nested structures need to define their structure in Metal shading language code, which can then be directly assigned to a specific buffer index of a function. You can then use this buffer index to call the makeArgumentEncoder(bufferIndex:) method and create an MTLArgumentEncoder instance.

## Topics

### Setting the descriptor’s properties

- [dataType](metal/mtlargumentdescriptor/datatype.md)
- [index](metal/mtlargumentdescriptor/index.md)
- [access](metal/mtlargumentdescriptor/access.md)
- [arrayLength](metal/mtlargumentdescriptor/arraylength.md)
- [constantBlockAlignment](metal/mtlargumentdescriptor/constantblockalignment.md)
- [textureType](metal/mtlargumentdescriptor/texturetype.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Argument buffers

- [Improving CPU performance by using argument buffers](metal/improving-cpu-performance-by-using-argument-buffers.md)
- [Managing groups of resources with argument buffers](metal/managing-groups-of-resources-with-argument-buffers.md)
- [Tracking the resource residency of argument buffers](metal/tracking-the-resource-residency-of-argument-buffers.md)
- [Indexing argument buffers](metal/indexing-argument-buffers.md)
- [Rendering terrain dynamically with argument buffers](metal/rendering-terrain-dynamically-with-argument-buffers.md)
- [Encoding argument buffers on the GPU](metal/encoding-argument-buffers-on-the-gpu.md)
- [Using argument buffers with resource heaps](metal/using-argument-buffers-with-resource-heaps.md)
- [MTLArgumentEncoder](metal/mtlargumentencoder.md)
- [MTLAttributeStrideStatic](metal/mtlattributestridestatic.md)
