Fence interface. More...
#include <Fence.h>
Public Member Functions | |
| virtual const FenceDesc &DILIGENT_CALL_TYPE | GetDesc () const override=0 |
| Returns the fence description used to create the object. | |
| virtual Uint64 DILIGENT_CALL_TYPE | GetCompletedValue ()=0 |
| Returns the last completed value signaled by the GPU. | |
| virtual void DILIGENT_CALL_TYPE | Signal (Uint64 Value)=0 |
| Sets the fence to the specified value. | |
| virtual void DILIGENT_CALL_TYPE | Wait (Uint64 Value)=0 |
| Waits until the fence reaches or exceeds the specified value, on the host. | |
Public Member Functions inherited from Diligent::IDeviceObject | |
| virtual Int32 DILIGENT_CALL_TYPE | GetUniqueID () const =0 |
| Returns unique identifier assigned to an object. | |
| virtual void DILIGENT_CALL_TYPE | SetUserData (IObject *pUserData)=0 |
| Stores a pointer to the user-provided data object. | |
| virtual IObject *DILIGENT_CALL_TYPE | GetUserData () const =0 |
| Returns a pointer to the user data object previously set with SetUserData() method. | |
Public Member Functions inherited from Diligent.IObject | |
| virtual void DILIGENT_CALL_TYPE | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0 |
| Queries the specific interface. | |
| virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | AddRef ()=0 |
| Increments the number of strong references by 1. | |
| virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | Release ()=0 |
| virtual IReferenceCounters *DILIGENT_CALL_TYPE | GetReferenceCounters () const =0 |
Fence interface.
Defines the methods to manipulate a fence object
When a fence that was previously signaled by IDeviceContext::EnqueueSignal() is destroyed, it may block the GPU until all prior commands have completed execution.
|
pure virtual |
Returns the last completed value signaled by the GPU.
|
pure virtual |
Sets the fence to the specified value.
| [in] | Value | - New value to set the fence to. The value must be greater than the current value of the fence. |
Fence value will be changed immediately on the CPU. Use IDeviceContext::EnqueueSignal to enqueue a signal command that will change the value on the GPU after all previously submitted commands are complete.
|
pure virtual |
Waits until the fence reaches or exceeds the specified value, on the host.
| [in] | Value | - The value that the fence is waiting for to reach. |
The method blocks the execution of the calling thread until the wait is complete.