FVulkanDynamicRHI

The interface which is implemented by the dynamically bound RHI.

Windows
MacOS
Linux

Inheritance Hierarchy

FDynamicRHI

FVulkanDynamicRHI

References

Module

VulkanRHI

Header

/Engine/Source/Runtime/VulkanRHI/Public/VulkanDynamicRHI.h

Include

#include "VulkanDynamicRHI.h"

Syntax

class FVulkanDynamicRHI : public FDynamicRHI

Remarks

The interface which is implemented by the dynamically bound RHI.

Variables

Name Description

Protected variable

bool

 

bSupportsDebugUtilsExt

Protected variable

FVulkanDevice *

 

Device

Protected variable

TArray< FVulkanDevice * >

 

Devices

Protected variable

TRefCountPtr< FVulkanViewport >

 

DrawingViewport

The viewport which is currently being drawn.

Protected variable

VkInstance

 

Instance

Protected variable

TArray< const ANSICHAR * >

 

InstanceExtensions

Protected variable

TArray< const ANSICHAR * >

 

InstanceLayers

Protected variable

FCriticalSection

 

LockBufferCS

Protected variable

FOptionalVulkanInstanceExtensions

 

OptionalInstanceExtensions

Protected variable

IConsoleObject *

 

RebuildPipelineCacheCmd

Protected variable

IConsoleObject *

 

SavePipelineCacheCmd

Public variable

uint32

 

TotalPresentCount

Historical number of times we've presented any and all viewports.

Protected variable

TArray< FVulkanViewport * >

 

Viewports

A list of all viewport RHIs that have been created.

Constructors

Name Description

Public function

FVulkanDynamicRHI()

Initialization constructor.

Destructors

Name Description

Public function

~FVulkanDynamicRHI()

Destructor

Functions

Name Description

Protected function

void

 

CreateInstance()

Public function Static

void

 

DestroySwapChain()

Public function

FVulkanDevice *

 

GetDevice()

Public function Const

VkInstance

 

GetInstance()

Public function Const

const TArray< const ANSICHAR * > &

 

GetInstanceExtensions()

Public function Const

const TArray< const ANSICHAR * > &

 

GetInstanceLayers()

Protected function Static

void

 

GetInstanceLayersAndExtensions

(
    TArray< const ANSICHAR* >& OutInstanceExtensions,
    TArray< const ANSICHAR* >& OutInstanceLayers,
    bool& bOutDebugUtils
)

Static void WriteEndFrameTimestamp(void*);

Public function Const

const FOptionalVulkanInstanceExtensions &

 

GetOptionalExtensions()

Protected function

void

 

InitDevice

(
    FVulkanDevice* Device
)

Protected function

void

 

InitGPU

(
    FVulkanDevice* Device
)

Public function

void

 

InitInstance()

Protected function

void

 

InternalUnlockTexture2D

(
    bool bFromRenderingThread,
    FRHITexture2D* Texture,
    uint32 MipIndex,
    bool bLockWithinMiptail
)

Protected function

void

 

InternalUpdateTexture2D

(
    bool bFromRenderingThread,
    FRHITexture2D* TextureRHI,
    uint32 MipIndex,
    const FUpdateTextureRegion2D& UpdateRegion,
    uint32 SourcePitch,
    const uint8* SourceData
)

Protected function

void

 

InternalUpdateTexture3D

(
    bool bFromRenderingThread,
    FRHITexture3D* TextureRHI,
    uint32 MipIndex,
    const FUpdateTextureRegion3D& UpdateRegion,
    uint32 SourceRowPitch,
    uint32 SourceDepthPitch,
    const uint8* SourceData
)

Protected function Static

void

 

RebuildPipelineCache()

Public function Static

void

 

RecreateSwapChain

(
    void* NewNativeWindow
)

Public function Virtual

FTexture2DArrayRHIRef

 

RHICreateTexture2DArrayFromResource

(
    EPixelFormat Format,
    uint32 SizeX,
    uint32 SizeY,
    uint32 ArraySize,
    uint32 NumMips,
    uint32 NumSamples,
    VkImage Resource,
    uint32 Flags
)

Public function Virtual

FTexture2DRHIRef

 

RHICreateTexture2DFromResource

(
    EPixelFormat Format,
    uint32 SizeX,
    uint32 SizeY,
    uint32 NumMips,
    uint32 NumSamples,
    VkImage Resource,
    FSamplerYcbcrConversionInitializer& ConversionInitializer,
    uint32 Flags
)

Virtual void RHIAcquireTransientResource_RenderThread(FRHITexture* Texture) { } virtual void RHIDiscardTransientResource_RenderThread(FRHITexture* Texture) { } virtual void RHIAcquireTransientResource_RenderThread(FRHIVertexBuffer* Buffer) { } virtual void RHIDiscardTransientResource_RenderThread(FRHIVertexBuffer* Buffer) { } virtual void RHIAcquireTransientResource_RenderThread(FRHIStructuredBuffer*FRHIStructuredBuffer* Buffer) { } virtual void RHIDiscardTransientResource_RenderThread(FRHIStructuredBuffer* Buffer) { }

Public function Virtual

FTexture2DRHIRef

 

RHICreateTexture2DFromResource

(
    EPixelFormat Format,
    uint32 SizeX,
    uint32 SizeY,
    uint32 NumMips,
    uint32 NumSamples,
    VkImage Resource,
    uint32 Flags
)

Virtual void RHIAcquireTransientResource_RenderThread(FRHITexture* Texture) { } virtual void RHIDiscardTransientResource_RenderThread(FRHITexture* Texture) { } virtual void RHIAcquireTransientResource_RenderThread(FRHIVertexBuffer* Buffer) { } virtual void RHIDiscardTransientResource_RenderThread(FRHIVertexBuffer* Buffer) { } virtual void RHIAcquireTransientResource_RenderThread(FRHIStructuredBuffer*FRHIStructuredBuffer* Buffer) { } virtual void RHIDiscardTransientResource_RenderThread(FRHIStructuredBuffer* Buffer) { }

Public function Virtual

FTextureCubeRHIRef

 

RHICreateTextureCubeFromResource

(
    EPixelFormat Format,
    uint32 Size,
    bool bArray,
    uint32 ArraySize,
    uint32 NumMips,
    VkImage Resource,
    uint32 Flags
)

Public function Static

void

 

SavePipelineCache()

Protected function

void

 

SelectAndInitDevice()

Protected function Static

void

 

SetupValidationRequests()

Public function Const

bool

 

SupportsDebugUtilsExt()

Protected function

void

 

UpdateUniformBuffer

(
    FVulkanUniformBuffer* UniformBuffer,
    const void* Contents
)

Public function Virtual

void

 

VulkanSetImageLayout

(
    VkCommandBuffer CmdBuffer,
    VkImage Image,
    VkImageLayout OldLayout,
    VkImageLayout NewLayout,
    const VkImageSubresourceRange& SubresourceRange
)

Overridden from FDynamicRHI

Name Description

Public function Virtual

FTexture2DRHIRef

 

AsyncReallocateTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHITexture2D* Texture2D,
    int32 NewMipCount,
    int32 NewSizeX,
    int32 NewSizeY,
    FThreadSafeCounter* RequestStatus
)

Public function Virtual

FComputeShaderRHIRef

 

CreateComputeShader_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    const TArray< uint8 >& Code
)

Public function Virtual

FDomainShaderRHIRef

 

CreateDomainShader_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    const TArray< uint8 >& Code
)

Virtual FHullShaderRHIRef CreateHullShader_RenderThread(class FRHICommandListImmediate& RHICmdList, FRHIShaderLibrary* Library, FSHAHash Hash) override final;

Public function Virtual

FGeometryShaderRHIRef

 

CreateGeometryShader_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    const TArray< uint8 >& Code
)

Virtual FPixelShaderRHIRef CreatePixelShader_RenderThread(class FRHICommandListImmediate& RHICmdList, FRHIShaderLibrary* Library, FSHAHash Hash) override final;

Public function Virtual

FHullShaderRHIRef

 

CreateHullShader_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    const TArray< uint8 >& Code
)

Virtual FComputeShaderRHIRef CreateComputeShader_RenderThread(class FRHICommandListImmediate& RHICmdList, FRHIShaderLibrary* Library, FSHAHash Hash) override final;

Public function Virtual

FIndexBufferRHIRef

 

CreateIndexBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    uint32 Stride,
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo
)

Public function Virtual

FPixelShaderRHIRef

 

CreatePixelShader_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    const TArray< uint8 >& Code
)

Virtual FVertexShaderRHIRef CreateVertexShader_RenderThread(class FRHICommandListImmediate& RHICmdList, FRHIShaderLibrary* Library, FSHAHash Hash) override final;

Public function Virtual

FShaderResourceViewRHIRef

 

CreateShaderResourceView_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHIVertexBuffer* VertexBuffer,
    uint32 Stride,
    uint8 Format
)

Public function Virtual

FVertexBufferRHIRef

 

CreateVertexBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo
)

Pass through functions that allow RHIs to optimize certain calls.

Public function Virtual

FVertexShaderRHIRef

 

CreateVertexShader_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    const TArray< uint8 >& Code
)

Public function Virtual

ETextureReallocationStatus

 

FinalizeAsyncReallocateTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHITexture2D* Texture2D,
    bool bBlockUntilCompleted
)

Public function Virtual

const TCHAR *

 

GetName()

Public function Virtual

void

 

Init()

Initializes the RHI; separate from IDynamicRHIModule::CreateRHI so that GDynamicRHI is set when it is called.

Public function Virtual

void *

 

LockIndexBuffer_BottomOfPipe

(
    FRHICommandListImmediate& RHICmdList,
    FRHIIndexBuffer* IndexBuffer,
    uint32 Offset,
    uint32 Size,
    EResourceLockMode LockMode
)

Public function Virtual

void *

 

LockStructuredBuffer_BottomOfPipe

(
    FRHICommandListImmediate& RHICmdList,
    FRHIStructuredBuffer* StructuredBuffer,
    uint32 Offset,
    uint32 SizeRHI,
    EResourceLockMode LockMode
)

Buffer Lock/Unlock.

Public function Virtual

void *

 

LockTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHITexture2D* Texture,
    uint32 MipIndex,
    EResourceLockMode LockMode,
    uint32& DestStride,
    bool bLockWithinMiptail,
    bool bNeedsDefaultRHIFlush
)

Virtual FDomainShaderRHIRef CreateDomainShader_RenderThread(class FRHICommandListImmediate& RHICmdList, FRHIShaderLibrary* Library, FSHAHash Hash) override final;

Public function Virtual

void *

 

LockVertexBuffer_BottomOfPipe

(
    FRHICommandListImmediate& RHICmdList,
    FRHIVertexBuffer* VertexBuffer,
    uint32 Offset,
    uint32 SizeRHI,
    EResourceLockMode LockMode
)

Public function Virtual

void

 

PostInit()

Called after the RHI is initialized; before the render thread is started.

Public function Virtual

void

 

RHIAcquireThreadOwnership()

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHIAdvanceFrameForGetViewportBackBuffer

(
    FRHIViewport* Viewport
)

Only relevant with an RHI thread, this advances the backbuffer for the purpose of GetViewportBackBuffer FlushType: Thread safe

Public function Virtual

void

 

RHIAliasTextureResources

(
    FRHITexture* DestTexture,
    FRHITexture* SrcTexture
)

Public function Virtual

FTexture2DRHIRef

 

RHIAsyncCreateTexture2D

(
    uint32 SizeX,
    uint32 SizeY,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    void** InitialMipData,
    uint32 NumInitialMips
)

FlushType: Thread safe.

Public function Virtual

FTexture2DRHIRef

 

RHIAsyncReallocateTexture2D

(
    FRHITexture2D* Texture2D,
    int32 NewMipCount,
    int32 NewSizeX,
    int32 NewSizeY,
    FThreadSafeCounter* RequestStatus
)

Starts an asynchronous texture reallocation.

Public function Virtual

void

 

RHIBindDebugLabelName

(
    FRHIUnorderedAccessView* UnorderedAccessViewRHI,
    const TCHAR* Name
)

Public function Virtual

void

 

RHIBindDebugLabelName

(
    FRHITexture* Texture,
    const TCHAR* Name
)

FlushType: Thread safe.

Public function Virtual

void

 

RHIBlockUntilGPUIdle()

Blocks the CPU until the GPU catches up and goes idle. FlushType: Flush Immediate (seems wrong)

Public function Virtual

uint64

 

RHICalcTexture2DPlatformSize

(
    uint32 SizeX,
    uint32 SizeY,
    uint8 Format,
    uint32 NumMips,
    uint32 NumSamples,
    uint32 Flags,
    const FRHIResourceCreateInfo& CreateInfo,
    uint32& OutAlign
)

FlushType: Thread safe.

Public function Virtual

uint64

 

RHICalcTexture3DPlatformSize

(
    uint32 SizeX,
    uint32 SizeY,
    uint32 SizeZ,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    const FRHIResourceCreateInfo& CreateInfo,
    uint32& OutAlign
)

FlushType: Thread safe.

Public function Virtual

uint64

 

RHICalcTextureCubePlatformSize

(
    uint32 Size,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    const FRHIResourceCreateInfo& CreateInfo,
    uint32& OutAlign
)

FlushType: Thread safe.

Public function Virtual

void

 

RHICalibrateTimers()

Public function Virtual

ETextureReallocationStatus

 

RHICancelAsyncReallocateTexture2D

(
    FRHITexture2D* Texture2D,
    bool bBlockUntilCompleted
)

FlushType: Wait RHI Thread.

Public function Virtual

uint32

 

RHIComputeMemorySize

(
    FRHITexture* TextureRHI
)

FlushType: Thread safe.

Public function Virtual

void

 

RHICopySharedMips

(
    FRHITexture2D* DestTexture2D,
    FRHITexture2D* SrcTexture2D
)

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHICopySubTextureRegion

(
    FRHITexture2D* SourceTexture,
    FRHITexture2D* DestinationTexture,
    FBox2D SourceBox,
    FBox2D DestinationBox
)

Public function Virtual

void

 

RHICopyVertexBuffer

(
    FRHIVertexBuffer* SourceBuffer,
    FRHIVertexBuffer* DestBuffer
)

FlushType: Flush Immediate (seems dangerous)

Public function Virtual

FTextureRHIRef

 

RHICreateAliasedTexture

(
    FRHITexture* SourceTexture
)

Public function Virtual

FBlendStateRHIRef

 

RHICreateBlendState

(
    const FBlendStateInitializerRHI& Initializer
)

FlushType: Thread safe.

Public function Virtual

FBoundShaderStateRHIRef

 

RHICreateBoundShaderState

(
    FRHIVertexDeclaration* VertexDeclaration,
    FRHIVertexShader* VertexShader,
    FRHIHullShader* HullShader,
    FRHIDomainShader* DomainShader,
    FRHIPixelShader* PixelShader,
    FRHIGeometryShader* GeometryShader
)

FlushType: Thread safe, but varies depending on the RHI.

Public function Virtual

FComputeFenceRHIRef

 

RHICreateComputeFence

(
    const FName& Name
)

FlushType: Thread safe, but varies depending on the RHI.

Public function Virtual

FComputeShaderRHIRef

 

RHICreateComputeShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function Virtual

FDepthStencilStateRHIRef

 

RHICreateDepthStencilState

(
    const FDepthStencilStateInitializerRHI& Initializer
)

FlushType: Thread safe.

Public function Virtual

FDomainShaderRHIRef

 

RHICreateDomainShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function Virtual

FGeometryShaderRHIRef

 

RHICreateGeometryShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function Virtual

FGPUFenceRHIRef

 

RHICreateGPUFence

(
    const FName& Name
)

Public function Virtual

FGraphicsPipelineStateRHIRef

 

RHICreateGraphicsPipelineState

(
    const FGraphicsPipelineStateInitializer& Initializer
)

Creates a graphics pipeline state object (PSO) that represents a complete gpu pipeline for rendering.

Public function Virtual

FHullShaderRHIRef

 

RHICreateHullShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function Virtual

FIndexBufferRHIRef

 

RHICreateIndexBuffer

(
    uint32 Stride,
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo
)

FlushType: Wait RHI Thread.

Public function Virtual

FPixelShaderRHIRef

 

RHICreatePixelShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function Virtual

FRasterizerStateRHIRef

 

RHICreateRasterizerState

(
    const FRasterizerStateInitializerRHI& Initializer
)

FlushType: Thread safe.

Public function Virtual

FRenderQueryRHIRef

 

RHICreateRenderQuery

(
    ERenderQueryType QueryType
)

FlushType: Wait RHI Thread.

Public function Virtual

FRenderQueryRHIRef

 

RHICreateRenderQuery_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    ERenderQueryType QueryType
)

Public function Virtual

FSamplerStateRHIRef

 

RHICreateSamplerState

(
    const FSamplerStateInitializerRHI& Initializer
)

FlushType: Thread safe.

Public function Virtual

FShaderResourceViewRHIRef

 

RHICreateShaderResourceView

(
    FRHIStructuredBuffer* StructuredBuffer
)

FlushType: Wait RHI Thread.

Public function Virtual

FShaderResourceViewRHIRef

 

RHICreateShaderResourceView

(
    FRHIIndexBuffer* Buffer
)

FlushType: Wait RHI Thread.

Public function Virtual

FShaderResourceViewRHIRef

 

RHICreateShaderResourceView

(
    FRHITexture* Texture2DRHI,
    const FRHITextureSRVCreateInfo& CreateInfo
)

FlushType: Wait RHI Thread.

Public function Virtual

FShaderResourceViewRHIRef

 

RHICreateShaderResourceView

(
    FRHIVertexBuffer* VertexBuffer,
    uint32 Stride,
    uint8 Format
)

FlushType: Wait RHI Thread.

Public function Virtual

FShaderResourceViewRHIRef

 

RHICreateShaderResourceView_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHITexture* Texture,
    const FRHITextureSRVCreateInfo& CreateInfo
)

Public function Virtual

FShaderResourceViewRHIRef

 

RHICreateShaderResourceView_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHIStructuredBuffer* StructuredBuffer
)

Public function Virtual

FShaderResourceViewRHIRef

 

RHICreateShaderResourceView_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHIVertexBuffer* VertexBuffer,
    uint32 Stride,
    uint8 Format
)

Public function Virtual

FStagingBufferRHIRef

 

RHICreateStagingBuffer()

FlushType: Thread safe.

Public function Virtual

FStructuredBufferRHIRef

 

RHICreateStructuredBuffer

(
    uint32 Stride,
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo
)

FlushType: Wait RHI Thread.

Public function Virtual

FTexture2DRHIRef

 

RHICreateTexture2D

(
    uint32 SizeX,
    uint32 SizeY,
    uint8 Format,
    uint32 NumMips,
    uint32 NumSamples,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

FlushType: Wait RHI Thread.

Public function Virtual

FTexture2DRHIRef

 

RHICreateTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    uint32 SizeX,
    uint32 SizeY,
    uint8 Format,
    uint32 NumMips,
    uint32 NumSamples,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

Public function Virtual

FTexture2DArrayRHIRef

 

RHICreateTexture2DArray

(
    uint32 SizeX,
    uint32 SizeY,
    uint32 SizeZ,
    uint8 Format,
    uint32 NumMips,
    uint32 NumSamples,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

FlushType: Wait RHI Thread.

Public function Virtual

FTexture2DArrayRHIRef

 

RHICreateTexture2DArray_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    uint32 SizeX,
    uint32 SizeY,
    uint32 SizeZ,
    uint8 Format,
    uint32 NumMips,
    uint32 NumSamples,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

Public function Virtual

FTexture3DRHIRef

 

RHICreateTexture3D

(
    uint32 SizeX,
    uint32 SizeY,
    uint32 SizeZ,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

FlushType: Wait RHI Thread.

Public function Virtual

FTexture3DRHIRef

 

RHICreateTexture3D_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    uint32 SizeX,
    uint32 SizeY,
    uint32 SizeZ,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

Public function Virtual

FTextureCubeRHIRef

 

RHICreateTextureCube

(
    uint32 Size,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

FlushType: Wait RHI Thread.

Public function Virtual

FTextureCubeRHIRef

 

RHICreateTextureCube_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    uint32 Size,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

Public function Virtual

FTextureCubeRHIRef

 

RHICreateTextureCubeArray

(
    uint32 Size,
    uint32 ArraySize,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

FlushType: Wait RHI Thread.

Public function Virtual

FTextureCubeRHIRef

 

RHICreateTextureCubeArray_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    uint32 Size,
    uint32 ArraySize,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

Public function Virtual

FTexture2DRHIRef

 

RHICreateTextureExternal2D_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    uint32 SizeX,
    uint32 SizeY,
    uint8 Format,
    uint32 NumMips,
    uint32 NumSamples,
    uint32 Flags,
    FRHIResourceCreateInfo& CreateInfo
)

Public function Virtual

FTextureReferenceRHIRef

 

RHICreateTextureReference

(
    FLastRenderTimeContainer* LastRenderTime
)

FlushType: Wait RHI Thread.

Public function Virtual

FTextureReferenceRHIRef

 

RHICreateTextureReference_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FLastRenderTimeContainer* LastRenderTime
)

Public function Virtual

FUniformBufferRHIRef

 

RHICreateUniformBuffer

(
    const void* Contents,
    const FRHIUniformBufferLayout& Layout,
    EUniformBufferUsage Usage,
    EUniformBufferValidation Validation
)

FlushType: Thread safe, but varies depending on the RHI.

Public function Virtual

FUnorderedAccessViewRHIRef

 

RHICreateUnorderedAccessView

(
    FRHIStructuredBuffer* StructuredBuffer,
    bool bUseUAVCounter,
    bool bAppendBuffer
)

FlushType: Wait RHI Thread.

Public function Virtual

FUnorderedAccessViewRHIRef

 

RHICreateUnorderedAccessView

(
    FRHITexture* Texture,
    uint32 MipLevel
)

FlushType: Wait RHI Thread.

Public function Virtual

FUnorderedAccessViewRHIRef

 

RHICreateUnorderedAccessView

(
    FRHIVertexBuffer* VertexBuffer,
    uint8 Format
)

FlushType: Wait RHI Thread.

Public function Virtual

FUnorderedAccessViewRHIRef

 

RHICreateUnorderedAccessView

(
    FRHIIndexBuffer* IndexBuffer,
    uint8 Format
)

FlushType: Wait RHI Thread.

Public function Virtual

FUnorderedAccessViewRHIRef

 

RHICreateUnorderedAccessView_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHIStructuredBuffer* StructuredBuffer,
    bool bUseUAVCounter,
    bool bAppendBuffer
)

Public function Virtual

FUnorderedAccessViewRHIRef

 

RHICreateUnorderedAccessView_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHIVertexBuffer* VertexBuffer,
    uint8 Format
)

Public function Virtual

FUnorderedAccessViewRHIRef

 

RHICreateUnorderedAccessView_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHITexture* Texture,
    uint32 MipLevel
)

Public function Virtual

FVertexBufferRHIRef

 

RHICreateVertexBuffer

(
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo
)

FlushType: Wait RHI Thread.

Public function Virtual

FVertexDeclarationRHIRef

 

RHICreateVertexDeclaration

(
    const FVertexDeclarationElementList& Elements
)

FlushType: Wait RHI Thread.

Public function Virtual

FVertexShaderRHIRef

 

RHICreateVertexShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function Virtual

FViewportRHIRef

 

RHICreateViewport

(
    void* WindowHandle,
    uint32 SizeX,
    uint32 SizeY,
    bool bIsFullscreen,
    EPixelFormat PreferredPixelFormat
)

Must be called from the main thread. FlushType: Thread safe

Public function Virtual

void

 

RHIExecuteCommandList

(
    FRHICommandList* CmdList
)

FlushType: Wait RHI Thread.

Public function Virtual

ETextureReallocationStatus

 

RHIFinalizeAsyncReallocateTexture2D

(
    FRHITexture2D* Texture2D,
    bool bBlockUntilCompleted
)

FlushType: Wait RHI Thread.

Public function Virtual

void

 

RHIFlushResources()

Flush driver resources.

Public function Virtual

bool

 

RHIGetAvailableResolutions

(
    FScreenResolutionArray& Resolutions,
    bool bIgnoreRefreshRate
)

FlushType: Thread safe.

Public function Virtual

IRHICommandContextContainer *

 

RHIGetCommandContextContainer

(
    int32 Index,
    int32 Num
)

FlushType: Thread safe.

Public function Virtual

IRHIComputeContext *

 

RHIGetDefaultAsyncComputeContext()

FlushType: Thread safe.

Public function Virtual

IRHICommandContext *

 

RHIGetDefaultContext()

FlushType: Thread safe.

Public function Virtual

uint32

 

RHIGetGPUFrameCycles()

FlushType: Thread safe.

Public function Virtual

void *

 

RHIGetNativeDevice()

FlushType: Flush RHI Thread.

Public function Virtual

bool

 

RHIGetRenderQueryResult

(
    FRHIRenderQuery* RenderQuery,
    uint64& OutResult,
    bool bWait
)

CAUTION: Even though this is marked as threadsafe, it is only valid to call from the render thread.

Public function Virtual

void

 

RHIGetResourceInfo

(
    FRHITexture* Ref,
    FRHIResourceInfo& OutInfo
)

FlushType: Thread safe.

Public function Virtual

void

 

RHIGetSupportedResolution

(
    uint32& Width,
    uint32& Height
)

FlushType: Thread safe.

Public function Virtual

void

 

RHIGetTextureMemoryStats

(
    FTextureMemoryStats& OutStats
)

FlushType: Thread safe.

Public function Virtual

bool

 

RHIGetTextureMemoryVisualizeData

(
    FColor* TextureData,
    int32 SizeX,
    int32 SizeY,
    int32 Pitch,
    int32 PixelSize
)

FlushType: Flush Immediate.

Public function Virtual

FTexture2DRHIRef

 

RHIGetViewportBackBuffer

(
    FRHIViewport* Viewport
)

With RHI thread, this is the current backbuffer from the perspective of the render thread.

Public function Virtual

bool

 

RHIIsRenderingSuspended()

FlushType: Flush Immediate.

Public function Virtual

void *

 

RHILockStagingBuffer

(
    FRHIStagingBuffer* StagingBuffer,
    uint32 Offset,
    uint32 SizeRHI
)

Lock a staging buffer to read contents on the CPU that were written by the GPU, without having to stall.

Public function Virtual

void *

 

RHILockTexture2D

(
    FRHITexture2D* Texture,
    uint32 MipIndex,
    EResourceLockMode LockMode,
    uint32& DestStride,
    bool bLockWithinMiptail
)

FlushType: Flush RHI Thread.

Public function Virtual

void *

 

RHILockTexture2DArray

(
    FRHITexture2DArray* Texture,
    uint32 TextureIndex,
    uint32 MipIndex,
    EResourceLockMode LockMode,
    uint32& DestStride,
    bool bLockWithinMiptail
)

FlushType: Flush RHI Thread.

Public function Virtual

void *

 

RHILockTextureCubeFace

(
    FRHITextureCube* Texture,
    uint32 FaceIndex,
    uint32 ArrayIndex,
    uint32 MipIndex,
    EResourceLockMode LockMode,
    uint32& DestStride,
    bool bLockWithinMiptail
)

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHIMapStagingSurface

(
    FRHITexture* Texture,
    FRHIGPUFence* Fence,
    void*& OutData,
    int32& OutWidth,
    int32& OutHeight,
    uint32 GPUIndex
)

FlushType: Flush Immediate (seems wrong)

Public function Virtual

void

 

RHIMapStagingSurface_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHITexture* Texture,
    FRHIGPUFence* Fence,
    void*& OutData,
    int32& OutWidth,
    int32& OutHeight
)

Public function Virtual

void

 

RHIRead3DSurfaceFloatData

(
    FRHITexture* Texture,
    FIntRect Rect,
    FIntPoint ZMinMax,
    TArray< FFloat16Color >& OutData
)

FlushType: Flush Immediate (seems wrong)

Public function Virtual

void

 

RHIReadSurfaceData

(
    FRHITexture* Texture,
    FIntRect Rect,
    TArray< FLinearColor >& OutData,
    FReadSurfaceDataFlags InFlags
)

Default fallback; will not work for non-8-bit surfaces and it's extremely slow.

Public function Virtual

void

 

RHIReadSurfaceData

(
    FRHITexture* Texture,
    FIntRect Rect,
    TArray< FColor >& OutData,
    FReadSurfaceDataFlags InFlags
)

FlushType: Flush Immediate (seems wrong)

Public function Virtual

void

 

RHIReadSurfaceFloatData

(
    FRHITexture* Texture,
    FIntRect Rect,
    TArray< FFloat16Color >& OutData,
    ECubeFace CubeFace,
    int32 ArrayIndex,
    int32 MipIndex
)

FlushType: Flush Immediate (seems wrong)

Public function Virtual

void

 

RHIReleaseThreadOwnership()

FlushType: Flush RHI Thread.

Public function Virtual Const

bool

 

RHIRequiresComputeGenerateMips()

Public function Virtual

void

 

RHIResizeViewport

(
    FRHIViewport* Viewport,
    uint32 SizeX,
    uint32 SizeY,
    bool bIsFullscreen,
    EPixelFormat PreferredPixelFormat
)

Public function Virtual

void

 

RHIResizeViewport

(
    FRHIViewport* Viewport,
    uint32 SizeX,
    uint32 SizeY,
    bool bIsFullscreen
)

Must be called from the main thread. FlushType: Thread safe

Public function Virtual

void

 

RHIResumeRendering()

FlushType: Thread safe.

Public function Virtual

void

 

RHISubmitCommandsAndFlushGPU()

Kicks the current frame and makes sure GPU is actively working on them FlushType: Flush Immediate (copied from RHIBlockUntilGPUIdle)

Public function Virtual

void

 

RHISuspendRendering()

Operations to suspend title rendering and yield control to the system FlushType: Thread safe

Public function Virtual

void

 

RHITick

(
    float DeltaTime
)

Must be called from the main thread. FlushType: Thread safe

Public function Virtual

void

 

RHITransferIndexBufferUnderlyingResource

(
    FRHIIndexBuffer* DestIndexBuffer,
    FRHIIndexBuffer* SrcIndexBuffer
)

Transfer metadata and underlying resource from src to dest and release any resource owned by dest.

Public function Virtual

void

 

RHITransferVertexBufferUnderlyingResource

(
    FRHIVertexBuffer* DestVertexBuffer,
    FRHIVertexBuffer* SrcVertexBuffer
)

Transfer metadata and underlying resource from src to dest and release any resource owned by dest.

Public function Virtual

void

 

RHIUnlockStagingBuffer

(
    FRHIStagingBuffer* StagingBuffer
)

Unlock a staging buffer previously locked with RHILockStagingBuffer.

Public function Virtual

void

 

RHIUnlockTexture2D

(
    FRHITexture2D* Texture,
    uint32 MipIndex,
    bool bLockWithinMiptail
)

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHIUnlockTexture2DArray

(
    FRHITexture2DArray* Texture,
    uint32 TextureIndex,
    uint32 MipIndex,
    bool bLockWithinMiptail
)

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHIUnlockTextureCubeFace

(
    FRHITextureCube* Texture,
    uint32 FaceIndex,
    uint32 ArrayIndex,
    uint32 MipIndex,
    bool bLockWithinMiptail
)

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHIUnmapStagingSurface

(
    FRHITexture* Texture,
    uint32 GPUIndex
)

FlushType: Flush Immediate (seems wrong)

Public function Virtual

void

 

RHIUnmapStagingSurface_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHITexture* Texture
)

Public function Virtual

void

 

RHIUpdateShaderResourceView

(
    FRHIShaderResourceView* SRV,
    FRHIIndexBuffer* IndexBuffer
)

Public function Virtual

void

 

RHIUpdateShaderResourceView

(
    FRHIShaderResourceView* SRV,
    FRHIVertexBuffer* VertexBuffer,
    uint32 Stride,
    uint8 Format
)

Must be called on RHI thread timeline Make sure to call RHIThreadFence(true) afterwards so that parallel translation doesn't refer old resources

Public function Virtual

void

 

RHIUpdateTexture2D

(
    FRHITexture2D* Texture,
    uint32 MipIndex,
    const FUpdateTextureRegion2D& UpdateRegion,
    uint32 SourcePitch,
    const uint8* SourceData
)

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHIUpdateTexture3D

(
    FRHITexture3D* Texture,
    uint32 MipIndex,
    const FUpdateTextureRegion3D& UpdateRegion,
    uint32 SourceRowPitch,
    uint32 SourceDepthPitch,
    const uint8* SourceData
)

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHIUpdateUniformBuffer

(
    FRHIUniformBuffer* UniformBufferRHI,
    const void* Contents
)

Public function Virtual

void

 

RHIVirtualTextureSetFirstMipInMemory

(
    FRHITexture2D* Texture,
    uint32 FirstMip
)

FlushType: Wait RHI Thread.

Public function Virtual

void

 

RHIVirtualTextureSetFirstMipVisible

(
    FRHITexture2D* Texture,
    uint32 FirstMip
)

FlushType: Wait RHI Thread.

Public function Virtual

void

 

Shutdown()

Shutdown the RHI; handle shutdown and resource destruction before the RHI's actual destructor is called (so that all resources of the RHI are still available for shutdown).

Public function Virtual

void

 

UnlockIndexBuffer_BottomOfPipe

(
    FRHICommandListImmediate& RHICmdList,
    FRHIIndexBuffer* IndexBuffer
)

Public function Virtual

void

 

UnlockStructuredBuffer_BottomOfPipe

(
    FRHICommandListImmediate& RHICmdList,
    FRHIStructuredBuffer* StructuredBuffer
)

Public function Virtual

void

 

UnlockTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHITexture2D* Texture,
    uint32 MipIndex,
    bool bLockWithinMiptail,
    bool bNeedsDefaultRHIFlush
)

Public function Virtual

void

 

UnlockVertexBuffer_BottomOfPipe

(
    FRHICommandListImmediate& RHICmdList,
    FRHIVertexBuffer* VertexBuffer
)

Public function Virtual

void

 

UpdateTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHITexture2D* Texture,
    uint32 MipIndex,
    const FUpdateTextureRegion2D& UpdateRegion,
    uint32 SourcePitch,
    const uint8* SourceData
)

Public function Virtual

void

 

UpdateTexture3D_RenderThread

(
    FRHICommandListImmediate& RHICmdList,
    FRHITexture3D* Texture,
    uint32 MipIndex,
    const FUpdateTextureRegion3D& UpdateRegion,
    uint32 SourceRowPitch,
    uint32 SourceDepthPitch,
    const uint8* SourceData
)

Constants

Name

Description

HMDVulkanExtensions

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback