GPU Resources

Store and manage your app's data in GPU-accessible containers.



Setting Resource Storage Modes

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

protocol MTLResource

A memory allocation for storing specialized data that is accessible to the GPU.


Basic Buffers

Demonstrates how to manage hundreds of vertices with a vertex buffer.

protocol MTLBuffer

A memory allocation for storing unformatted data that is accessible to the GPU.

class MTLPipelineBufferDescriptor

An object that contains the mutability options for buffers used in a render or compute pass.


Basic Texturing

Demonstrates how to load image data and texture a quad.

protocol MTLTexture

A memory allocation for storing formatted image data that is accessible to the GPU.

class MTLTextureDescriptor

An object that configures new MTLTexture objects.

enum MTLPixelFormat

The data formats that describe the organization and characteristics of individual pixels in a texture.

MetalKit Texture Loader

Load textures into your Metal app from a variety of sources.

About Color-Renderable Pixel Format Sizes

Know the size limits of pixel formats used by color render targets in iOS and tvOS GPUs.


protocol MTLSamplerState

An object that defines the sampling behavior for a texture within a graphics or compute function.

class MTLSamplerDescriptor

An object that configures new MTLSamplerState objects.

Resource Heaps

Image Filter Graph with Heaps and Fences

Demonstrates how to use heaps and fences to optimize a multistage image filter.

protocol MTLHeap

An abstract memory pool from which you can create resources.

class MTLHeapDescriptor

An object that configures new MTLHeap objects.

protocol MTLFence

An object that can capture, track, and manage resource dependencies across command encoders.

struct MTLSizeAndAlign

The size and alignment of a resource, in bytes, typically used when creating a heap.

Argument Buffers

Argument Buffers

Learn how to use argument buffers.

Dynamic Terrain with Argument Buffers

Demonstrates how to use argument buffers to render a dynamic terrain in real time with a GPU-driven pipeline.

Understanding Argument Buffers

Improve your app's performance by grouping your resources into an argument buffer.

Indexing Argument Buffers

Assign resource indices within an argument buffer.

Tracking the Resource Residency of Argument Buffers

Optimize resource performance within an argument buffer.

protocol MTLArgumentEncoder

An encoder that specifies resources for an argument buffer.

class MTLArgumentDescriptor

A representation of an argument within an argument buffer.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software