<!--
{
  "documentType" : "article",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/choosing-a-resource-storage-mode-for-intel-and-amd-gpus",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Choosing a resource storage mode for Intel and AMD GPUs"
}
-->

# Choosing a resource storage mode for Intel and AMD GPUs

Select an appropriate storage mode for your textures and buffers on AMD and Intel GPUs.

## Discussion

A Mac can have multiple GPUs, each with a unified or discrete memory model. In a *unified memory model*, the CPU and the GPU share system memory. However, CPU and GPU access to that memory depends on the storage mode you choose for your resources. In a *discrete memory model*, system memory is separate from video memory. System memory is accessible to both the CPU and the GPU, but video memory is accessible only to the GPU.

The Metal framework’s resource storage mode API works for both unified and discrete memory models, so you don’t need to write specific code for either.

### Understand the different Metal memory modes

In both memory models, a resource with an [`MTLStorageMode.shared`](/documentation/Metal/MTLStorageMode/shared) mode resides in system memory accessible to both the CPU and the GPU. Shared resources are only available on systems with integrated graphics, such as Apple silicon and integrated GPUs on Intel-based Mac computers.

![A system diagram that shows the memory location of a shared mode resource in system memory that connects to the GPU and CPU with bidirectional arrows.](images/com.apple.metal/choosing-a-resource-storage-mode-for-intel-and-amd-gpus-1@2x.png)

A resource with an [`MTLStorageMode.private`](/documentation/Metal/MTLStorageMode/private) mode is accessible only to the GPU. In a unified memory model, this resource resides in system memory. In a discrete memory model, it resides in video memory. In both memory models, Metal optimizes GPU access to private resources.

![Two system diagrams that show the memory location of private resources. The first shows a unified-memory model GPU with with a bidirectional arrow pointing to and from system memory. The second shows a discrete-memory model GPU with with a bidirectional arrow pointing to and from video memory.](images/com.apple.metal/choosing-a-resource-storage-mode-for-intel-and-amd-gpus-2@2x.png)

In a discrete memory model, Metal always attempts to store private resources in video memory. However, under certain memory constraints, Metal may evict a private resource into system memory. When you use a private resource that Metal previously evicted, Metal attempts to copy it back into video memory before you use it.

In a unified memory model, a resource with an [`MTLStorageMode.managed`](/documentation/Metal/MTLStorageMode/managed) mode resides in system memory accessible to both the CPU and the GPU.

In a discrete memory model, a managed resource exists as a synchronized pair of memory allocations. One copy of the resource resides in system memory accessible only to the CPU; the other resides in video memory accessible only to the GPU. However, you don’t manage the copies separately; Metal creates a single [`MTLResource`](/documentation/Metal/MTLResource) instance to access both.

In both memory models, Metal optimizes CPU and GPU access to managed resources. However, you need to explicitly synchronize a managed resource after modifying its contents with the CPU or the GPU. For information about synchronizing a managed resource, see [Synchronizing a managed resource in macOS](/documentation/Metal/synchronizing-a-managed-resource-in-macos).

![Two system diagrams that show the memory location of managed resources. The unified-memory model diagram at top shows a managed resource in system memory that connects to the GPU and CPU with bidirectional arrows. The discrete-memory model diagram below it shows a resource in video memory that connects to the GPU connected by a bidirectional arrow that has a synchronize symbol. The video memory connects to the system memory by a dashed bidirectional arrow. The system memory connects to the CPU by a bidirectional arrow that has a synchronize symbol.](images/com.apple.metal/choosing-a-resource-storage-mode-for-intel-and-amd-gpus-3@2x.png)

### Choose a storage mode for resources

Your storage mode should depend on the resource type and how your application uses storage accessed by Metal. Understanding the underlying memory architecture gives context and helps you investigate where you can optimize storage and synchronization. On Intel-based Mac computers, follow these guidelines:

- Prefer the default storage mode selected by Metal. Metal selects the optimal mode for the resource type and hardware.
- Use the [`MTLStorageMode.private`](/documentation/Metal/MTLStorageMode/private) mode when creating a resource that’s only accessed by the GPU. This includes temporary targets for render passes.
- To optimize for workloads initialized from CPU and then only processed on GPU, copy from a CPU-populated resource in the default storage mode to a GPU-only [`MTLResource`](/documentation/Metal/MTLResource) with [`MTLStorageMode.private`](/documentation/Metal/MTLStorageMode/private) storage. See [Copying data to a private resource](/documentation/Metal/copying-data-to-a-private-resource) for details.

You’re responsible for signaling synchronization between the CPU and GPU with managed and shared storage. Regardless of your resource size, try and keep your synchronization points as light and infrequent as possible. Batch GPU work together to help reduce frequent synchronization. See [Synchronizing a managed resource in macOS](/documentation/Metal/synchronizing-a-managed-resource-in-macos) for details.

To detect the GPU architecture and features at runtime, use the [`supportsFamily(_:)`](/documentation/Metal/MTLDevice/supportsFamily(_:)) method. See [Detecting GPU features and Metal software versions](/documentation/Metal/detecting-gpu-features-and-metal-software-versions) for more information, and the [Metal feature set tables (PDF)](https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf) for full information on hardware support in Apple devices and computers.

---

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)