XII Release 0.1.0
Loading...
Searching...
No Matches
xiiGALFenceD3D12 Class Referencefinal
Inheritance diagram for xiiGALFenceD3D12:
[legend]

Public Member Functions

virtual xiiUInt64 GetCompletedValue () override final
 This returns the last completed value signaled by the GPU.
 
virtual void Signal (xiiUInt64 uiValue) override final
 This sets the fence to the specified value.
 
virtual void Wait (xiiUInt64 uiValue) override final
 This waits until the fence reaches or exceeds the specified value on the host.
 
XII_ALWAYS_INLINE ID3D12Fence * GetD3D12Fence () const
 
- Public Member Functions inherited from xiiGALFence
XII_ALWAYS_INLINE const xiiGALFenceCreationDescriptionGetDescription () const
 This returns the creation description for this object.
 
void ValidateFenceSignal (xiiUInt64 uiValue)
 Validates fence signal.
 
void ValidateDeviceWaitForFence (xiiUInt64 uiValue)
 Validates device wait for fence.
 
- Public Member Functions inherited from xiiGALDeviceObject
XII_ALWAYS_INLINE xiiSharedPtr< xiiGALDeviceGetDevice () const
 Returns the xiiGALDevice that created this resource.
 
- Public Member Functions inherited from xiiGALObject
XII_ALWAYS_INLINE xiiStringView GetDebugName () const
 Returns the debug name of this resource.
 
void SetDebugName (xiiStringView sDebugName) const
 Sets the debug name for this resource.
 
- Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 
- Public Member Functions inherited from xiiRefCounted
virtual ~xiiRefCounted ()=default
 Adds a virtual destructor.
 
- Public Member Functions inherited from xiiRefCountingImpl
 xiiRefCountingImpl ()=default
 Constructor.
 
 xiiRefCountingImpl (const xiiRefCountingImpl &rhs)
 
void operator= (const xiiRefCountingImpl &rhs)
 
xiiUInt32 AddRef () const
 Increments the reference counter. Returns the new reference count.
 
xiiUInt32 ReleaseRef () const
 Decrements the reference counter. Returns the new reference count.
 
bool IsReferenced () const
 Returns true if the reference count is greater than 0, false otherwise.
 
xiiUInt32 GetRefCount () const
 Returns the current reference count.
 

Protected Member Functions

 xiiGALFenceD3D12 (xiiSharedPtr< xiiGALDeviceD3D12 > pDeviceD3D12, const xiiGALFenceCreationDescription &creationDescription)
 
virtual ~xiiGALFenceD3D12 ()
 
virtual xiiResult InitPlatform () override final
 
virtual void SetDebugNamePlatform (xiiStringView sName) const override final
 
- Protected Member Functions inherited from xiiGALFence
 xiiGALFence (xiiSharedPtr< xiiGALDevice > pDevice, const xiiGALFenceCreationDescription &creationDescription)
 
void UpdateLastCompletedFenceValue (xiiUInt64 uiValue)
 
- Protected Member Functions inherited from xiiGALDeviceObject
 xiiGALDeviceObject (xiiSharedPtr< xiiGALDevice > pDevice)
 

Protected Attributes

ID3D12Fence * m_pD3D12Fence = nullptr
 
const HANDLE m_pFenceCompleteEvent
 
- Protected Attributes inherited from xiiGALFence
xiiGALFenceCreationDescription m_Description
 
xiiAtomicIntegerU64 m_LastCompletedFenceValue
 
- Protected Attributes inherited from xiiGALDeviceObject
xiiSharedPtr< xiiGALDevicem_pDevice
 

Friends

class xiiMemoryUtils
 
class xiiGALDeviceD3D12
 

Additional Inherited Members

- Static Public Member Functions inherited from xiiNoBase
static const xiiRTTIGetStaticRTTI ()
 

Constructor & Destructor Documentation

◆ ~xiiGALFenceD3D12()

xiiGALFenceD3D12::~xiiGALFenceD3D12 ( )
protectedvirtual
Todo
Schedule deletion on device.

Member Function Documentation

◆ GetCompletedValue()

xiiUInt64 xiiGALFenceD3D12::GetCompletedValue ( )
finaloverridevirtual

This returns the last completed value signaled by the GPU.

Remarks
In Direct3D11 backend, this method is not thread-safe (even if the fence object is protected by a mutex) and must only be called by the same thread that signals the fence via an enqueue.

Implements xiiGALFence.

◆ InitPlatform()

xiiResult xiiGALFenceD3D12::InitPlatform ( )
finaloverrideprotectedvirtual

Implements xiiGALFence.

◆ SetDebugNamePlatform()

void xiiGALFenceD3D12::SetDebugNamePlatform ( xiiStringView sName) const
finaloverrideprotectedvirtual

Reimplemented from xiiGALObject.

◆ Signal()

void xiiGALFenceD3D12::Signal ( xiiUInt64 uiValue)
finaloverridevirtual

This sets the fence to the specified value.

Parameters
uiValue- The new value the fence should reach. The value must be greater than the current value of the fence.
Note
Fence value will be changed immediately on the CPU. Use device to enqueue a signal command that will change the value on the GPU after all previously submitted commands are complete.
The fence must have been created with type General.

Implements xiiGALFence.

◆ Wait()

void xiiGALFenceD3D12::Wait ( xiiUInt64 uiValue)
finaloverridevirtual

This waits until the fence reaches or exceeds the specified value on the host.

Parameters
uiValue- The value that the fence is waiting to reach.
Note
The method blocks the execution of the calling thread until the wait is complete.

Implements xiiGALFence.


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