<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLArgumentDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLArgumentDescriptor"
  },
  "title" : "MTLArgumentDescriptor"
}
-->

# MTLArgumentDescriptor

A representation of an argument within an argument buffer.

```
class MTLArgumentDescriptor
```

## 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`](/documentation/Metal/MTLArgumentDescriptor) instances. You can then use this array to create an [`MTLArgumentEncoder`](/documentation/Metal/MTLArgumentEncoder) instance by calling the [`makeArgumentEncoder(arguments:)`](/documentation/Metal/MTLDevice/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:)`](/documentation/Metal/MTLFunction/makeArgumentEncoder(bufferIndex:)) method and create an [`MTLArgumentEncoder`](/documentation/Metal/MTLArgumentEncoder) instance.

## Topics

### Initializing an argument descriptor

[`argumentDescriptor`](/documentation/Metal/MTLArgumentDescriptor/argumentDescriptor)

Creates an empty argument descriptor.

### Setting the descriptor’s properties

[`dataType`](/documentation/Metal/MTLArgumentDescriptor/dataType)

The data type of the argument.

[`index`](/documentation/Metal/MTLArgumentDescriptor/index)

The index ID of the argument.

[`access`](/documentation/Metal/MTLArgumentDescriptor/access)

The access permissions of the argument.

[`arrayLength`](/documentation/Metal/MTLArgumentDescriptor/arrayLength)

The length of an array argument.

[`constantBlockAlignment`](/documentation/Metal/MTLArgumentDescriptor/constantBlockAlignment)

The alignment of the constant block.

[`textureType`](/documentation/Metal/MTLArgumentDescriptor/textureType)

The texture type of a texture argument.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)