Navigation
API > API/Runtime > API/Runtime/RHI
Inheritance Hierarchy
- FDynamicRHI
- FDynamicRHIPSOFallback
- FNullDynamicRHI
- IOpenGLDynamicRHI
- IVulkanDynamicRHI
- FVulkanDynamicRHI
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
Destructors
| Type | Name | Description | |
|---|---|---|---|
~FDynamicRHI () |
Declare a virtual destructor, so the dynamic RHI can be deleted without knowing its type. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FTextureRHIRef | AsyncReallocateTexture2D_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| ETextureReallocationStatus | CancelAsyncReallocateTexture2D_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| void | EnableIdealGPUCaptureOptions
(
bool bEnable |
Utilities. | |
| ETextureReallocationStatus | FinalizeAsyncReallocateTexture2D_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| void | Some RHIs can have pending messages/logs for error tracking, or debug modes. | ||
| ERHIInterfaceType | |||
| const TCHAR * | GetName () |
||
| FDynamicRHI * | |||
| void | Init () |
Initializes the RHI; separate from IDynamicRHIModule::CreateRHI so that GDynamicRHI is set when it is called. | |
| void | InitPixelFormatInfo
(
const TArray< uint32 >& PixelFormatBlockBytesIn |
Called after PostInit to initialize the pixel format info, which is needed for some commands default implementations | |
| void * | LockBuffer_BottomOfPipe
(
FRHICommandListBase& RHICmdList, |
Buffer Lock/Unlock. | |
| 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. | |
| void * | LockTexture2D_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| void * | LockTexture2DArray_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| void | PostInit () |
Called after the RHI is initialized; before the render thread is started. | |
| void | Acquires or releases ownership of the platform-specific rendering context for the calling thread. | ||
| void | RHIAdvanceFrameForGetViewportBackBuffer
(
FRHIViewport* Viewport |
Only relevant with an RHI thread, this advances the backbuffer for the purpose of GetViewportBackBuffer FlushType: Thread safe | |
| void | RHIAliasTextureResources
(
FTextureRHIRef& DestTexture, |
||
| FTextureRHIRef | RHIAsyncCreateTexture2D
(
uint32 SizeX, |
||
| FTextureRHIRef | RHIAsyncCreateTexture2D
(
uint32 SizeX, |
Thread-safe function that can be used to create a texture outside of the rendering thread. | |
| FTextureRHIRef | RHIAsyncReallocateTexture2D
(
FRHITexture* Texture2D, |
Starts an asynchronous texture reallocation. | |
| void | RHIBeginRenderQuery_TopOfPipe
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIBeginRenderQueryBatch_TopOfPipe
(
FRHICommandListBase& RHICmdList, |
||
| void | Tells the RHI we're about to suspend it. | ||
| FUpdateTexture3DData | RHIBeginUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIBindDebugLabelName
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIBindDebugLabelName
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIBindDebugLabelName
(
FRHICommandListBase& RHICmdList, |
FlushType: Thread safe. | |
| void | Blocks the CPU until the GPU catches up and goes idle. FlushType: Flush Immediate (seems wrong) | ||
| FRayTracingAccelerationStructureSize | RHICalcRayTracingGeometrySize
(
const FRayTracingGeometryInitializer& Initializer |
||
| FRayTracingAccelerationStructureSize | RHICalcRayTracingSceneSize
(
const FRayTracingSceneInitializer& Initializer |
||
| FRHICalcTextureSizeResult | RHICalcTexturePlatformSize
(
FRHITextureDesc const& Desc, |
FlushType: Thread safe. | |
| ETextureReallocationStatus | RHICancelAsyncReallocateTexture2D
(
FRHITexture* Texture2D, |
FlushType: Wait RHI Thread. | |
| 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. | |
| uint32 | RHIComputeMemorySize
(
FRHITexture* TextureRHI |
FlushType: Thread safe. | |
| uint64 | RHIComputePrecachePSOHash
(
const FGraphicsPipelineStateInitializer& Initializer |
Compute the hash of the PSO initializer for PSO Precaching (only hash data relevant for the RHI specific PSO) | |
| 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) | |
| FTextureRHIRef | RHICreateAliasedTexture
(
FTextureRHIRef& SourceTexture |
||
| FAmplificationShaderRHIRef | RHICreateAmplificationShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| FBlendStateRHIRef | RHICreateBlendState
(
const FBlendStateInitializerRHI& Initializer |
FlushType: Thread safe. | |
| FBoundShaderStateRHIRef | RHICreateBoundShaderState
(
FRHIVertexDeclaration* VertexDeclaration, |
FlushType: Thread safe, but varies depending on the RHI. | |
| FBufferRHIRef | RHICreateBuffer
(
FRHICommandListBase& RHICmdList, |
||
| FComputePipelineStateRHIRef | RHICreateComputePipelineState
(
FRHIComputeShader* ComputeShader |
FlushType: Thread safe. | |
| FComputePipelineStateRHIRef | RHICreateComputePipelineState
(
FRHIComputeShader* ComputeShader, |
||
| FComputeShaderRHIRef | RHICreateComputeShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| FDepthStencilStateRHIRef | RHICreateDepthStencilState
(
const FDepthStencilStateInitializerRHI& Initializer |
FlushType: Thread safe. | |
| FGeometryShaderRHIRef | RHICreateGeometryShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| FGPUFenceRHIRef | RHICreateGPUFence
(
const FName& Name |
||
| FGraphicsPipelineStateRHIRef | RHICreateGraphicsPipelineState
(
const FGraphicsPipelineStateInitializer& Initializer, |
||
| FGraphicsPipelineStateRHIRef | RHICreateGraphicsPipelineState
(
const FGraphicsPipelineStateInitializer& Initializer |
FlushType: Thread safe. | |
| FMeshShaderRHIRef | RHICreateMeshShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| FPixelShaderRHIRef | RHICreatePixelShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| FRasterizerStateRHIRef | RHICreateRasterizerState
(
const FRasterizerStateInitializerRHI& Initializer |
FlushType: Thread safe. | |
| FRayTracingGeometryRHIRef | RHICreateRayTracingGeometry
(
FRHICommandListBase& RHICmdList, |
||
| FRayTracingPipelineStateRHIRef | RHICreateRayTracingPipelineState
(
const FRayTracingPipelineStateInitializer& Initializer |
||
| FRayTracingSceneRHIRef | RHICreateRayTracingScene
(
FRayTracingSceneInitializer Initializer |
||
| FRayTracingShaderRHIRef | RHICreateRayTracingShader
(
TArrayView< const uint8 > Code, |
||
| FRenderQueryRHIRef | RHICreateRenderQuery
(
ERenderQueryType QueryType |
FlushType: Wait RHI Thread. | |
| FRHIResourceCollectionRef | RHICreateResourceCollection
(
FRHICommandListBase& RHICmdList, |
||
| FSamplerStateRHIRef | RHICreateSamplerState
(
const FSamplerStateInitializerRHI& Initializer |
FlushType: Thread safe. | |
| FShaderBindingTableRHIRef | RHICreateShaderBindingTable
(
FRHICommandListBase& RHICmdList, |
||
| FShaderBundleRHIRef | RHICreateShaderBundle
(
const FShaderBundleCreateInfo& CreateInfo |
||
| FRHIShaderLibraryRef | RHICreateShaderLibrary
(
EShaderPlatform Platform, |
FlushType: Must be Thread-Safe. | |
| FRHIShaderLibraryRef | RHICreateShaderLibrary_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| FShaderResourceViewRHIRef | RHICreateShaderResourceView
(
FRHICommandListBase& RHICmdList, |
SRV / UAV creation functions. | |
| FStagingBufferRHIRef | FlushType: Thread safe. | ||
| FTextureRHIRef | RHICreateTexture
(
FRHICommandListBase& RHICmdList, |
Creates an RHI texture resource. | |
| FTextureReferenceRHIRef | RHICreateTextureReference
(
FRHICommandListBase& RHICmdList, |
Create a texture reference. InReferencedTexture can be null. | |
| IRHITransientResourceAllocator * | Create a new transient resource allocator | ||
| void | RHICreateTransition
(
FRHITransition* Transition, |
||
| FUniformBufferRHIRef | RHICreateUniformBuffer
(
const void* Contents, |
FlushType: Thread safe, but varies depending on the RHI. | |
| FUnorderedAccessViewRHIRef | RHICreateUnorderedAccessView
(
FRHICommandListBase& RHICmdList, |
||
| FVertexDeclarationRHIRef | RHICreateVertexDeclaration
(
const FVertexDeclarationElementList& Elements |
FlushType: Wait RHI Thread. | |
| FVertexShaderRHIRef | RHICreateVertexShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| FViewportRHIRef | RHICreateViewport
(
void* WindowHandle, |
Must be called from the main thread. FlushType: Thread safe | |
| FWorkGraphPipelineStateRHIRef | RHICreateWorkGraphPipelineState
(
const FWorkGraphPipelineStateInitializer& Initializer |
||
| FWorkGraphShaderRHIRef | RHICreateWorkGraphShader
(
TArrayView< const uint8 > Code, |
FlushType: Wait RHI Thread. | |
| void | RHIEndFrame
(
const FRHIEndFrameArgs& Args |
||
| void | RHIEndFrame_RenderThread
(
FRHICommandListImmediate& RHICmdList |
||
| void | RHIEndMultiUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIEndRenderQuery_TopOfPipe
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIEndRenderQueryBatch_TopOfPipe
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIEndUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
||
| ETextureReallocationStatus | RHIFinalizeAsyncReallocateTexture2D
(
FRHITexture* Texture2D, |
FlushType: Wait RHI Thread. | |
| void | RHIFinalizeContext
(
FRHIFinalizeContextArgs&& Args, |
||
| void | Flush driver resources. | ||
| bool | RHIGetAvailableResolutions
(
FScreenResolutionArray& Resolutions, |
FlushType: Thread safe. | |
| IRHIComputeContext * | RHIGetCommandContext
(
ERHIPipeline Pipeline, |
Retrieves a new command context to begin the recording of a new platform command list. | |
| IRHICommandContext * | FlushType: Thread safe. | ||
| void | RHIGetDisplaysInformation
(
FDisplayInformationArray& OutDisplayInformation |
||
| uint32 | RHIGetGPUFrameCycles
(
uint32 GPUIndex |
FlushType: Thread safe. | |
| uint32 | RHIGetHTilePlatformConfig
(
uint32 DepthWidth, |
||
| uint64 | FlushType: Thread safe. | ||
| void * | FlushType: Not Thread Safe! | ||
| void * | FlushType: Flush RHI Thread. | ||
| void * | FlushType: Flush RHI Thread. | ||
| void * | FlushType: Flush RHI Thread. | ||
| void * | FlushType: Flush RHI Thread. | ||
| void * | FlushType: Flush RHI Thread. | ||
| uint16 | |||
| bool | RHIGetRenderQueryResult
(
FRHIRenderQuery* RenderQuery, |
CAUTION: Even though this is marked as threadsafe, it is only valid to call from the render thread. | |
| void | RHIGetSupportedResolution
(
uint32& Width, |
FlushType: Thread safe. | |
| void | RHIGetTextureMemoryStats
(
FTextureMemoryStats& OutStats |
FlushType: Thread safe. | |
| bool | FlushType: Flush Immediate. | ||
| IRHIUploadContext * | |||
| FTextureRHIRef | RHIGetViewportBackBuffer
(
FRHIViewport* Viewport |
With RHI thread, this is the current backbuffer from the perspective of the render thread. | |
| FUnorderedAccessViewRHIRef | RHIGetViewportBackBufferUAV
(
FRHIViewport* ViewportRHI |
||
| uint32 | RHIGetViewportNextPresentGPUIndex
(
FRHIViewport* Viewport |
FlushType: Thread safe. | |
| void | |||
| bool | FlushType: Flush Immediate. | ||
| void * | RHILockBuffer
(
FRHICommandListBase& RHICmdList, |
||
| void * | RHILockBufferMGPU
(
FRHICommandListBase& RHICmdList, |
||
| void * | RHILockStagingBuffer
(
FRHIStagingBuffer* StagingBuffer, |
Lock a staging buffer to read contents on the CPU that were written by the GPU, without having to stall. | |
| void * | RHILockTexture2D
(
FRHITexture* Texture, |
FlushType: Flush RHI Thread. | |
| void * | RHILockTexture2DArray
(
FRHITexture* Texture, |
FlushType: Flush RHI Thread. | |
| void * | RHILockTextureCubeFace
(
FRHITexture* Texture, |
FlushType: Flush RHI Thread. | |
| void * | RHILockTextureCubeFace_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| void | RHIMapStagingSurface
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | RHIMapStagingSurface_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| 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) | |
| EPixelFormat | RHIPreferredPixelFormatHint
(
EPixelFormat PreferredPixelFormat |
Return preferred pixel format if given format is unsupported. | |
| void | Platform RHIs should implement this function to process their internal GPU resource/memory delete queues. | ||
| void | RHIRead3DSurfaceFloatData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | RHIRead3DSurfaceFloatData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | RHIReadSurfaceData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | RHIReadSurfaceData
(
FRHITexture* Texture, |
Default fallback; will not work for non-8-bit surfaces and it's extremely slow. | |
| void | RHIReadSurfaceFloatData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | RHIReadSurfaceFloatData
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | RHIReadSurfaceFloatData_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| void | RHIReadSurfaceFloatData_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| void | |||
| void | RHIReleaseTransition
(
FRHITransition* Transition |
||
| void | RHIReplaceResources
(
FRHICommandListBase& RHICmdList, |
Transfer metadata and underlying resource from src to dest and release any resource owned by dest. | |
| void | RHIResizeViewport
(
FRHIViewport* Viewport, |
Must be called from the main thread. FlushType: Thread safe | |
| void | RHIResizeViewport
(
FRHIViewport* Viewport, |
||
| void | FlushType: Thread safe. | ||
| void | |||
| void | RHISubmitCommandLists
(
FRHISubmitCommandListsArgs&& Args |
||
| void | Operations to suspend title rendering and yield control to the system FlushType: Thread safe | ||
| void | RHITick
(
float DeltaTime |
Must be called from the main thread. FlushType: Thread safe | |
| void | RHIUnlockBuffer
(
FRHICommandListBase& RHICmdList, |
FlushType: Flush RHI Thread. | |
| void | RHIUnlockBufferMGPU
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIUnlockStagingBuffer
(
FRHIStagingBuffer* StagingBuffer |
Unlock a staging buffer previously locked with RHILockStagingBuffer. | |
| void | RHIUnlockTexture2D
(
FRHITexture* Texture, |
FlushType: Flush RHI Thread. | |
| void | RHIUnlockTexture2DArray
(
FRHITexture* Texture, |
FlushType: Flush RHI Thread. | |
| void | RHIUnlockTextureCubeFace
(
FRHITexture* Texture, |
FlushType: Flush RHI Thread. | |
| void | RHIUnlockTextureCubeFace_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| void | RHIUnmapStagingSurface
(
FRHITexture* Texture, |
FlushType: Flush Immediate (seems wrong) | |
| void | RHIUnmapStagingSurface_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| 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) | |
| void | RHIUpdateTexture2D
(
FRHICommandListBase& RHICmdList, |
Updates a region of a 2D texture from system memory | |
| void | RHIUpdateTexture3D
(
FRHICommandListBase& RHICmdList, |
Updates a region of a 3D texture from system memory | |
| void | RHIUpdateTextureReference
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIUpdateUniformBuffer
(
FRHICommandListBase& RHICmdList, |
||
| void | RHIVirtualTextureSetFirstMipInMemory
(
FRHICommandListImmediate& RHICmdList, |
FlushType: Wait RHI Thread. | |
| void | RHIVirtualTextureSetFirstMipVisible
(
FRHICommandListImmediate& RHICmdList, |
FlushType: Wait RHI Thread. | |
| FRHIFlipDetails | RHIWaitForFlip
(
double TimeoutInSeconds |
||
| void | RHIWriteGPUFence_TopOfPipe
(
FRHICommandListBase& RHICmdList, |
Called by the thread recording an RHI command list (via RHICmdList.WriteGPUFence()). | |
| 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). | |
| void | UnlockBuffer_BottomOfPipe
(
FRHICommandListBase& RHICmdList, |
||
| void | UnlockStagingBuffer_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Unlock a staging buffer previously locked with LockStagingBuffer_RenderThread. | |
| void | UnlockTexture2D_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
||
| void | UnlockTexture2DArray_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Classes
| Type | Name | Description | |
|---|---|---|---|
| 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 | Description |
|---|---|
| FRHICalcTextureSizeResult |