IRHICommandContext

The interface RHI command context.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

RHI

Header

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

Include

#include "RHIContext.h"

Syntax

class IRHICommandContext : public IRHIComputeContext

Remarks

The interface RHI command context. Sometimes the RHI handles these. On platforms that can processes command lists in parallel, it is a separate object.

Variables

Name Description

Protected variable

FRHIRenderPassI...

 

RenderPassInfo

Destructors

Name Description

Public function Virtual

~IRHICommandContext()

Functions

Name Description

Public function

void

 

RHIBeginDrawingViewport

(
    FRHIViewport* Viewport,
    FRHITexture* RenderTargetRHI
)

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function

void

 

RHIBeginFrame()

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function Virtual

void

 

RHIBeginLateLatching

(
    int32 FrameNumber
)

Enable/begin recording for late-latching (for ulta-late uniform buffer patching for VR devices)

Public function

void

 

RHIBeginRenderPass

(
    const FRHIRenderPassInfo& InInfo,
    const TCHAR* InName
)

Public function

void

 

RHIBeginRenderQuery

(
    FRHIRenderQuery* RenderQuery
)

Public function

void

 

RHIBeginScene()

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function Virtual

void

 

RHIBeginUpdateMultiFrameResource

(
    FRHIUnorderedAccessView* UAV
)

Public function Virtual

void

 

RHIBeginUpdateMultiFrameResource

(
    FRHITexture* Texture
)

Signals the beginning and ending of rendering to a resource to be used in the next frame on a multiGPU system

Public function Virtual

void

 

RHICalibrateTimers()

Public function Virtual

void

 

RHICalibrateTimers

Public function Virtual

void

 

RHIClearRayTracingBindings

(
    FRHIRayTracingScene* Scene
)

Public function Virtual

void

 

RHICopyBufferRegion

(
    FRHIVertexBuffer* DestBuffer,
    uint64 DstOffset,
    FRHIVertexBuffer* SourceBuffer,
    uint64 SrcOffset,
    uint64 NumBytes
)

Public function Virtual

void

 

RHICopyTexture

(
    FRHITexture* SourceTexture,
    FRHITexture* DestTexture,
    const FRHICopyTextureInfo& CopyInf...
)

Public function

void

 

RHICopyToResolveTarget

(
    FRHITexture* SourceTexture,
    FRHITexture* DestTexture,
    const FResolveParams& ResolveParam...
)

Resolves from one texture to another.

Public function Virtual

void

 

RHIDiscardRenderTargets

(
    bool Depth,
    bool Stencil,
    uint32 ColorBitMask
)

Not all RHIs need this (Mobile specific)

Public function

void

 

RHIDrawIndexedIndirect

(
    FRHIIndexBuffer* IndexBufferRH...,
    FRHIStructuredBuffer* Argument...,
    int32 DrawArgumentsIndex,
    uint32 NumInstances
)

Public function

void

 

RHIDrawIndexedPrimitive

(
    FRHIIndexBuffer* IndexBuffer,
    int32 BaseVertexIndex,
    uint32 FirstInstance,
    uint32 NumVertices,
    uint32 StartIndex,
    uint32 NumPrimitives,
    uint32 NumInstances
)

Public function

void

 

RHIDrawIndexedPrimitiveIndirect

(
    FRHIIndexBuffer* IndexBuffer,
    FRHIVertexBuffer* ArgumentBuff...,
    uint32 ArgumentOffset
)

Public function

void

 

RHIDrawPrimitive

(
    uint32 BaseVertexIndex,
    uint32 NumPrimitives,
    uint32 NumInstances
)

Public function

void

 

RHIDrawPrimitiveIndirect

(
    FRHIVertexBuffer* ArgumentBuff...,
    uint32 ArgumentOffset
)

Public function

void

 

RHIEndDrawingViewport

(
    FRHIViewport* Viewport,
    bool bPresent,
    bool bLockToVsync
)

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function

void

 

RHIEndFrame()

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function Virtual

void

 

RHIEndLateLatching()

End recording for late-latching (for ulta-late uniform buffer patching for VR devices)

Public function

void

 

RHIEndRenderPass()

Public function

void

 

RHIEndRenderQuery

(
    FRHIRenderQuery* RenderQuery
)

Public function

void

 

RHIEndScene()

This method is queued with an RHIThread, otherwise it will flush after it is queued; without an RHI thread there is no benefit to queuing this frame advance commands.

Public function Virtual

void

 

RHIEndUpdateMultiFrameResource

(
    FRHIUnorderedAccessView* UAV
)

Public function Virtual

void

 

RHIEndUpdateMultiFrameResource

(
    FRHITexture* Texture
)

Public function Virtual

void

 

RHINextSubpass()

Public function Virtual

void

 

RHIPollOcclusionQueries()

Used for OpenGL to check and see if any occlusion queries can be read back on the RHI thread. If they aren't ready when we need them, then we end up stalling.

Public function Virtual

void

 

RHIRayTraceDispatch

(
    FRHIRayTracingPipelineState* R...,
    FRHIRayTracingShader* RayGenSh...,
    FRHIRayTracingScene* Scene,
    const FRayTracingShaderBindings& G...,
    uint32 Width,
    uint32 Height
)

Public function Virtual

void

 

RHIRayTraceIntersection

(
    FRHIRayTracingScene* Scene,
    FRHIShaderResourceView* Rays,
    FRHIUnorderedAccessView* Outpu...,
    uint32 NumRays
)

Public function Virtual

void

 

RHIRayTraceOcclusion

(
    FRHIRayTracingScene* Scene,
    FRHIShaderResourceView* Rays,
    FRHIUnorderedAccessView* Outpu...,
    uint32 NumRays
)

Public function Virtual

void

 

RHIResummarizeHTile

(
    FRHITexture2D* DepthTexture
)

Rebuilds the depth target HTILE meta data (on supported platforms).

Public function Virtual

void

 

RHISetBlendFactor

(
    const FLinearColor& BlendFactor
)

Public function

void

 

RHISetDepthBounds

(
    float MinDepth,
    float MaxDepth
)

Sets Depth Bounds range with the given min/max depth.

Public function

void

 

RHISetGraphicsPipelineState

(
    FRHIGraphicsPipelineState* Gra...,
    bool bApplyAdditionalState
)

Public function

void

 

RHISetMultipleViewports

(
    uint32 Count,
    const FViewportBounds* Data
)

Useful when used with geometry shader (emit polygons to different viewports), otherwise SetViewPort() is simpler

Public function Virtual

void

 

RHISetRayTracingCallableShader

(
    FRHIRayTracingScene* Scene,
    uint32 ShaderSlotInScene,
    FRHIRayTracingPipelineState* P...,
    uint32 ShaderIndexInPipeline,
    uint32 NumUniformBuffers,
    FRHIUniformBuffer*const* ...,
    uint32 UserData
)

Public function Virtual

void

 

RHISetRayTracingHitGroup

(
    FRHIRayTracingScene* Scene,
    uint32 InstanceIndex,
    uint32 SegmentIndex,
    uint32 ShaderSlot,
    FRHIRayTracingPipelineState* P...,
    uint32 HitGroupIndex,
    uint32 NumUniformBuffers,
    FRHIUniformBuffer*const* ...,
    uint32 LooseParameterDataSize,
    const void* LooseParameterData,
    uint32 UserData
)

Public function Virtual

void

 

RHISetRayTracingHitGroups

(
    FRHIRayTracingScene* Scene,
    FRHIRayTracingPipelineState* P...,
    uint32 NumBindings,
    const FRayTracingLocalShaderBinding...
)

Public function Virtual

void

 

RHISetRayTracingMissShader

(
    FRHIRayTracingScene* Scene,
    uint32 ShaderSlotInScene,
    FRHIRayTracingPipelineState* P...,
    uint32 ShaderIndexInPipeline,
    uint32 NumUniformBuffers,
    FRHIUniformBuffer*const* ...,
    uint32 UserData
)

Public function

void

 

RHISetScissorRect

(
    bool bEnable,
    uint32 MinX,
    uint32 MinY,
    uint32 MaxX,
    uint32 MaxY
)

Public function

void

 

RHISetShaderParameter

(
    FRHIGraphicsShader* Shader,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function

void

 

RHISetShaderResourceViewParameter

(
    FRHIGraphicsShader* Shader,
    uint32 SamplerIndex,
    FRHIShaderResourceView* SRV
)

Public function

void

 

RHISetShaderSampler

(
    FRHIGraphicsShader* Shader,
    uint32 SamplerIndex,
    FRHISamplerState* NewState
)

Sets sampler state.

Public function

void

 

RHISetShaderTexture

(
    FRHIGraphicsShader* Shader,
    uint32 TextureIndex,
    FRHITexture* NewTexture
)

Set the shader resource view of a surface.

Public function

void

 

RHISetShaderUniformBuffer

(
    FRHIGraphicsShader* Shader,
    uint32 BufferIndex,
    FRHIUniformBuffer* Buffer
)

Public function Virtual

void

 

RHISetShadingRate

(
    EVRSShadingRate ShadingRate,
    EVRSRateCombiner Combiner
)

Public function Virtual

void

 

RHISetStencilRef

(
    uint32 StencilRef
)

Public function Virtual

void

 

RHISetStereoViewport

(
    float LeftMinX,
    float RightMinX,
    float LeftMinY,
    float RightMinY,
    float MinZ,
    float LeftMaxX,
    float RightMaxX,
    float LeftMaxY,
    float RightMaxY,
    float MaxZ
)

Public function

void

 

RHISetStreamSource

(
    uint32 StreamIndex,
    FRHIVertexBuffer* VertexBuffer,
    uint32 Offset
)

Public function

void

 

RHISetUAVParameter

(
    FRHIPixelShader* PixelShader,
    uint32 UAVIndex,
    FRHIUnorderedAccessView* UAV
)

Sets a pixel shader UAV parameter.

Public function

void

 

RHISetViewport

(
    float MinX,
    float MinY,
    float MinZ,
    float MaxX,
    float MaxY,
    float MaxZ
)

Public function

void

 

RHIUpdateTextureReference

(
    FRHITextureReference* TextureR...,
    FRHITexture* NewTexture
)

Overridden from IRHIComputeContext

Name Description

Public function Virtual

void

 

RHIBuildAccelerationStructure

(
    FRHIRayTracingScene* Scene
)

Public function Virtual

void

 

RHIBuildAccelerationStructure

(
    FRHIRayTracingGeometry* Geomet...
)

Public function Virtual

void

 

RHIBuildAccelerationStructures

(
    const TArrayView< const FAccelerati...
)

Public function

void

 

RHIDispatchComputeShader

(
    uint32 ThreadGroupCountX,
    uint32 ThreadGroupCountY,
    uint32 ThreadGroupCountZ
)

Public function

void

 

RHIDispatchIndirectComputeShader

(
    FRHIVertexBuffer* ArgumentBuff...,
    uint32 ArgumentOffset
)

Public function

void

 

RHISetShaderParameter

(
    FRHIComputeShader* ComputeShad...,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function

void

 

RHISetShaderResourceViewParameter

(
    FRHIComputeShader* ComputeShad...,
    uint32 SamplerIndex,
    FRHIShaderResourceView* SRV
)

Public function

void

 

RHISetShaderSampler

(
    FRHIComputeShader* ComputeShad...,
    uint32 SamplerIndex,
    FRHISamplerState* NewState
)

Sets sampler state.

Public function

void

 

RHISetShaderTexture

(
    FRHIComputeShader* PixelShader,
    uint32 TextureIndex,
    FRHITexture* NewTexture
)

Set the shader resource view of a surface.

Public function

void

 

RHISetShaderUniformBuffer

(
    FRHIComputeShader* ComputeShad...,
    uint32 BufferIndex,
    FRHIUniformBuffer* Buffer
)

Public function

void

 

RHISetUAVParameter

(
    FRHIComputeShader* ComputeShad...,
    uint32 UAVIndex,
    FRHIUnorderedAccessView* UAV
)

Sets a compute shader UAV parameter.

Public function

void

 

RHISetUAVParameter

(
    FRHIComputeShader* ComputeShad...,
    uint32 UAVIndex,
    FRHIUnorderedAccessView* UAV,
    uint32 InitialCount
)

Sets a compute shader counted UAV parameter and initial count

Deprecated Functions

Name Description

Public function Virtual

void

 

RHISetShadingRateImage

(
    FRHITexture* RateImageTexture,
    EVRSRateCombiner Combiner
)

RHISetShadingRateImage is deprecated. Bind the shading rate image as part of the RHISetRenderTargetsInfo struct.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss