Navigation
API > API/Runtime > API/Runtime/RHI
The interface which is implemented by the dynamically bound RHI.
| Name | FDynamicRHI |
| Type | class |
| Header File | /Engine/Source/Runtime/RHI/Public/DynamicRHI.h |
| Include Path | #include "DynamicRHI.h" |
Syntax
class FDynamicRHI
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FDynamicRHI() |
Declare a virtual destructor, so the dynamic RHI can be deleted without knowing its type. | DynamicRHI.h |
Structs
| Name | Remarks |
|---|---|
| FRHIEndFrameArgs | |
| FRHIFinalizeContextArgs | Finalizes (i.e. closes) the specified command context, returning the completed platform command list object. |
| FRHISubmitCommandListsArgs | Submits a batch of previously recorded/finalized command lists to the GPU. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FRHICalcTextureSizeResult | ::FRHICalcTextureSizeResult | DynamicRHI.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FTextureRHIRef AsyncReallocateTexture2D_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
DynamicRHI.h | ||
virtual void FlushPendingLogs() |
Some RHIs can have pending messages/logs for error tracking, or debug modes. | DynamicRHI.h | |
virtual ERHIInterfaceType GetInterfaceType() |
DynamicRHI.h | ||
const TCHAR * GetName() |
DynamicRHI.h | ||
virtual FDynamicRHI * GetNonValidationRHI() |
DynamicRHI.h | ||
void Init() |
Initializes the RHI; separate from IDynamicRHIModule::CreateRHI so that GDynamicRHI is set when it is called. | DynamicRHI.h | |
void InitPixelFormatInfo
(
const TArray< uint32 >& PixelFormatBlockBytesIn |
Called after PostInit to initialize the pixel format info, which is needed for some commands default implementations | DynamicRHI.h | |
virtual void * LockBuffer_BottomOfPipe
(
FRHICommandListBase& RHICmdList, |
Buffer Lock/Unlock. | DynamicRHI.h | |
virtual void * LockStagingBuffer_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Lock a staging buffer to read contents on the CPU that were written by the GPU, without having to stall. | DynamicRHI.h | |
virtual void PostInit() |
Called after the RHI is initialized; before the render thread is started. | DynamicRHI.h | |
virtual void RHIAcquireThreadOwnership () |
Acquires or releases ownership of the platform-specific rendering context for the calling thread. | DynamicRHI.h | |
void RHIAdvanceFrameForGetViewportBackBuffer
(
FRHIViewport* Viewport, |
Only relevant with an RHI thread, this advances the backbuffer for the purpose of GetViewportBackBuffer FlushType: Thread safe | DynamicRHI.h | |
virtual void RHIAliasTextureResources
(
FTextureRHIRef& DestTexture, |
DynamicRHI.h | ||
FTextureRHIRef RHIAsyncCreateTexture2D
(
uint32 SizeX, |
FlushType: Thread safe. | DynamicRHI.h | |
FTextureRHIRef RHIAsyncReallocateTexture2D
(
FRHITexture* Texture2D, |
Starts an asynchronous texture reallocation. | DynamicRHI.h | |
virtual void RHIBeginRenderQuery_TopOfPipe
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIBeginRenderQueryBatch_TopOfPipe
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIBeginSuspendRendering() |
Tells the RHI we're about to suspend it. | DynamicRHI.h | |
virtual FUpdateTexture3DData RHIBeginUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIBindDebugLabelName
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIBindDebugLabelName
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIBindDebugLabelName
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
void RHIBlockUntilGPUIdle() |
Blocks the CPU until the GPU catches up and goes idle. FlushType: Flush Immediate (seems wrong) | DynamicRHI.h | |
virtual FRayTracingClusterOperationSize RHICalcRayTracingClusterOperationSize
(
const FRayTracingClusterOperationInitializer& Initializer |
DynamicRHI.h | ||
virtual FRayTracingAccelerationStructureSize RHICalcRayTracingGeometrySize
(
const FRayTracingGeometryInitializer& Initializer |
DynamicRHI.h | ||
virtual FRayTracingAccelerationStructureSize RHICalcRayTracingSceneSize
(
const FRayTracingSceneInitializer& Initializer |
DynamicRHI.h | ||
FRHICalcTextureSizeResult RHICalcTexturePlatformSize
(
FRHITextureDesc const& Desc, |
FlushType: Thread safe. | DynamicRHI.h | |
virtual void RHICheckViewportHDRStatus
(
FRHIViewport* Viewport |
Tests the viewport to see if its HDR status has changed. This is usually tested after a window has been moved. | DynamicRHI.h | |
void RHICloseTranslateChain
(
FRHIFinalizeContextArgs&& Args, |
Close the current translate chain or ignore if we are not finalizing | DynamicRHI.h | |
uint32 RHIComputeMemorySize
(
FRHITexture* TextureRHI |
FlushType: Thread safe. | DynamicRHI.h | |
virtual uint64 RHIComputePrecachePSOHash
(
const FGraphicsPipelineStateInitializer& Initializer |
Compute the hash of the PSO initializer for PSO Precaching (only hash data relevant for the RHI specific PSO) | DynamicRHI.h | |
virtual uint64 RHIComputeStatePrecachePSOHash
(
const FGraphicsPipelineStateInitializer& Initializer |
Compute the hash of the state components of the PSO initializer for PSO Precaching (only hash data relevant for the RHI specific PSO) | DynamicRHI.h | |
virtual FTextureRHIRef RHICreateAliasedTexture
(
FTextureRHIRef& SourceTexture |
DynamicRHI.h | ||
virtual FAmplificationShaderRHIRef RHICreateAmplificationShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
FBlendStateRHIRef RHICreateBlendState
(
const FBlendStateInitializerRHI& Initializer |
FlushType: Thread safe. | DynamicRHI.h | |
FBoundShaderStateRHIRef RHICreateBoundShaderState
(
FRHIVertexDeclaration* VertexDeclaration, |
FlushType: Thread safe, but varies depending on the RHI. | DynamicRHI.h | |
FRHIBufferInitializer RHICreateBufferInitializer
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
FComputePipelineStateRHIRef RHICreateComputePipelineState
(
const FComputePipelineStateInitializer& Initializer |
FlushType: Thread safe. | DynamicRHI.h | |
FComputeShaderRHIRef RHICreateComputeShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
FDepthStencilStateRHIRef RHICreateDepthStencilState
(
const FDepthStencilStateInitializerRHI& Initializer |
FlushType: Thread safe. | DynamicRHI.h | |
FGeometryShaderRHIRef RHICreateGeometryShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
FGPUFenceRHIRef RHICreateGPUFence
(
const FName& Name |
DynamicRHI.h | ||
FGraphicsPipelineStateRHIRef RHICreateGraphicsPipelineState
(
const FGraphicsPipelineStateInitializer& Initializer |
FlushType: Thread safe. | DynamicRHI.h | |
virtual FMeshShaderRHIRef RHICreateMeshShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
FPixelShaderRHIRef RHICreatePixelShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
FRasterizerStateRHIRef RHICreateRasterizerState
(
const FRasterizerStateInitializerRHI& Initializer |
FlushType: Thread safe. | DynamicRHI.h | |
virtual FRayTracingGeometryRHIRef RHICreateRayTracingGeometry
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual FRayTracingPipelineStateRHIRef RHICreateRayTracingPipelineState
(
const FRayTracingPipelineStateInitializer& Initializer |
DynamicRHI.h | ||
virtual FRayTracingSceneRHIRef RHICreateRayTracingScene
(
FRayTracingSceneInitializer Initializer |
DynamicRHI.h | ||
virtual FRayTracingShaderRHIRef RHICreateRayTracingShader
(
TArrayView< const uint8 > Code, |
DynamicRHI.h | ||
FRenderQueryRHIRef RHICreateRenderQuery
(
ERenderQueryType QueryType |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
virtual FRHIResourceCollectionRef RHICreateResourceCollection
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
FSamplerStateRHIRef RHICreateSamplerState
(
const FSamplerStateInitializerRHI& Initializer |
FlushType: Thread safe. | DynamicRHI.h | |
virtual FShaderBindingTableRHIRef RHICreateShaderBindingTable
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual FShaderBundleRHIRef RHICreateShaderBundle
(
const FShaderBundleCreateInfo& CreateInfo |
DynamicRHI.h | ||
virtual FRHIShaderLibraryRef RHICreateShaderLibrary
(
EShaderPlatform Platform, |
FlushType: Must be Thread-Safe. | DynamicRHI.h | |
virtual FRHIShaderLibraryRef RHICreateShaderLibrary_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
DynamicRHI.h | ||
FShaderResourceViewRHIRef RHICreateShaderResourceView
(
FRHICommandListBase& RHICmdList, |
SRV / UAV creation functions. | DynamicRHI.h | |
virtual FStagingBufferRHIRef RHICreateStagingBuffer () |
FlushType: Thread safe. | DynamicRHI.h | |
FRHITextureInitializer RHICreateTextureInitializer
(
FRHICommandListBase& RHICmdList, |
Create a texture initializer, used for creating a RHITexture with data. | DynamicRHI.h | |
virtual FTextureReferenceRHIRef RHICreateTextureReference
(
FRHICommandListBase& RHICmdList, |
Create a texture reference. InReferencedTexture can be null. | DynamicRHI.h | |
virtual IRHITransientResourceAllocator * RHICreateTransientResourceAllocator() |
Create a new transient resource allocator | DynamicRHI.h | |
virtual void RHICreateTransition
(
FRHITransition* Transition, |
DynamicRHI.h | ||
FUniformBufferRHIRef RHICreateUniformBuffer
(
const void* Contents, |
FlushType: Thread safe, but varies depending on the RHI. | DynamicRHI.h | |
FUnorderedAccessViewRHIRef RHICreateUnorderedAccessView
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
FVertexDeclarationRHIRef RHICreateVertexDeclaration
(
const FVertexDeclarationElementList& Elements |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
FVertexShaderRHIRef RHICreateVertexShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
FViewportRHIRef RHICreateViewport
(
void* WindowHandle, |
Must be called from the main thread. FlushType: Thread safe | DynamicRHI.h | |
virtual FWorkGraphPipelineStateRHIRef RHICreateWorkGraphPipelineState
(
const FWorkGraphPipelineStateInitializer& Initializer |
DynamicRHI.h | ||
virtual FWorkGraphShaderRHIRef RHICreateWorkGraphShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
void RHIEndFrame
(
const FRHIEndFrameArgs& Args |
DynamicRHI.h | ||
virtual void RHIEndFrame_RenderThread
(
FRHICommandListImmediate& RHICmdList |
DynamicRHI.h | ||
virtual void RHIEndMultiUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIEndRenderQuery_TopOfPipe
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIEndRenderQueryBatch_TopOfPipe
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIEndUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
void RHIFinalizeContext
(
FRHIFinalizeContextArgs&& Args, |
DynamicRHI.h | ||
virtual IRHIPlatformCommandList * RHIFinalizeParallelContext
(
IRHIComputeContext* Context |
DynamicRHI.h | ||
void RHIFlushResources () |
Flush driver resources. | DynamicRHI.h | |
bool RHIGetAvailableResolutions
(
FScreenResolutionArray& Resolutions, |
FlushType: Thread safe. | DynamicRHI.h | |
IRHIComputeContext * RHIGetCommandContext
(
ERHIPipeline Pipeline, |
Retrieves a new command context to begin the recording of a new platform command list. | DynamicRHI.h | |
IRHICommandContext * RHIGetDefaultContext() |
FlushType: Thread safe. | DynamicRHI.h | |
virtual void RHIGetDisplaysInformation
(
FDisplayInformationArray& OutDisplayInformation |
DynamicRHI.h | ||
virtual uint32 RHIGetHTilePlatformConfig
(
const FRHITextureDesc& DepthDesc |
DynamicRHI.h | ||
virtual uint32 RHIGetHTilePlatformConfig
(
uint32 DepthWidth, |
DynamicRHI.h | ||
virtual uint64 RHIGetMinimumAlignmentForBufferBackedSRV
(
EPixelFormat Format |
FlushType: Thread safe. | DynamicRHI.h | |
virtual void * RHIGetNativeCommandBuffer () |
FlushType: Not Thread Safe! | DynamicRHI.h | |
virtual void * RHIGetNativeComputeQueue () |
FlushType: Flush RHI Thread. | DynamicRHI.h | |
void * RHIGetNativeDevice () |
FlushType: Flush RHI Thread. | DynamicRHI.h | |
virtual void * RHIGetNativeGraphicsQueue () |
FlushType: Flush RHI Thread. | DynamicRHI.h | |
void * RHIGetNativeInstance () |
FlushType: Flush RHI Thread. | DynamicRHI.h | |
virtual void * RHIGetNativePhysicalDevice () |
FlushType: Flush RHI Thread. | DynamicRHI.h | |
virtual IRHIComputeContext * RHIGetParallelCommandContext
(
FRHIParallelRenderPassInfo const& ParallelRenderPass, |
Retrieves a new command context to begin the recording of a new platform command list. | DynamicRHI.h | |
virtual uint16 RHIGetPlatformTextureMaxSampleCount() |
DynamicRHI.h | ||
virtual FRayTracingAccelerationStructureOfflineMetadata RHIGetRayTracingGeometryOfflineMetadata
(
const FRayTracingGeometryOfflineDataHeader& OfflineDataHeader |
DynamicRHI.h | ||
bool RHIGetRenderQueryResult
(
FRHIRenderQuery* RenderQuery, |
CAUTION: Even though this is marked as threadsafe, it is only valid to call from the render thread. | DynamicRHI.h | |
void RHIGetSupportedResolution
(
uint32& Width, |
FlushType: Thread safe. | DynamicRHI.h | |
void RHIGetTextureMemoryStats
(
FTextureMemoryStats& OutStats |
FlushType: Thread safe. | DynamicRHI.h | |
bool RHIGetTextureMemoryVisualizeData
(
FColor* TextureData, |
FlushType: Flush Immediate. | DynamicRHI.h | |
virtual IRHIUploadContext * RHIGetUploadContext() |
DynamicRHI.h | ||
FTextureRHIRef RHIGetViewportBackBuffer
(
FRHIViewport* Viewport |
With RHI thread, this is the current backbuffer from the perspective of the render thread. | DynamicRHI.h | |
virtual FUnorderedAccessViewRHIRef RHIGetViewportBackBufferUAV
(
FRHIViewport* ViewportRHI |
DynamicRHI.h | ||
virtual uint32 RHIGetViewportNextPresentGPUIndex
(
FRHIViewport* Viewport |
FlushType: Thread safe. | DynamicRHI.h | |
virtual void RHIHandleDisplayChange() |
DynamicRHI.h | ||
virtual bool RHIIsRenderingSuspended() |
FlushType: Flush Immediate. | DynamicRHI.h | |
virtual void * RHILockBuffer
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void * RHILockBufferMGPU
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void * RHILockStagingBuffer
(
FRHIStagingBuffer* StagingBuffer, |
Lock a staging buffer to read contents on the CPU that were written by the GPU, without having to stall. | DynamicRHI.h | |
FRHILockTextureResult RHILockTexture
(
FRHICommandListImmediate& RHICmdList, |
DynamicRHI.h | ||
void RHIMapStagingSurface
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | DynamicRHI.h | |
virtual void RHIMapStagingSurface_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
DynamicRHI.h | ||
virtual bool RHIMatchPrecachePSOInitializers
(
const FGraphicsPipelineStateInitializer& LHS, |
Check if PSO Initializers are the same used during PSO Precaching (only compare data relevant for the RHI specific PSO) | DynamicRHI.h | |
virtual EPixelFormat RHIPreferredPixelFormatHint
(
EPixelFormat PreferredPixelFormat |
Return preferred pixel format if given format is unsupported. | DynamicRHI.h | |
virtual void RHIProcessDeleteQueue () |
Platform RHIs should implement this function to process their internal GPU resource/memory delete queues. | DynamicRHI.h | |
virtual void RHIRead3DSurfaceFloatData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | DynamicRHI.h | |
void RHIRead3DSurfaceFloatData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | DynamicRHI.h | |
virtual void RHIReadSurfaceData
(
FRHITexture* Texture, |
Default fallback; will not work for non-8-bit surfaces and it's extremely slow. | DynamicRHI.h | |
void RHIReadSurfaceData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | DynamicRHI.h | |
void RHIReadSurfaceFloatData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | DynamicRHI.h | |
virtual void RHIReadSurfaceFloatData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | DynamicRHI.h | |
virtual void RHIReadSurfaceFloatData_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIReadSurfaceFloatData_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIReleaseThreadOwnership() |
DynamicRHI.h | ||
virtual void RHIReleaseTransition
(
FRHITransition* Transition |
DynamicRHI.h | ||
void RHIReplaceResources
(
FRHICommandListBase& RHICmdList, |
Transfer metadata and underlying resource from src to dest and release any resource owned by dest. | DynamicRHI.h | |
void RHIResizeViewport
(
FRHIViewport* Viewport, |
Must be called from the main thread. FlushType: Thread safe | DynamicRHI.h | |
virtual void RHIResizeViewport
(
FRHIViewport* Viewport, |
DynamicRHI.h | ||
virtual void RHIResumeRendering() |
FlushType: Thread safe. | DynamicRHI.h | |
virtual void RHISerializeAccelerationStructure
(
FRHICommandListImmediate& RHICmdList, |
DynamicRHI.h | ||
virtual void RHISignalFlipEvent() |
DynamicRHI.h | ||
void RHISubmitCommandLists
(
FRHISubmitCommandListsArgs&& Args |
DynamicRHI.h | ||
virtual void RHISuspendRendering() |
Operations to suspend title rendering and yield control to the system FlushType: Thread safe | DynamicRHI.h | |
void RHITick
(
float DeltaTime |
Must be called from the main thread. FlushType: Thread safe | DynamicRHI.h | |
virtual void RHIUnlockBuffer
(
FRHICommandListBase& RHICmdList, |
FlushType: Flush RHI Thread. | DynamicRHI.h | |
virtual void RHIUnlockBufferMGPU
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIUnlockStagingBuffer
(
FRHIStagingBuffer* StagingBuffer |
Unlock a staging buffer previously locked with RHILockStagingBuffer. | DynamicRHI.h | |
void RHIUnlockTexture
(
FRHICommandListImmediate& RHICmdList, |
DynamicRHI.h | ||
void RHIUnmapStagingSurface
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | DynamicRHI.h | |
virtual void RHIUnmapStagingSurface_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIUpdateFromBufferTexture2D
(
FRHICommandListBase& RHICmdList, |
Updates a region of a 2D texture from GPU memory provided by the given buffer (may not be implemented on every platform) | DynamicRHI.h | |
virtual void RHIUpdateResourceCollection
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
void RHIUpdateTexture2D
(
FRHICommandListBase& RHICmdList, |
Updates a region of a 2D texture from system memory | DynamicRHI.h | |
void RHIUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
Updates a region of a 3D texture from system memory | DynamicRHI.h | |
virtual void RHIUpdateTextureReference
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
void RHIUpdateUniformBuffer
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void RHIVirtualTextureSetFirstMipInMemory
(
FRHICommandListImmediate& RHICmdList, |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
virtual void RHIVirtualTextureSetFirstMipVisible
(
FRHICommandListImmediate& RHICmdList, |
FlushType: Wait RHI Thread. | DynamicRHI.h | |
virtual FRHIFlipDetails RHIWaitForFlip
(
double TimeoutInSeconds |
DynamicRHI.h | ||
virtual void RHIWriteGPUFence_TopOfPipe
(
FRHICommandListBase& RHICmdList, |
Called by the thread recording an RHI command list (via RHICmdList.WriteGPUFence()). | DynamicRHI.h | |
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). | DynamicRHI.h | |
virtual void UnlockBuffer_BottomOfPipe
(
FRHICommandListBase& RHICmdList, |
DynamicRHI.h | ||
virtual void UnlockStagingBuffer_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Unlock a staging buffer previously locked with LockStagingBuffer_RenderThread. | DynamicRHI.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void EnableIdealGPUCaptureOptions
(
bool bEnable |
Utilities. | DynamicRHI.h |