UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FVulkanViewport Class Reference

#include <VulkanViewport.h>

+ Inheritance diagram for FVulkanViewport:

Public Types

enum  { NUM_BUFFERS = 3 }
 

Public Member Functions

 FVulkanViewport (FVulkanDevice &InDevice, void *InWindowHandle, uint32 InSizeX, uint32 InSizeY, bool bInIsFullscreen, EPixelFormat InPreferredPixelFormat)
 
 ~FVulkanViewport ()
 
FTextureRHIRef GetBackBuffer (FRHICommandListImmediate &RHICmdList)
 
void AdvanceBackBufferFrame (FRHICommandListImmediate &RHICmdList)
 
virtual void WaitForFrameEventCompletion () override
 
virtual void IssueFrameEvent () override
 
FIntPoint GetSizeXY () const
 
virtual void SetCustomPresent (FRHICustomPresent *InCustomPresent) override final
 
virtual FRHICustomPresentGetCustomPresent () const override final
 
virtual void Tick (float DeltaTime) override final
 
bool Present (FVulkanCommandListContext &Context, bool bLockToVsync)
 
uint32 GetPresentCount () const
 
bool IsFullscreen () const
 
uint32 GetBackBufferImageCount ()
 
VkImage GetBackBufferImage (uint32 Index)
 
FVulkanSwapChainGetSwapChain ()
 
voidGetWindowHandle ()
 
void DestroySwapchain (struct FVulkanSwapChainRecreateInfo *RecreateInfo)
 
void RecreateSwapchain (FVulkanCommandListContext &Context, FVulkanPlatformWindowContext &WindowContext)
 
- Public Member Functions inherited from FRHIViewport
 FRHIViewport ()
 
virtual voidGetNativeSwapChain () const
 
virtual voidGetNativeBackBufferTexture () const
 
virtual voidGetNativeBackBufferRT () const
 
virtual voidGetNativeWindow (void **AddParam=nullptr) const
 
virtual FRHITextureGetOptionalSDRBackBuffer (FRHITexture *BackBuffer) 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 Member Functions

void OnSystemResolutionChanged (uint32 ResX, uint32 ResY)
 
void CreateSwapchain (FVulkanCommandListContext &Context, struct FVulkanSwapChainRecreateInfo *RecreateInfo, FVulkanPlatformWindowContext &WindowContext)
 
bool TryAcquireImageIndex ()
 
void InitImages (FVulkanContextCommon &Context, TConstArrayView< VkImage > Images)
 
void RecreateSwapchainFromRT (FRHICommandListImmediate &RHICmdList, EPixelFormat PreferredPixelFormat, FVulkanPlatformWindowContext &WindowContext)
 
void RecreateSwapchainFromRT (FRHICommandListImmediate &RHICmdList, FVulkanPlatformWindowContext &WindowContext)
 
void Resize (FRHICommandListImmediate &RHICmdList, uint32 InSizeX, uint32 InSizeY, bool bIsFullscreen, EPixelFormat PreferredPixelFormat, FVulkanPlatformWindowContext &WindowContext)
 
bool DoCheckedSwapChainJob (FVulkanCommandListContext &Context)
 
bool SupportsStandardSwapchain ()
 
bool RequiresRenderingBackBuffer ()
 
EPixelFormat GetPixelFormatForNonDefaultSwapchain ()
 
- Protected Member Functions inherited from FRHIResource
virtual RHI_API ~FRHIResource ()
 

Protected Attributes

FVulkanDeviceDevice
 
TArray< TRefCountPtr< FVulkanTexture >, TInlineAllocator< NUM_BUFFERS *2 > > BackBufferImages
 
TArray< FVulkanSemaphore *, TInlineAllocator< NUM_BUFFERS *2 > > RenderingDoneSemaphores
 
TIndirectArray< FVulkanView, TInlineAllocator< NUM_BUFFERS *2 > > TextureViews
 
TRefCountPtr< FVulkanBackBufferRHIBackBuffer
 
TRefCountPtr< FVulkanTextureRenderingBackBuffer
 
FCriticalSection RecreatingSwapchain
 
uint32 SizeX
 
uint32 SizeY
 
bool bIsFullscreen
 
EPixelFormat PixelFormat
 
int32 AcquiredImageIndex
 
FVulkanSwapChainSwapChain
 
voidWindowHandle
 
uint32 PresentCount
 
bool bRenderOffscreen
 
int8 LockToVsync
 
FVulkanSemaphoreAcquiredSemaphore
 
FCustomPresentRHIRef CustomPresent
 
FVulkanSyncPointRef LastFrameSyncPoint
 
EDeviceScreenOrientation CachedOrientation = EDeviceScreenOrientation::Unknown
 

Friends

class FVulkanDynamicRHI
 
class FVulkanCommandListContext
 
struct FRHICommandAcquireBackBuffer
 
class FVulkanBackBuffer
 

Member Enumeration Documentation

◆ anonymous enum

Enumerator
NUM_BUFFERS 

Constructor & Destructor Documentation

◆ FVulkanViewport()

FVulkanViewport::FVulkanViewport ( FVulkanDevice InDevice,
void InWindowHandle,
uint32  InSizeX,
uint32  InSizeY,
bool  bInIsFullscreen,
EPixelFormat  InPreferredPixelFormat 
)

◆ ~FVulkanViewport()

FVulkanViewport::~FVulkanViewport ( )

Member Function Documentation

◆ AdvanceBackBufferFrame()

void FVulkanViewport::AdvanceBackBufferFrame ( FRHICommandListImmediate RHICmdList)

◆ CreateSwapchain()

void FVulkanViewport::CreateSwapchain ( FVulkanCommandListContext Context,
struct FVulkanSwapChainRecreateInfo RecreateInfo,
FVulkanPlatformWindowContext WindowContext 
)
protected

◆ DestroySwapchain()

void FVulkanViewport::DestroySwapchain ( struct FVulkanSwapChainRecreateInfo RecreateInfo)

◆ DoCheckedSwapChainJob()

bool FVulkanViewport::DoCheckedSwapChainJob ( FVulkanCommandListContext Context)
protected

◆ GetBackBuffer()

FTextureRHIRef FVulkanViewport::GetBackBuffer ( FRHICommandListImmediate RHICmdList)

◆ GetBackBufferImage()

VkImage FVulkanViewport::GetBackBufferImage ( uint32  Index)
inline

◆ GetBackBufferImageCount()

uint32 FVulkanViewport::GetBackBufferImageCount ( )
inline

◆ GetCustomPresent()

virtual FRHICustomPresent * FVulkanViewport::GetCustomPresent ( ) const
inlinefinaloverridevirtual

Returns currently set custom present handler.

Reimplemented from FRHIViewport.

◆ GetPixelFormatForNonDefaultSwapchain()

EPixelFormat FVulkanViewport::GetPixelFormatForNonDefaultSwapchain ( )
protected

◆ GetPresentCount()

uint32 FVulkanViewport::GetPresentCount ( ) const
inline

◆ GetSizeXY()

FIntPoint FVulkanViewport::GetSizeXY ( ) const
inline

◆ GetSwapChain()

FVulkanSwapChain * FVulkanViewport::GetSwapChain ( )
inline

◆ GetWindowHandle()

void * FVulkanViewport::GetWindowHandle ( )
inline

◆ InitImages()

void FVulkanViewport::InitImages ( FVulkanContextCommon Context,
TConstArrayView< VkImage Images 
)
protected

◆ IsFullscreen()

bool FVulkanViewport::IsFullscreen ( ) const
inline

◆ IssueFrameEvent()

void FVulkanViewport::IssueFrameEvent ( )
overridevirtual

Reimplemented from FRHIViewport.

◆ OnSystemResolutionChanged()

void FVulkanViewport::OnSystemResolutionChanged ( uint32  ResX,
uint32  ResY 
)
protected

◆ Present()

bool FVulkanViewport::Present ( FVulkanCommandListContext Context,
bool  bLockToVsync 
)

◆ RecreateSwapchain()

void FVulkanViewport::RecreateSwapchain ( FVulkanCommandListContext Context,
FVulkanPlatformWindowContext WindowContext 
)

◆ RecreateSwapchainFromRT() [1/2]

void FVulkanViewport::RecreateSwapchainFromRT ( FRHICommandListImmediate RHICmdList,
EPixelFormat  PreferredPixelFormat,
FVulkanPlatformWindowContext WindowContext 
)
protected

◆ RecreateSwapchainFromRT() [2/2]

void FVulkanViewport::RecreateSwapchainFromRT ( FRHICommandListImmediate RHICmdList,
FVulkanPlatformWindowContext WindowContext 
)
inlineprotected

◆ RequiresRenderingBackBuffer()

bool FVulkanViewport::RequiresRenderingBackBuffer ( )
protected

◆ Resize()

void FVulkanViewport::Resize ( FRHICommandListImmediate RHICmdList,
uint32  InSizeX,
uint32  InSizeY,
bool  bIsFullscreen,
EPixelFormat  PreferredPixelFormat,
FVulkanPlatformWindowContext WindowContext 
)
protected

◆ SetCustomPresent()

virtual void FVulkanViewport::SetCustomPresent ( FRHICustomPresent )
inlinefinaloverridevirtual

Sets custom Present handler on the viewport

Reimplemented from FRHIViewport.

◆ SupportsStandardSwapchain()

bool FVulkanViewport::SupportsStandardSwapchain ( )
protected

◆ Tick()

void FVulkanViewport::Tick ( float  DeltaTime)
finaloverridevirtual

Ticks the viewport on the Game thread

Reimplemented from FRHIViewport.

◆ TryAcquireImageIndex()

bool FVulkanViewport::TryAcquireImageIndex ( )
protected

◆ WaitForFrameEventCompletion()

void FVulkanViewport::WaitForFrameEventCompletion ( )
overridevirtual

Reimplemented from FRHIViewport.

Friends And Related Symbol Documentation

◆ FRHICommandAcquireBackBuffer

friend struct FRHICommandAcquireBackBuffer
friend

◆ FVulkanBackBuffer

friend class FVulkanBackBuffer
friend

◆ FVulkanCommandListContext

◆ FVulkanDynamicRHI

friend class FVulkanDynamicRHI
friend

Member Data Documentation

◆ AcquiredImageIndex

int32 FVulkanViewport::AcquiredImageIndex
protected

◆ AcquiredSemaphore

FVulkanSemaphore* FVulkanViewport::AcquiredSemaphore
protected

◆ BackBufferImages

TArray<TRefCountPtr<FVulkanTexture>, TInlineAllocator<NUM_BUFFERS*2> > FVulkanViewport::BackBufferImages
protected

◆ bIsFullscreen

bool FVulkanViewport::bIsFullscreen
protected

◆ bRenderOffscreen

bool FVulkanViewport::bRenderOffscreen
protected

◆ CachedOrientation

EDeviceScreenOrientation FVulkanViewport::CachedOrientation = EDeviceScreenOrientation::Unknown
protected

◆ CustomPresent

FCustomPresentRHIRef FVulkanViewport::CustomPresent
protected

◆ Device

FVulkanDevice& FVulkanViewport::Device
protected

◆ LastFrameSyncPoint

FVulkanSyncPointRef FVulkanViewport::LastFrameSyncPoint
protected

◆ LockToVsync

int8 FVulkanViewport::LockToVsync
protected

◆ PixelFormat

EPixelFormat FVulkanViewport::PixelFormat
protected

◆ PresentCount

uint32 FVulkanViewport::PresentCount
protected

◆ RecreatingSwapchain

FCriticalSection FVulkanViewport::RecreatingSwapchain
protected

narrow-scoped section that locks access to back buffer during its recreation

◆ RenderingBackBuffer

TRefCountPtr<FVulkanTexture> FVulkanViewport::RenderingBackBuffer
protected

◆ RenderingDoneSemaphores

TArray<FVulkanSemaphore*, TInlineAllocator<NUM_BUFFERS*2> > FVulkanViewport::RenderingDoneSemaphores
protected

◆ RHIBackBuffer

TRefCountPtr<FVulkanBackBuffer> FVulkanViewport::RHIBackBuffer
protected

◆ SizeX

uint32 FVulkanViewport::SizeX
protected

◆ SizeY

uint32 FVulkanViewport::SizeY
protected

◆ SwapChain

FVulkanSwapChain* FVulkanViewport::SwapChain
protected

◆ TextureViews

TIndirectArray<FVulkanView, TInlineAllocator<NUM_BUFFERS*2> > FVulkanViewport::TextureViews
protected

◆ WindowHandle

void* FVulkanViewport::WindowHandle
protected

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