Buffers
Create and manage untyped data your app uses to exchange information with its shader functions.
Overview
Each MTLBuffer instance represents a general purpose, typeless memory allocation that your app uses to send and retrieve data from a shader. Your app decides how to use and interpret the buffer’s underlying bytes.
You create buffers from either an MTLDevice or MTLHeap instance.
Buffers inherently support the MTLResource protocol’s properties and methods, including storageMode, which controls how the GPU handles its memory (see Resource fundamentals).
Topics
General purpose buffers
Argument buffers
Improving CPU performance by using argument buffersManaging groups of resources with argument buffersTracking the resource residency of argument buffersIndexing argument buffersRendering terrain dynamically with argument buffersEncoding argument buffers on the GPUUsing argument buffers with resource heapsMTLArgumentDescriptorMTLArgumentEncoderMTLAttributeStrideStatic