Render Pipelines

Specify how graphics primitives should be rendered.


A rendering pipeline consists of custom functions you provide to process graphics commands on the GPU. The order that functions are executed in a render pipeline is defined by Metal, but you supply the function implementations. Set up pipeline objects ahead of time (typically, at initialization) because pipelines are expensive to create, but quick to reuse.


Creating Render Pipeline State Objects


An argument of options you pass to a device to get a render pipeline state object.


An object that configures new render pipeline state objects for tile shading.


An object that contains the graphics functions and configuration state used in a render pass.

Creating Depth and Stencil Objects


An object that configures new MTLDepthStencilState objects.


An object that defines the front-facing or back-facing stencil operations of a depth and stencil state object.


A depth and stencil state object that specifies the depth and stencil configuration and operations used in a render pass.

Viewing Pipeline Statistics

Optimizing Performance with Pipeline Statistics

Decide how to tune your encoder performance by identifying your app's longest-running encoders and their primary GPU activity.

Optimizing Performance with GPU Counters

Examine granular metrics for your rendering or compute calls, and tune your app as needed.

See Also


Creating and Sampling Textures

Load image data into a texture and apply it to a quadrangle.

Calculating Primitive Visibility Using Depth Testing

Determine which pixels are visible in a scene by using a depth texture.

Customizing Render Pass Setup

Render into an offscreen texture by creating a custom render pass.

Generating Multiple Output Vertex Streams from One Input Stream

Render efficiently to multiple layers or viewports.


A group of render targets that hold the results of a render pass.


The object to use for encoding commands for a render pass.


An object that splits up a single render pass so that it can be simultaneously encoded from multiple threads.

Model I/O

Specify precise locations within the textures associated with graphics processing.