UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FVulkanGPUFence Class Referencefinal

#include <VulkanResources.h>

+ Inheritance diagram for FVulkanGPUFence:

Public Member Functions

 FVulkanGPUFence (FVulkanDevice &InDevice, FName InName)
 
virtual ~FVulkanGPUFence ()
 
virtual void Clear () override
 
virtual bool Poll () const override
 
virtual void Wait (FRHICommandListImmediate &RHICmdList, FRHIGPUMask GPUMask) const override
 
- Public Member Functions inherited from FRHIGPUFence
 FRHIGPUFence (FName InName)
 
virtual bool Poll (FRHIGPUMask GPUMask) const
 
FName GetFName () const
 
- Public Member Functions inherited from FRHIResource
RHI_API FRHIResource (ERHIResourceType InResourceType)
 
uint32 AddRef () const
 
uint32 Release () const
 
uint32 GetRefCount () const
 
bool IsValid () const
 
void DisableLifetimeExtension ()
 
ERHIResourceType GetType () const
 
FName GetOwnerName () const
 
void SetOwnerName (FName InOwnerName)
 

Protected Attributes

FVulkanDeviceDevice
 
VkEvent Event = VK_NULL_HANDLE
 
FGraphEventRef SubmittedSyncPoint
 
FVulkanSyncPointRef CompletedSyncPoint
 
- Protected Attributes inherited from FRHIGPUFence
const FName FenceName
 

Friends

class FVulkanDynamicRHI
 

Additional Inherited Members

- Public Attributes inherited from FRHIGPUFence
FThreadSafeCounter NumPendingWriteCommands
 
- Protected Member Functions inherited from FRHIResource
virtual RHI_API ~FRHIResource ()
 

Constructor & Destructor Documentation

◆ FVulkanGPUFence()

FVulkanGPUFence::FVulkanGPUFence ( FVulkanDevice InDevice,
FName  InName 
)

◆ ~FVulkanGPUFence()

FVulkanGPUFence::~FVulkanGPUFence ( )
virtual

Member Function Documentation

◆ Clear()

void FVulkanGPUFence::Clear ( )
overridevirtual

Implements FRHIGPUFence.

◆ Poll()

bool FVulkanGPUFence::Poll ( ) const
overridevirtual

Poll the fence to see if the GPU has signaled it.

Returns
True if and only if the GPU fence has been inserted and the GPU has signaled the fence.

CAUTION: Do not call poll in a loop to block until completion. Some platform RHIs will not signal fences unless the RHI thread continues to make progress and submit GPU work.

To block for completion, call Wait(), which can only be done from the render thread.

Use Poll() only to check a fence. If it returns false, continue to do useful work and recheck later, ideally on the following frame.

Implements FRHIGPUFence.

◆ Wait()

void FVulkanGPUFence::Wait ( FRHICommandListImmediate RHICmdList,
FRHIGPUMask  GPUMask 
) const
overridevirtual

Blocks the caller until the fence has passed on the GPU. Can only be called from the render thread.

CAUTION: Use of this function may cause a hitch if the fence is not yet signalled and we have to wait for the GPU to catch up. Rendering code should be written to avoid immediately waiting on GPU fences.

Implements FRHIGPUFence.

Friends And Related Symbol Documentation

◆ FVulkanDynamicRHI

friend class FVulkanDynamicRHI
friend

Member Data Documentation

◆ CompletedSyncPoint

FVulkanSyncPointRef FVulkanGPUFence::CompletedSyncPoint
protected

◆ Device

FVulkanDevice& FVulkanGPUFence::Device
protected

◆ Event

VkEvent FVulkanGPUFence::Event = VK_NULL_HANDLE
protected

◆ SubmittedSyncPoint

FGraphEventRef FVulkanGPUFence::SubmittedSyncPoint
protected

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