Class

MTLRenderPassDescriptor

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

Declaration

@interface MTLRenderPassDescriptor : NSObject

Overview

A MTLRenderPassDescriptor object contains a collection of attachments that are the rendering destination for pixels generated by a rendering pass. The MTLRenderPassDescriptor class is also used to set the destination buffer for visibility information generated by a rendering pass.

Topics

Creating a Default Render Pass Descriptor

renderPassDescriptor

Creates a default render pass descriptor.

Specifying the Attachments for a Rendering Pass

colorAttachments

An array of state information for attachments that store color data.

depthAttachment

State information for an attachment that stores depth data.

stencilAttachment

State information for an attachment that stores stencil data.

Specifying the Visibility Result Buffer

visibilityResultBuffer

The destination for the GPU to write visibility information when samples pass the depth and stencil tests.

Layered Rendering

renderTargetArrayLength

The number of active layers that all attachments must have for layered rendering.

renderTargetWidth

The width, in pixels, to constain the render target to.

renderTargetHeight

The height, in pixels, to constain the render target to.

Using Programmable Sample Positions

MTLSamplePosition

A sample position on a subpixel grid.

MTLSamplePositionMake

Returns a new sample position on a subpixel grid.

setSamplePositions:count:

Sets the programmable sample positions for a render pass.

getSamplePositions:count:

Retrieves the programmable sample positions set for a render pass.

Specifying Tile Shading Parameters

imageblockSampleLength

The per-sample size, in bytes, of the largest explicit imageblock layout in the render pass.

threadgroupMemoryLength

The per-tile size, in bytes, of the persistent threadgroup memory allocation.

tileWidth

The tile width, in pixels.

tileHeight

The tile height, in pixels.

Specifying Sample Counts

defaultRasterSampleCount

The raster sample count for the render pass when no attachments are given.

Relationships

Inherits From

Conforms To