Protocol

MTLEvent

A nonshareable event used to specify synchronization points within a single Metal device object.

Declaration

@protocol MTLEvent

Overview

Don’t implement this protocol yourself; instead, to create a MTLEvent object, call the newEvent method of a MTLDevice object.

Topics

Identifying the Event

device

The device object that created the event.

Required.

label

A string that identifies the event.

Required.

Synchronizing a Nonshareable Event

- encodeSignalEvent:value:

Encodes a command that signals the given event with the given value.

Required.

- encodeWaitForEvent:value:

Encodes a command that blocks the execution of the command buffer until the given event reaches the given value.

Required.

Relationships

Inherits From

Inherited By

See Also

Events

Image Filter Graph with Heaps and Events

Demonstrates how to use heaps and events to optimize a multistage image filter.

Synchronizing Events Within a Single Device

Use nonshareable events to synchronize your app’s work within a single device.