<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSTemporaryImage/prefetchStorage(with:imageDescriptorList:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSTemporaryImage(cm)prefetchStorageWithCommandBuffer:imageDescriptorList:"
  },
  "title" : "prefetchStorage(with:imageDescriptorList:)"
}
-->

# prefetchStorage(with:imageDescriptorList:)

A method that helps the framework decide which allocations to make ahead of time.

```
class func prefetchStorage(with commandBuffer: any MTLCommandBuffer, imageDescriptorList descriptorList: [MPSImageDescriptor])
```

## Parameters

`commandBuffer`

The command buffer on which the temporary images will be exclusively used.

`descriptorList`

An array of image descriptors that describe the temporary images that will be created.

## Discussion

The texture cache that underlies the temporary images can automatically allocate new storage as needed, whenever you create new temporary images. However, sometimes a more global view of what you plan to make is useful for maximizing memory reuse to get the most efficient operation. Calling this class method provides a hint to the texture cache about what the list of temporary images will be.

> Note:
> Calling this method is purely a performance and memory optimization; it is never *necessary* to call this method.

---

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)