An object that can capture, track, and manage resource dependencies across command encoders.
- iOS 10.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 10.0+
MTLFence object is typically used to track a sub-allocated resource created from a
MTLHeap object. However, it can also track a non-heap resource that specifies a
MTLResource resource option.
Don’t implement this protocol yourself; instead, to create a
MTLFence object, call the
new method of a
MTLDevice object. A command encoder can either update a fence or wait for a fence. Refer to the methods listed in the following table for further information.