<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.5.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRenderPipelineState/imageblockMemoryLength(forDimensions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLRenderPipelineState(im)imageblockMemoryLengthForDimensions:"
  },
  "title" : "imageblockMemoryLength(forDimensions:)"
}
-->

# imageblockMemoryLength(forDimensions:)

Returns the length of an imageblock’s memory for the specified imageblock dimensions.

```
func imageblockMemoryLength(forDimensions imageblockDimensions: MTLSize) -> Int
```

## Parameters

`imageblockDimensions`

An [`MTLSize`](/documentation/Metal/MTLSize) instance that represent the dimensions of an imageblock.

## Discussion

The imageblock dimensions need to match a valid tile size, such as one of the following:

- 32 x 32
- 32 x 16
- 16 x 16

The GPU partitions tile memory between imageblocks and threadgroup memory,

> Important:
> The total memory allocations for imageblocks and threadgroup memory can’t exceed the tile memory limit for the GPU device.

For information about identifying tile memory limits for GPU devices, see either of the following:

- [Metal Feature Set Tables (PDF)](https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf)
- [Metal Feature Set Tables (Numbers)](https://developer.apple.com/metal/Metal-Feature-Set-Tables.zip)

---

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)