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

# MTLStructType

A description of a structure.

```
class MTLStructType
```

## Overview

[`MTLStructType`](/documentation/Metal/MTLStructType) is part of the reflection API that allows Metal framework code to query details of a struct that is passed as an argument of a Metal shading language function. Don’t create [`MTLStructType`](/documentation/Metal/MTLStructType) instances directly; instead query the [`bufferStructType`](/documentation/Metal/MTLArgument/bufferStructType) property of an [`MTLArgument`](/documentation/Metal/MTLArgument) instance, or call the [`structType()`](/documentation/Metal/MTLStructMember/structType()) method for an [`MTLStructMember`](/documentation/Metal/MTLStructMember) instance. To examine the details of the struct, you can recursively drill down the [`members`](/documentation/Metal/MTLStructType/members) property of the [`MTLStructType`](/documentation/Metal/MTLStructType) instance, which contains details about struct members, each of which is represented by an [`MTLStructMember`](/documentation/Metal/MTLStructMember) instance.

## Topics

### Obtaining information about struct members

[`members`](/documentation/Metal/MTLStructType/members)

An array of instances that describe the fields in the struct.

[`memberByName(_:)`](/documentation/Metal/MTLStructType/memberByName(_:))

Provides a representation of a struct member.



---

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)