FDynamicRHI

The interface which is implemented by the dynamically bound RHI.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

RHI

Header

/Engine/Source/Runtime/RHI/Public/DynamicRHI.h

Include

#include "DynamicRHI.h"

Syntax

class FDynamicRHI

Remarks

The interface which is implemented by the dynamically bound RHI.

Variables

Name Description

Protected variable

TArray< uint32 ...

 

PixelFormatBlockBytes

Destructors

Name Description

Public function Virtual

~FDynamicRHI()

Declare a virtual destructor, so the dynamic RHI can be deleted without knowing its type.

Functions

Name Description

Public function Virtual

FTexture2DRH...

 

AsyncReallocateTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture2D* Texture2D,
    int32 NewMipCount,
    int32 NewSizeX,
    int32 NewSizeY,
    FThreadSafeCounter* RequestSta...
)

Public function Virtual

FUpdateTextu...

 

BeginUpdateTexture3D_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture3D* Texture,
    uint32 MipIndex,
    const FUpdateTextureRegion3D& Upda...
)

Public function Virtual

ETextureReal...

 

CancelAsyncReallocateTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture2D* Texture2D,
    bool bBlockUntilCompleted
)

Public function Virtual Const

bool

 

CheckGpuHeartbeat()

Checks if the GPU is still alive.

Public function Virtual

FIndexBuffer...

 

CreateAndLockIndexBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    uint32 Stride,
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo,
    void*& OutDataBuffer
)

Public function Virtual

FVertexBuffe...

 

CreateAndLockVertexBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo,
    void*& OutDataBuffer
)

Public function Virtual

FComputeShad...

 

CreateComputeShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    const TArray< uint8 >& Code
)

Public function Virtual

FComputeShad...

 

CreateComputeShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

Public function Virtual

FDomainShade...

 

CreateDomainShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

Public function Virtual

FDomainShade...

 

CreateDomainShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    const TArray< uint8 >& Code
)

Public function Virtual

FGeometrySha...

 

CreateGeometryShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    const TArray< uint8 >& Code
)

Public function Virtual

FGeometrySha...

 

CreateGeometryShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

Public function Virtual

FGeometrySha...

 

CreateGeometryShaderWithStreamOutput_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    const TArray< uint8 >& Code,
    const FStreamOutElementList& Eleme...,
    uint32 NumStrides,
    const uint32* Strides,
    int32 RasterizedStream
)

Public function Virtual

FGeometrySha...

 

CreateGeometryShaderWithStreamOutput_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    const FStreamOutElementList& Eleme...,
    uint32 NumStrides,
    const uint32* Strides,
    int32 RasterizedStream,
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

Public function Virtual

FHullShaderR...

 

CreateHullShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    const TArray< uint8 >& Code
)

Public function Virtual

FHullShaderR...

 

CreateHullShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

Public function Virtual

FIndexBuffer...

 

CreateIndexBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    uint32 Stride,
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo
)

Public function Virtual

FPixelShader...

 

CreatePixelShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    const TArray< uint8 >& Code
)

Public function Virtual

FPixelShader...

 

CreatePixelShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

Public function Virtual

FShaderResou...

 

CreateShaderResourceView_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIIndexBuffer* Buffer
)

Public function Virtual

FShaderResou...

 

CreateShaderResourceView_RenderThread

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

Public function Virtual

FStructuredB...

 

CreateStructuredBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    uint32 Stride,
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo
)

Public function Virtual

FVertexBuffe...

 

CreateVertexBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo
)

Public function Virtual

FVertexShade...

 

CreateVertexShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

Public function Virtual

FVertexShade...

 

CreateVertexShader_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    const TArray< uint8 >& Code
)

Public function Virtual

void

 

EnableIdealGPUCaptureOptions

(
    bool bEnable
)

Utilities.

Public function Virtual

void

 

EndMultiUpdateTexture3D_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    TArray< FUpdateTexture3DData >& Up...
)

Public function Virtual

void

 

EndUpdateTexture3D_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FUpdateTexture3DData& UpdateData
)

Public function Virtual

ETextureReal...

 

FinalizeAsyncReallocateTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture2D* Texture2D,
    bool bBlockUntilCompleted
)

Public function Virtual

void

 

FlushPendingLogs()

Some RHIs can have pending messages/logs for error tracking, or debug modes.

Public function

const TCHAR ...

 

GetName()

Public function

void

 

Init()

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

Public function

void

 

InitPixelFormatInfo

(
    const TArray< uint32 >& PixelForma...
)

Called after PostInit to initialize the pixel format info, which is needed for some commands default implementations

Public function Virtual

void *

 

LockIndexBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIIndexBuffer* IndexBuffer,
    uint32 Offset,
    uint32 SizeRHI,
    EResourceLockMode LockMode
)

Public function Virtual

void *

 

LockStagingBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIStagingBuffer* StagingBuff...,
    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 *

 

LockTexture2D_RenderThread

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

Public function Virtual

void *

 

LockVertexBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    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

void

 

RHIAcquireThreadOwnership()

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHIAcquireTransientResource_RenderThread

(
    FRHITexture* Texture
)

Public function Virtual

void

 

RHIAcquireTransientResource_RenderThread

(
    FRHIVertexBuffer* Buffer
)

Public function Virtual

void

 

RHIAcquireTransientResource_RenderThread

(
    FRHIStructuredBuffer* Buffer
)

Public function

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

FTexture2DRH...

 

RHIAsyncCreateTexture2D

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

FlushType: Thread safe.

Public function

FTexture2DRH...

 

RHIAsyncReallocateTexture2D

(
    FRHITexture2D* Texture2D,
    int32 NewMipCount,
    int32 NewSizeX,
    int32 NewSizeY,
    FThreadSafeCounter* RequestSta...
)

Starts an asynchronous texture reallocation.

Public function Virtual

void

 

RHIBeginSuspendRendering()

Tells the RHI we're about to suspend it.

Public function

void

 

RHIBindDebugLabelName

(
    FRHITexture* Texture,
    const TCHAR* Name
)

FlushType: Thread safe.

Public function Virtual

void

 

RHIBindDebugLabelName

(
    FRHIUnorderedAccessView* Unord...,
    const TCHAR* Name
)

Public function

void

 

RHIBlockUntilGPUIdle()

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

Public function

uint64

 

RHICalcTexture2DPlatformSize

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

FlushType: Thread safe.

Public function

uint64

 

RHICalcTexture3DPlatformSize

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

FlushType: Thread safe.

Public function

uint64

 

RHICalcTextureCubePlatformSize

(
    uint32 Size,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    uint32& OutAlign
)

FlushType: Thread safe.

Public function Virtual

void

 

RHICalibrateTimers()

Public function

ETextureReal...

 

RHICancelAsyncReallocateTexture2D

(
    FRHITexture2D* Texture2D,
    bool bBlockUntilCompleted
)

FlushType: Wait RHI Thread.

Public function

uint32

 

RHIComputeMemorySize

(
    FRHITexture* TextureRHI
)

FlushType: Thread safe.

Public function

void

 

RHICopySharedMips

(
    FRHITexture2D* DestTexture2D,
    FRHITexture2D* SrcTexture2D
)

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHICopySubTextureRegion

(
    FRHITexture2D* SourceTexture,
    FRHITexture2D* DestinationText...,
    FBox2D SourceBox,
    FBox2D DestinationBox
)

Public function Virtual

void

 

RHICopySubTextureRegion_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture2D* SourceTexture,
    FRHITexture2D* DestinationText...,
    FBox2D SourceBox,
    FBox2D DestinationBox
)

Copy the source box pixels in the destination box texture, return true if implemented for the current platform

Public function

void

 

RHICopyVertexBuffer

(
    FRHIVertexBuffer* SourceBuffer,
    FRHIVertexBuffer* DestBuffer
)

FlushType: Flush Immediate (seems dangerous)

Public function

FBlendStateR...

 

RHICreateBlendState

(
    const FBlendStateInitializerRHI& I...
)

FlushType: Thread safe.

Public function

FBoundShader...

 

RHICreateBoundShaderState

(
    FRHIVertexDeclaration* VertexD...,
    FRHIVertexShader* VertexShader,
    FRHIHullShader* HullShader,
    FRHIDomainShader* DomainShader,
    FRHIPixelShader* PixelShader,
    FRHIGeometryShader* GeometrySh...
)

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

Public function Virtual

FComputeFenc...

 

RHICreateComputeFence

(
    const FName& Name
)

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

Public function Virtual

TRefCountPtr...

 

RHICreateComputePipelineState

(
    FRHIComputeShader* ComputeShad...,
    FRHIPipelineBinaryLibrary* Pip...
)

Public function Virtual

TRefCountPtr...

 

RHICreateComputePipelineState

(
    FRHIComputeShader* ComputeShad...
)

Public function

FComputeShad...

 

RHICreateComputeShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function Virtual

FComputeShad...

 

RHICreateComputeShader

(
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

FlushType: Wait RHI Thread.

Public function

FDepthStenci...

 

RHICreateDepthStencilState

(
    const FDepthStencilStateInitializer...
)

FlushType: Thread safe.

Public function

FDomainShade...

 

RHICreateDomainShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function Virtual

FDomainShade...

 

RHICreateDomainShader

(
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

FlushType: Wait RHI Thread.

Public function

FGeometrySha...

 

RHICreateGeometryShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function Virtual

FGeometrySha...

 

RHICreateGeometryShader

(
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

FlushType: Wait RHI Thread.

Public function Virtual

FGeometrySha...

 

RHICreateGeometryShaderWithStreamOutput

(
    const FStreamOutElementList& Eleme...,
    uint32 NumStrides,
    const uint32* Strides,
    int32 RasterizedStream,
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

FlushType: Wait RHI Thread.

Public function

FGeometrySha...

 

RHICreateGeometryShaderWithStreamOutput

(
    const TArray< uint8 >& Code,
    const FStreamOutElementList& Eleme...,
    uint32 NumStrides,
    const uint32* Strides,
    int32 RasterizedStream
)

FlushType: Wait RHI Thread.

Public function Virtual

FGPUFenceRHI...

 

RHICreateGPUFence

(
    const FName& Name
)

Public function Virtual

FGraphicsPip...

 

RHICreateGraphicsPipelineState

(
    const FGraphicsPipelineStateInitial...
)

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

Public function Virtual

FGraphicsPip...

 

RHICreateGraphicsPipelineState

(
    const FGraphicsPipelineStateInitial...,
    FRHIPipelineBinaryLibrary* Pip...
)

Public function Virtual

FHullShaderR...

 

RHICreateHullShader

(
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

FlushType: Wait RHI Thread.

Public function

FHullShaderR...

 

RHICreateHullShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function

FIndexBuffer...

 

RHICreateIndexBuffer

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

FlushType: Wait RHI Thread.

Public function

FPixelShader...

 

RHICreatePixelShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function Virtual

FPixelShader...

 

RHICreatePixelShader

(
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

FlushType: Wait RHI Thread.

Public function

FRasterizerS...

 

RHICreateRasterizerState

(
    const FRasterizerStateInitializerRH...
)

FlushType: Thread safe.

Public function

FRenderQuery...

 

RHICreateRenderQuery

(
    ERenderQueryType QueryType
)

FlushType: Wait RHI Thread.

Public function Virtual

FRenderQuery...

 

RHICreateRenderQuery_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    ERenderQueryType QueryType
)

Public function Virtual

FRenderQuery...

 

RHICreateRenderQueryPool

(
    ERenderQueryType QueryType,
    uint32 NumQueries
)

FlushType: Must be Thread-Safe.

Public function Virtual

FStructuredB...

 

RHICreateRTWriteMaskBuffer

(
    FRHITexture2D* RenderTarget
)

Creates an FStructuredBuffer for the RT write mask of a render target

Public function

FSamplerStat...

 

RHICreateSamplerState

(
    const FSamplerStateInitializerRHI&...
)

FlushType: Thread safe.

Public function Virtual

FRHIShaderLi...

 

RHICreateShaderLibrary

(
    EShaderPlatform Platform,
    FString const& FilePath,
    FString const& Name
)

FlushType: Must be Thread-Safe.

Public function Virtual

FRHIShaderLi...

 

RHICreateShaderLibrary_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    EShaderPlatform Platform,
    FString FilePath,
    FString Name
)

Public function

FShaderResou...

 

RHICreateShaderResourceView

(
    FRHIVertexBuffer* VertexBuffer,
    uint32 Stride,
    uint8 Format
)

FlushType: Wait RHI Thread.

Public function

FShaderResou...

 

RHICreateShaderResourceView

(
    FRHIStructuredBuffer* Structur...
)

FlushType: Wait RHI Thread.

Public function

FShaderResou...

 

RHICreateShaderResourceView

(
    FRHIIndexBuffer* Buffer
)

FlushType: Wait RHI Thread.

Public function

FShaderResou...

 

RHICreateShaderResourceView

(
    FRHITexture* Texture2DRHI,
    const FRHITextureSRVCreateInfo& Cr...
)

FlushType: Wait RHI Thread.

Public function Virtual

FShaderResou...

 

RHICreateShaderResourceView_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIIndexBuffer* Buffer
)

Public function Virtual

FShaderResou...

 

RHICreateShaderResourceView_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIStructuredBuffer* Structur...
)

Public function Virtual

FShaderResou...

 

RHICreateShaderResourceView_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture* Texture,
    const FRHITextureSRVCreateInfo& Cr...
)

Public function Virtual

FShaderResou...

 

RHICreateShaderResourceView_RenderThread

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

Public function Virtual

FStagingBuff...

 

RHICreateStagingBuffer()

FlushType: Thread safe.

Public function

FStructuredB...

 

RHICreateStructuredBuffer

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

FlushType: Wait RHI Thread.

Public function

FTexture2DRH...

 

RHICreateTexture2D

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

FlushType: Wait RHI Thread.

Public function Virtual

FTexture2DRH...

 

RHICreateTexture2D_RenderThread

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

Public function

FTexture2DAr...

 

RHICreateTexture2DArray

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

FlushType: Wait RHI Thread.

Public function Virtual

FTexture2DAr...

 

RHICreateTexture2DArray_RenderThread

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

Public function

FTexture3DRH...

 

RHICreateTexture3D

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

FlushType: Wait RHI Thread.

Public function Virtual

FTexture3DRH...

 

RHICreateTexture3D_RenderThread

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

Public function

FTextureCube...

 

RHICreateTextureCube

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

FlushType: Wait RHI Thread.

Public function Virtual

FTextureCube...

 

RHICreateTextureCube_RenderThread

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

Public function

FTextureCube...

 

RHICreateTextureCubeArray

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

FlushType: Wait RHI Thread.

Public function Virtual

FTextureCube...

 

RHICreateTextureCubeArray_RenderThread

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

Public function Virtual

FTexture2DRH...

 

RHICreateTextureExternal2D

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

FlushType: Wait RHI Thread.

Public function Virtual

FTexture2DRH...

 

RHICreateTextureExternal2D_RenderThread

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

Public function

FTextureRefe...

 

RHICreateTextureReference

(
    FLastRenderTimeContainer* Last...
)

FlushType: Wait RHI Thread.

Public function Virtual

FTextureRefe...

 

RHICreateTextureReference_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FLastRenderTimeContainer* Last...
)

Public function

FUniformBuff...

 

RHICreateUniformBuffer

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

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

Public function

FUnorderedAc...

 

RHICreateUnorderedAccessView

(
    FRHIIndexBuffer* IndexBuffer,
    uint8 Format
)

FlushType: Wait RHI Thread.

Public function

FUnorderedAc...

 

RHICreateUnorderedAccessView

(
    FRHITexture* Texture,
    uint32 MipLevel
)

FlushType: Wait RHI Thread.

Public function

FUnorderedAc...

 

RHICreateUnorderedAccessView

(
    FRHIStructuredBuffer* Structur...,
    bool bUseUAVCounter,
    bool bAppendBuffer
)

FlushType: Wait RHI Thread.

Public function

FUnorderedAc...

 

RHICreateUnorderedAccessView

(
    FRHIVertexBuffer* VertexBuffer,
    uint8 Format
)

FlushType: Wait RHI Thread.

Public function Virtual

FUnorderedAc...

 

RHICreateUnorderedAccessView_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIStructuredBuffer* Structur...,
    bool bUseUAVCounter,
    bool bAppendBuffer
)

Public function Virtual

FUnorderedAc...

 

RHICreateUnorderedAccessView_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIIndexBuffer* IndexBuffer,
    uint8 Format
)

Public function Virtual

FUnorderedAc...

 

RHICreateUnorderedAccessView_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIVertexBuffer* VertexBuffer,
    uint8 Format
)

Public function Virtual

FUnorderedAc...

 

RHICreateUnorderedAccessView_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture* Texture,
    uint32 MipLevel
)

Public function

FVertexBuffe...

 

RHICreateVertexBuffer

(
    uint32 Size,
    uint32 InUsage,
    FRHIResourceCreateInfo& CreateInfo
)

FlushType: Wait RHI Thread.

Public function

FVertexDecla...

 

RHICreateVertexDeclaration

(
    const FVertexDeclarationElementList...
)

FlushType: Wait RHI Thread.

Public function Virtual

FVertexShade...

 

RHICreateVertexShader

(
    FRHIShaderLibrary* Library,
    FSHAHash Hash
)

FlushType: Wait RHI Thread.

Public function

FVertexShade...

 

RHICreateVertexShader

(
    const TArray< uint8 >& Code
)

FlushType: Wait RHI Thread.

Public function

FViewportRHI...

 

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

 

RHIDiscardTransientResource_RenderThread

(
    FRHIStructuredBuffer* Buffer
)

Public function Virtual

void

 

RHIDiscardTransientResource_RenderThread

(
    FRHIVertexBuffer* Buffer
)

Public function Virtual

void

 

RHIDiscardTransientResource_RenderThread

(
    FRHITexture* Texture
)

Public function Virtual

bool

 

RHIEnqueueCompress

(
    uint8_t* SrcBuffer,
    uint8_t* DestBuffer,
    int UnCompressedSize,
    void* ErrorCodeBuffer
)

Public function Virtual

bool

 

RHIEnqueueDecompress

(
    uint8_t* SrcBuffer,
    uint8_t* DestBuffer,
    int CompressedSize,
    void* ErrorCodeBuffer
)

FlushType: Flush Immediate.

Public function

void

 

RHIExecuteCommandList

(
    FRHICommandList* CmdList
)

FlushType: Wait RHI Thread.

Public function

ETextureReal...

 

RHIFinalizeAsyncReallocateTexture2D

(
    FRHITexture2D* Texture2D,
    bool bBlockUntilCompleted
)

FlushType: Wait RHI Thread.

Public function

void

 

RHIFlushResources()

Flush driver resources.

Public function

bool

 

RHIGetAvailableResolutions

(
    FScreenResolutionArray& Resolution...,
    bool bIgnoreRefreshRate
)

FlushType: Thread safe.

Public function

IRHICommandC...

 

RHIGetCommandContextContainer

(
    int32 Index,
    int32 Num,
    FRHIGPUMask GPUMask
)

Public function

IRHICommandC...

 

RHIGetCommandContextContainer

(
    int32 Index,
    int32 Num
)

FlushType: Thread safe.

Public function Virtual

IRHIComputeC...

 

RHIGetDefaultAsyncComputeContext()

FlushType: Thread safe.

Public function

IRHIComputeC...

 

RHIGetDefaultAsyncComputeContext

(
    FRHIGPUMask GPUMask
)

Public function

IRHICommandC...

 

RHIGetDefaultContext()

FlushType: Thread safe.

Public function

IRHICommandC...

 

RHIGetDefaultContext

(
    FRHIGPUMask GPUMask
)

Public function Virtual

FTexture2DRH...

 

RHIGetFMaskTexture

(
    FRHITexture* SourceTextureRHI
)

Public function

uint32

 

RHIGetGPUFrameCycles()

FlushType: Thread safe.

Public function

void *

 

RHIGetNativeDevice()

FlushType: Flush RHI Thread.

Public function Virtual

uint16

 

RHIGetPlatformTextureMaxSampleCount()

Public function

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

void

 

RHIGetResourceInfo

(
    FRHITexture* Ref,
    FRHIResourceInfo& OutInfo
)

FlushType: Thread safe.

Public function

void

 

RHIGetSupportedResolution

(
    uint32& Width,
    uint32& Height
)

FlushType: Thread safe.

Public function

void

 

RHIGetTextureMemoryStats

(
    FTextureMemoryStats& OutStats
)

FlushType: Thread safe.

Public function

bool

 

RHIGetTextureMemoryVisualizeData

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

FlushType: Flush Immediate.

Public function

FTexture2DRH...

 

RHIGetViewportBackBuffer

(
    FRHIViewport* Viewport
)

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

Public function Virtual

FUnorderedAc...

 

RHIGetViewportBackBufferUAV

(
    FRHIViewport* ViewportRHI
)

Public function Virtual

uint32

 

RHIGetViewportNextPresentGPUIndex

(
    FRHIViewport* Viewport
)

FlushType: Thread safe.

Public function Virtual

bool

 

RHIIsRenderingSuspended()

FlushType: Flush Immediate.

Public function Virtual

bool

 

RHIIsTypedUAVLoadSupported

(
    EPixelFormat PixelFormat
)

Public function

void *

 

RHILockIndexBuffer

(
    FRHIIndexBuffer* IndexBuffer,
    uint32 Offset,
    uint32 Size,
    EResourceLockMode LockMode
)

FlushType: Flush RHI Thread.

Public function Virtual

void *

 

RHILockStagingBuffer

(
    FRHIStagingBuffer* StagingBuff...,
    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

void *

 

RHILockStructuredBuffer

(
    FRHIStructuredBuffer* Structur...,
    uint32 Offset,
    uint32 SizeRHI,
    EResourceLockMode LockMode
)

FlushType: Flush RHI Thread.

Public function

void *

 

RHILockTexture2D

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

FlushType: Flush RHI Thread.

Public function

void *

 

RHILockTexture2DArray

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

FlushType: Flush RHI Thread.

Public function

void *

 

RHILockTextureCubeFace

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

FlushType: Flush RHI Thread.

Public function Virtual

void *

 

RHILockTextureCubeFace_RenderThread

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

Public function

void *

 

RHILockVertexBuffer

(
    FRHIVertexBuffer* VertexBuffer,
    uint32 Offset,
    uint32 SizeRHI,
    EResourceLockMode LockMode
)

FlushType: Flush RHI Thread.

Public function

void

 

RHIMapStagingSurface

(
    FRHITexture* Texture,
    void*& OutData,
    int32& OutWidth,
    int32& OutHeight
)

FlushType: Flush Immediate (seems wrong)

Public function Virtual

void

 

RHIMapStagingSurface_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture* Texture,
    void*& OutData,
    int32& OutWidth,
    int32& OutHeight
)

Public function Virtual

void

 

RHIPerFrameRHIFlushComplete()

FlushType: called from render thread when RHI thread is flushed.

Public function Virtual

void

 

RHIPollRenderQueryResults()

Public function

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

void

 

RHIReadSurfaceData

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

FlushType: Flush Immediate (seems wrong)

Public function

void

 

RHIReadSurfaceFloatData

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

FlushType: Flush Immediate (seems wrong)

Public function Virtual

void

 

RHIReadSurfaceFloatData_RenderThread

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

Public function

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

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

void

 

RHISetStreamOutTargets

(
    uint32 NumTargets,
    FRHIVertexBuffer*const* V...,
    const uint32* Offsets
)

FlushType: Flush Immediate (seems wrong)

Public function Virtual

void

 

RHISignalFlipEvent()

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

void

 

RHITick

(
    float DeltaTime
)

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

Public function Virtual

void

 

RHITransferIndexBufferUnderlyingResource

(
    FRHIIndexBuffer* DestIndexBuff...,
    FRHIIndexBuffer* SrcIndexBuffe...
)

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

Public function Virtual

void

 

RHITransferTexture

(
    FRHITexture2D* Texture,
    FIntRect Rect,
    uint32 SrcGPUIndex,
    uint32 DestGPUIndex,
    bool PullData
)

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHITransferVertexBufferUnderlyingResource

(
    FRHIVertexBuffer* DestVertexBu...,
    FRHIVertexBuffer* SrcVertexBuf...
)

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

Public function

void

 

RHIUnlockIndexBuffer

(
    FRHIIndexBuffer* IndexBuffer
)

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHIUnlockStagingBuffer

(
    FRHIStagingBuffer* StagingBuff...
)

Unlock a staging buffer previously locked with RHILockStagingBuffer.

Public function

void

 

RHIUnlockStructuredBuffer

(
    FRHIStructuredBuffer* Structur...
)

FlushType: Flush RHI Thread.

Public function

void

 

RHIUnlockTexture2D

(
    FRHITexture2D* Texture,
    uint32 MipIndex,
    bool bLockWithinMiptail
)

FlushType: Flush RHI Thread.

Public function

void

 

RHIUnlockTexture2DArray

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

FlushType: Flush RHI Thread.

Public function

void

 

RHIUnlockTextureCubeFace

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

FlushType: Flush RHI Thread.

Public function Virtual

void

 

RHIUnlockTextureCubeFace_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITextureCube* Texture,
    uint32 FaceIndex,
    uint32 ArrayIndex,
    uint32 MipIndex,
    bool bLockWithinMiptail
)

Public function

void

 

RHIUnlockVertexBuffer

(
    FRHIVertexBuffer* VertexBuffer
)

FlushType: Flush RHI Thread.

Public function

void

 

RHIUnmapStagingSurface

(
    FRHITexture* Texture
)

FlushType: Flush Immediate (seems wrong)

Public function Virtual

void

 

RHIUnmapStagingSurface_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture* Texture
)

Public function Virtual

void

 

RHIUpdateFromBufferTexture2D

(
    FRHITexture2D* Texture,
    uint32 MipIndex,
    const FUpdateTextureRegion2D& Upda...,
    uint32 SourcePitch,
    FRHIStructuredBuffer* Buffer,
    uint32 BufferOffset
)

FlushType: Flush RHI Thread.

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

void

 

RHIUpdateTexture2D

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

FlushType: Flush RHI Thread.

Public function

void

 

RHIUpdateTexture3D

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

FlushType: Flush RHI Thread.

Public function

void

 

RHIUpdateUniformBuffer

(
    FRHIUniformBuffer* UniformBuff...,
    const void* Contents
)

Public function

void

 

RHIVirtualTextureSetFirstMipInMemory

(
    FRHITexture2D* Texture,
    uint32 FirstMip
)

FlushType: Wait RHI Thread.

Public function

void

 

RHIVirtualTextureSetFirstMipVisible

(
    FRHITexture2D* Texture,
    uint32 FirstMip
)

FlushType: Wait RHI Thread.

Public function Virtual

FRHIFlipDeta...

 

RHIWaitForFlip

(
    double TimeoutInSeconds
)

Public function

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_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIIndexBuffer* IndexBuffer
)

Public function Virtual

void

 

UnlockStagingBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIStagingBuffer* StagingBuff...
)

Unlock a staging buffer previously locked with LockStagingBuffer_RenderThread.

Public function Virtual

void

 

UnlockTexture2D_RenderThread

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

Public function Virtual

void

 

UnlockVertexBuffer_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHIVertexBuffer* VertexBuffer
)

Public function Virtual

void

 

UpdateFromBufferTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture2D* Texture,
    uint32 MipIndex,
    const FUpdateTextureRegion2D& Upda...,
    uint32 SourcePitch,
    FRHIStructuredBuffer* Buffer,
    uint32 BufferOffset
)

Public function Virtual

void

 

UpdateTexture2D_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture2D* Texture,
    uint32 MipIndex,
    const FUpdateTextureRegion2D& Upda...,
    uint32 SourcePitch,
    const uint8* SourceData
)

Public function Virtual

void

 

UpdateTexture3D_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture3D* Texture,
    uint32 MipIndex,
    const FUpdateTextureRegion3D& Upda...,
    uint32 SourceRowPitch,
    uint32 SourceDepthPitch,
    const uint8* SourceData
)

Public function Virtual

void

 

VirtualTextureSetFirstMipInMemory_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture2D* Texture,
    uint32 FirstMip
)

Public function Virtual

void

 

VirtualTextureSetFirstMipVisible_RenderThread

(
    FRHICommandListImmediate& RHICmdLi...,
    FRHITexture2D* Texture,
    uint32 FirstMip
)

Deprecated Functions

Name Description

Public function Virtual

FTexture2DAr...

 

RHICreateTexture2DArray

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

RHICreateTexture2DArray now takes NumSamples

Public function Virtual

FTexture2DAr...

 

RHICreateTexture2DArray_RenderThread

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

RHICreateTexture2DArray_RenderThread now takes NumSamples

Public function Virtual

void

 

RHIGenerateMips

(
    FRHITexture* Texture
)

This function is deprecated and will be removed in future releases. Renderer version implemented.

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