<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLSizeAndAlign",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@SA@MTLSizeAndAlign"
  },
  "title" : "MTLSizeAndAlign"
}
-->

# MTLSizeAndAlign

The size and alignment of a resource, in bytes.

```
struct MTLSizeAndAlign
```

## Topics

### Accessing the size and alignment

[`size`](/documentation/Metal/MTLSizeAndAlign/size)

The size of a resource, in bytes.

[`align`](/documentation/Metal/MTLSizeAndAlign/align)

The alignment of a resource, in bytes.

### Creating instances

[`init()`](/documentation/Metal/MTLSizeAndAlign/init())

Creates a default instance.

[`init(size:align:)`](/documentation/Metal/MTLSizeAndAlign/init(size:align:))

Creates a new instance initialized to the given values.



---

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)