---
title: Argument buffer resource preparation commands
framework: metal
role: collectionGroup
role_heading: API Collection
path: metal/argument-buffer-resource-preparation-commands
---

# Argument buffer resource preparation commands

Load individual resources and multiple resources within a heap into GPU memory so that they’re available to shaders through argument buffers.

## Overview

Overview These methods encode commands that load resources into GPU memory, making them accessible to your shaders through argument buffers. To load an individual resource, call the useResource(_:usage:stages:) method, or another resource-based method. Alternatively, you can load all the resources within a heap by calling the useHeap(_:stages:) method or another heap-based method. important: The heap-based methods don’t provide a usage parameter (see MTLResourceUsage) and set the usage for the resources within each heap to read. To give shaders write or read/write access to specific resources within a heap, call a resource-based method after the heap-based method. Metal combines usage modes you set for a resource through both heap and resource methods. For more information, see Improving CPU performance by using argument buffers.

## Topics

### Loading individual resources for argument buffers

- [useResource(_:usage:stages:)](metal/mtlrendercommandencoder/useresource(_:usage:stages:).md)
- [useResources(_:usage:stages:)](metal/mtlrendercommandencoder/useresources(_:usage:stages:).md)

### Loading heaps and the resources they contain for argument buffers

- [useHeap(_:stages:)](metal/mtlrendercommandencoder/useheap(_:stages:).md)
- [useHeaps(_:stages:)](metal/mtlrendercommandencoder/useheaps(_:stages:).md)

## See Also

### Resource preparation commands

- [Mesh and object shader resource preparation commands](metal/mesh-and-object-shader-resource-preparation-commands.md)
- [Vertex shader resource preparation commands](metal/vertex-shader-resource-preparation-commands.md)
- [Fragment shader resource preparation commands](metal/fragment-shader-resource-preparation-commands.md)
- [Tile shaders resource preparation commands](metal/tile-shaders-resource-preparation-commands.md)
