Instance Method

makeComputePipelineState(function:options:reflection:)

Synchronously creates a new compute pipeline state object, and associated reflection information, using a function object.

Required.

Declaration

func makeComputePipelineState(function computeFunction: MTLFunction, options: MTLPipelineOption, reflection: AutoreleasingUnsafeMutablePointer<MTLAutoreleasedComputePipelineReflection?>?) throws -> MTLComputePipelineState

Parameters

function

A function object to be compiled into a compute pipeline state object.

options

The type of reflection information that should be returned.

reflection

Reflection data about the compute function, including details about function arguments.

error

An error object that describes the problem, or nil if the operation succeeded.

Return Value

A new object that can be used as a compute pipeline state.

Discussion

To use the compute pipeline state for a compute pass, call the setComputePipelineState(_:) method of a MTLComputeCommandEncoder object with the MTLComputePipelineState object.

Topics

Pipeline Options

struct MTLPipelineOption

The compilation options that determine which argument information to provide.

See Also

Creating a Compute Pipeline

func makeComputePipelineState(descriptor: MTLComputePipelineDescriptor, options: MTLPipelineOption, completionHandler: MTLNewComputePipelineStateWithReflectionCompletionHandler)

Asynchronously creates a compute pipeline state object, and associated reflection information, using a compute pipeline descriptor.

Required.

func makeComputePipelineState(function: MTLFunction, completionHandler: MTLNewComputePipelineStateCompletionHandler)

Asynchronously creates a new compute pipeline state object using a function object.

Required.

func makeComputePipelineState(function: MTLFunction, options: MTLPipelineOption, completionHandler: MTLNewComputePipelineStateWithReflectionCompletionHandler)

Asynchronously creates a new compute pipeline state object, and associated reflection information, using a function object.

Required.

func makeComputePipelineState(function: MTLFunction) -> MTLComputePipelineState

Synchronously creates a new compute pipeline state object using a function object.

Required.