Contents

update(_:)

Encodes a command that instructs the GPU to update a fence, which signals passes waiting on the fence.

Declaration

func update(_ fence: any MTLFence)
optional func update(_ fence: any MTLFence)

Parameters

Discussion

Fences maintain order to prevent GPU data hazards as the GPU runs various passes within the same command queue. This encoded command notifies any passes waiting for fence.

The GPU driver evaluates the fences that apply to the pass and the commands that depend on those fences when your app commits the enclosing MTLCommandBuffer.

See Also

Performing fence operations