---
title: Setting resource storage modes
framework: metal
role: article
role_heading: Article
path: metal/setting-resource-storage-modes
---

# Setting resource storage modes

Set a storage mode that defines the memory location and access permissions of a resource.

## Overview

Overview Storage modes are only set when creating an instance, and the system default allows for access to memory from both the CPU and GPU. Metal selects the default mode for resources depending on hardware. For Apple silicon GPUs the default is MTLStorageMode.shared. For Intel-based Mac computers, the default is MTLStorageMode.managed for all MTLTexture instances and MTLBuffer instances attached to discrete GPUs. MTLBuffer instances using the integrated GPU have MTLStorageMode.shared as their default. important: Use the system default if your data is available to both the CPU and GPU. When you manually select shared or managed mode, your app may not run on some hardware. You perform the same synchronization tasks to ensure GPU and CPU memory coherency in both default modes. To check for GPU architecture and capabilities, use the supportsFamily(_:) method instead of the storageMode property. See Detecting GPU features and Metal software versions for more information. Use MTLStorageMode.memoryless, only available on Apple silicon, when you manage your own storage, or want to run a GPU task that requires temporary resources. For tasks that share memory on the GPU, use MTLStorageMode.private storage. This article includes examples of how to set the storage mode for a buffer or texture. For more guidance on which mode to choose, see Choosing a resource storage mode for Apple GPUs and Choosing a resource storage mode for Intel and AMD GPUs. Set a storage mode for a buffer Create a new MTLBuffer with the makeBuffer(length:options:) method and set its storage mode in the method’s options parameter. note: The storage mode options in MTLResourceOptions are equivalent to the storage mode values in MTLStorageMode. When you create a new buffer, you can combine multiple resource options but you can set only one storage mode. Set a storage mode for a texture Create a new MTLTextureDescriptor and set its storage mode in the descriptor’s storageMode property. Then create a new MTLTexture with the makeTexture(descriptor:) method.

## See Also

### Resource management

- [Choosing a resource storage mode for Apple GPUs](metal/choosing-a-resource-storage-mode-for-apple-gpus.md)
- [Choosing a resource storage mode for Intel and AMD GPUs](metal/choosing-a-resource-storage-mode-for-intel-and-amd-gpus.md)
- [Copying data to a private resource](metal/copying-data-to-a-private-resource.md)
- [Synchronizing a managed resource in macOS](metal/synchronizing-a-managed-resource-in-macos.md)
- [Transferring data between connected GPUs](metal/transferring-data-between-connected-gpus.md)
- [Reducing the memory footprint of Metal apps](metal/reducing-the-memory-footprint-of-metal-apps.md)
