Buffers

Create and manipulate unstructured GPU resources.

Topics

Buffers

MTLBuffer

A resource that stores data in a format defined by your app.

Argument Buffers

Group resources that are used together into an argument buffer.

About Argument Buffers

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

Basic Argument Buffers

Demonstrates how to manage groups of resources with an argument buffer.

Argument Buffers with Arrays and Resource Heaps

Demonstrates how to define an argument buffer with arrays and reduce CPU overhead by combining argument buffers with resource heaps.

Argument Buffers with GPU Encoding

Demonstrates how to encode an argument buffer with a compute pass and then access its arguments in a subsequent render pass.

Dynamic Terrain with Argument Buffers

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

Indexing Argument Buffers

Assign resource indices within an argument buffer.

Tracking the Resource Residency of Argument Buffers

Optimize resource performance within an argument buffer.

MTLArgumentDescriptor

A representation of an argument within an argument buffer.

MTLArgumentEncoder

An object used to encode data into an argument buffer.

See Also

Resources

Setting Resource Storage Modes

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

Copying Data to a Private Resource

Use a blit command encoder to copy buffer or texture data to a private resource.

Synchronizing a Managed Resource

Synchronize the contents of a managed resource for the CPU or GPU.

Transferring Data Between Connected GPUs

Use high-speed connections between GPUs to transfer data quickly.

Reducing the Memory Footprint of Metal Apps

Learn best practices for using memory efficiently in iOS and tvOS.

MTLResource

An allocation of memory that is accessible to a GPU.

MTLBlitCommandEncoder

An encoder that encodes memory copying, filtering, and fill commands.

MTLResourceStateCommandEncoder

An encoder that encodes commands that modify resource configurations.

Textures

Create and manipulate structured GPU resources.

Indirect Command Buffers

Recoup encoding time by reusing commands, or create a GPU-driven rendering pipeline by generating commands on the GPU.

Heaps

Create a single allocation of memory from which you can suballocate resources.

Synchronization

Manage access to resources in your app to avoid data hazards.