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

# MTLAttribute

An object that describes an attribute defined in the stage-in argument for a shader.

```
class MTLAttribute
```

## Topics

### Reading an attribute’s properties

[`name`](/documentation/Metal/MTLAttribute/name)

The name of the attribute.

[`attributeIndex`](/documentation/Metal/MTLAttribute/attributeIndex)

The index of the attribute, as declared in Metal shader source code.

[`attributeType`](/documentation/Metal/MTLAttribute/attributeType)

The data type for the attribute, as declared in Metal shader source code.

[`active`](/documentation/Metal/MTLAttribute/isActive)

A Boolean value that indicates whether the attribute is active.

[`patchControlPointData`](/documentation/Metal/MTLAttribute/isPatchControlPointData)

A Boolean value that indicates whether the attribute represents control point data.

[`patchData`](/documentation/Metal/MTLAttribute/isPatchData)

A Boolean value that indicates whether the attribute represents tessellation patch data.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)