---
title: "prefetchStorage(with:imageDescriptorList:)"
framework: metalperformanceshaders
role: symbol
role_heading: Type Method
path: "metalperformanceshaders/mpstemporaryimage/prefetchstorage(with:imagedescriptorlist:)"
---

# prefetchStorage(with:imageDescriptorList:)

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

## Declaration

```swift
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

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.
