Class

MTLPipelineBufferDescriptor

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

Declaration

class MTLPipelineBufferDescriptor : NSObject

Overview

The Metal driver may perform certain optimizations if you specify that neither the CPU nor the GPU will modify a buffer's contents between the time the buffer is set in a function's argument table and the time its associated command buffer completes execution. These types of read-only buffers are considered immutable, and you and can define them by setting the mutability property of their associated MTLPipelineBufferDescriptor object to MTLMutability.immutable. Use immutable buffers as much as possible, for either regular buffers or argument buffers.

Topics

Specifying Buffer Mutability

var mutability: MTLMutability

A mutability option that determines whether a buffer's contents can be modified.

enum MTLMutability

The options that determine the mutability of a buffer's contents.

Relationships

Inherits From

See Also

Specifying the Compute Function and Associated Data

var computeFunction: MTLFunction?

The compute function to be compiled into the pipeline state object.

var threadGroupSizeIsMultipleOfThreadExecutionWidth: Bool

A Boolean that indicates whether the threadgroup size must always be a multiple of the thread execution width.

var maxTotalThreadsPerThreadgroup: Int

The maximum number of threads allowed for a threadgroup dispatched to the compute function.

var stageInputDescriptor: MTLStageInputOutputDescriptor?

The organization of input and output data for the compute function.

var buffers: MTLPipelineBufferDescriptorArray

The buffer mutability options for a compute pipeline's kernel function.

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