Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Metal::Fence Class Referencefinal

#include <Fence.h>

Public Member Functions

 AZ_CLASS_ALLOCATOR (Fence, AZ::SystemAllocator)
RHI::ResultCode Init (RHI::Ptr< Device > metalDevice, RHI::FenceState initialState)
void Shutdown ()
uint64_t Increment ()
void SignalFromCpu ()
void SignalFromCpu (uint64_t fenceValueToSignal)
void SignalFromGpu (id< MTLCommandBuffer > commandBufferToSignalFrom) const
void SignalFromGpu (id< MTLCommandBuffer > commandBufferToSignalFrom, uint64_t fenceValueToSignal) const
void WaitOnCpu () const
void WaitOnCpu (uint64_t fenceValue) const
void WaitOnGpu (id< MTLCommandBuffer > waitingCommandBuffer) const
void WaitOnGpu (id< MTLCommandBuffer > waitingCommandBuffer, uint64_t fenceValueToWaitFor) const
uint64_t GetPendingValue () const
uint64_t GetCompletedValue () const
RHI::FenceState GetFenceState () const
id< MTLSharedEvent > Get () const

Detailed Description

A simple wrapper around MTLSharedEvent that also includes a monotonically increasing fence value.

The documentation for this class was generated from the following file: