Structure

MTLBarrierScope

Describes the types of resources that a barrier operates on.

Declaration

struct MTLBarrierScope

Topics

Type Properties

static var buffers: MTLBarrierScope

The barrier affects any buffer objects.

static var renderTargets: MTLBarrierScope

The barrier affects any render targets.

static var textures: MTLBarrierScope

The barrier affects textures.

Relationships

Conforms To

See Also

Synchronizing Command Execution for Untracked Resources

func updateFence(MTLFence, after: MTLRenderStages)

Updates the given fence to capture all GPU work enqueued by the command encoder up to the given render stage.

Required.

func waitForFence(MTLFence, before: MTLRenderStages)

Prevents further GPU work to be enqueued by the command encoder until the given fence is reached for the given render stage.

Required.

func memoryBarrier(scope: MTLBarrierScope, after: MTLRenderStages, before: MTLRenderStages)

Encodes a barrier so that data written to memory by commands encoded before the barrier is available to commands encoded after the barrier.

Required.

struct MTLRenderStages

The render stages at which a synchronization command is triggered.

func textureBarrier()

Ensures that any texture reads issued after the barrier can safely read from any rendering to those textures performed before the barrier.

Required.

Deprecated