Instance Method

memoryBarrierWithScope:afterStages:beforeStages:

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

Required.

Declaration

- (void)memoryBarrierWithScope:(MTLBarrierScope)scope afterStages:(MTLRenderStages)after beforeStages:(MTLRenderStages)before;

Parameters

scope

The kinds of resources that must be synchronized by the barrier.

after

The render stage when resource writes must be barriered. Data written before or during this stage are affected by the barrier.

before

The render stage when resource reads must be barriered. Data read during or after this stage is barriered.

See Also

Synchronizing Command Execution for Untracked Resources

- updateFence:afterStages:

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

Required.

- waitForFence:beforeStages:

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

Required.

MTLRenderStages

The render stages at which a synchronization command is triggered.

MTLBarrierScope

Describes the types of resources that a barrier operates on.

- 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