Language:
Discover
By Skill Level
By Category

IRHICommandContext

Choose your OS:

Inheritance Hierarchy

Syntax

class IRHICommandContext :
    public IRHIComputeContext ,
    public IRHIDeprecatedContext

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

 

RHIAutomaticCacheFlushAfterComputeShader

(
    bool bEnable
)

Public function Virtual

void

 

RHIBeginComputePass

(
    const TCHAR * InName
)

Public function

void

 

RHIBeginDrawIndexedPrimitiveUP

(
    uint32 PrimitiveType,
    uint32 NumPrimitives,
    uint32 NumVertices,
    uint32 VertexDataStride,
    void*& OutVertexData,
    uint32 MinVertexIndex,
    uint32 NumIndices,
    uint32 IndexDataStride,
    void*& OutIndexData
)

Preallocate memory or get a direct command stream pointer to fill up for immediate rendering .

Public function

void

 

RHIBeginDrawingViewport

(
    FViewportRHIParamRef Viewport,
    FTextureRHIParamRef 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

 

RHIBeginDrawPrimitiveUP

(
    uint32 PrimitiveType,
    uint32 NumPrimitives,
    uint32 NumVertices,
    uint32 VertexDataStride,
    void*& OutVertexData
)

Preallocate memory or get a direct command stream pointer to fill up for immediate rendering .

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

 

RHIBeginRenderPass

(
    const FRHIRenderPassInfo & InInfo,
    const TCHAR * InName
)

Public function

void

 

RHIBeginRenderQuery

(
    FRenderQueryRHIParamRef 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

Public function Virtual

void

 

RHIBeginUpdateMultiFrameResource

(
    FTextureRHIParamRef 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

 

RHIBindClearMRTValues

(
    bool bClearColor,
    bool bClearDepth,
    bool bClearStencil
)

Bind the clear state of the currently set rendertargets.

Public function

void

 

RHIClearTinyUAV

(
    FUnorderedAccessViewRHIParamRef Uno...,
    const uint32 * Values
)

Clears a UAV to the multi-component value provided.

Public function Virtual

void

 

RHICopyTexture

(
    FTextureRHIParamRef SourceTexture,
    FTextureRHIParamRef DestTexture,
    const FRHICopyTextureInfo & CopyInf...
)

Public function

void

 

RHICopyToResolveTarget

(
    FTextureRHIParamRef SourceTexture,
    FTextureRHIParamRef 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

(
    FIndexBufferRHIParamRef IndexBuffer...,
    uint32 PrimitiveType,
    FStructuredBufferRHIParamRef Argume...,
    int32 DrawArgumentsIndex,
    uint32 NumInstances
)

Public function

void

 

RHIDrawIndexedPrimitive

(
    FIndexBufferRHIParamRef IndexBuffer,
    uint32 PrimitiveType,
    int32 BaseVertexIndex,
    uint32 FirstInstance,
    uint32 NumVertices,
    uint32 StartIndex,
    uint32 NumPrimitives,
    uint32 NumInstances
)

Public function

void

 

RHIDrawIndexedPrimitiveIndirect

(
    uint32 PrimitiveType,
    FIndexBufferRHIParamRef IndexBuffer,
    FVertexBufferRHIParamRef ArgumentBu...,
    uint32 ArgumentOffset
)

Public function

void

 

RHIDrawPrimitive

(
    uint32 PrimitiveType,
    uint32 BaseVertexIndex,
    uint32 NumPrimitives,
    uint32 NumInstances
)

Public function

void

 

RHIDrawPrimitiveIndirect

(
    uint32 PrimitiveType,
    FVertexBufferRHIParamRef ArgumentBu...,
    uint32 ArgumentOffset
)

Public function Virtual

void

 

RHIEndComputePass()

Public function

void

 

RHIEndDrawIndexedPrimitiveUP()

Draw a primitive using the vertex and index data populated since RHIBeginDrawIndexedPrimitiveUP and clean up any memory as needed

Public function

void

 

RHIEndDrawingViewport

(
    FViewportRHIParamRef 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

 

RHIEndDrawPrimitiveUP()

Draw a primitive using the vertex data populated since RHIBeginDrawPrimitiveUP and clean up any memory as needed

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

 

RHIEndRenderPass()

Public function

void

 

RHIEndRenderQuery

(
    FRenderQueryRHIParamRef 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

Public function Virtual

void

 

RHIEndUpdateMultiFrameResource

(
    FTextureRHIParamRef Texture
)

Public function

void

 

RHIFlushComputeShaderCache()

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

 

RHISetBlendFactor

(
    const FLinearColor & BlendFactor
)

Public function

void

 

RHISetDepthBounds

(
    float MinDepth,
    float MaxDepth
)

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

Public function Virtual

void

 

RHISetGraphicsPipelineState

This will set most relevant pipeline state.

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

void

 

RHISetRenderTargets

(
    uint32 NumSimultaneousRenderTargets,
    const FRHIRenderTargetView * Ne...,
    const FRHIDepthRenderTargetView ...,
    uint32 NumUAVs,
    const FUnorderedAccessViewRHIParamR ...
)

Public function

void

 

RHISetRenderTargetsAndClear

(
    const FRHISetRenderTargetsInfo & Re...
)

Public function

void

 

RHISetScissorRect

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

Public function

void

 

RHISetShaderParameter

(
    FPixelShaderRHIParamRef PixelShader,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function

void

 

RHISetShaderParameter

(
    FVertexShaderRHIParamRef VertexShad...,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function

void

 

RHISetShaderParameter

(
    FGeometryShaderRHIParamRef Geometry...,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function

void

 

RHISetShaderParameter

(
    FHullShaderRHIParamRef HullShader,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function

void

 

RHISetShaderParameter

(
    FDomainShaderRHIParamRef DomainShad...,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function

void

 

RHISetShaderResourceViewParameter

(
    FGeometryShaderRHIParamRef Geometry...,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function

void

 

RHISetShaderResourceViewParameter

(
    FDomainShaderRHIParamRef DomainShad...,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function

void

 

RHISetShaderResourceViewParameter

(
    FHullShaderRHIParamRef HullShader,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function

void

 

RHISetShaderResourceViewParameter

(
    FVertexShaderRHIParamRef VertexShad...,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function

void

 

RHISetShaderResourceViewParameter

(
    FPixelShaderRHIParamRef PixelShader,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function

void

 

RHISetShaderSampler

(
    FDomainShaderRHIParamRef DomainShad...,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function

void

 

RHISetShaderSampler

(
    FHullShaderRHIParamRef HullShader,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function

void

 

RHISetShaderSampler

(
    FPixelShaderRHIParamRef PixelShader,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function

void

 

RHISetShaderSampler

(
    FVertexShaderRHIParamRef VertexShad...,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function

void

 

RHISetShaderSampler

(
    FGeometryShaderRHIParamRef Geometry...,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function

void

 

RHISetShaderTexture

(
    FVertexShaderRHIParamRef VertexShad...,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function

void

 

RHISetShaderTexture

(
    FHullShaderRHIParamRef HullShader,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function

void

 

RHISetShaderTexture

(
    FDomainShaderRHIParamRef DomainShad...,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function

void

 

RHISetShaderTexture

(
    FGeometryShaderRHIParamRef Geometry...,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function

void

 

RHISetShaderTexture

(
    FPixelShaderRHIParamRef PixelShader,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function

void

 

RHISetShaderUniformBuffer

(
    FVertexShaderRHIParamRef VertexShad...,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function

void

 

RHISetShaderUniformBuffer

(
    FHullShaderRHIParamRef HullShader,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function

void

 

RHISetShaderUniformBuffer

(
    FDomainShaderRHIParamRef DomainShad...,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function

void

 

RHISetShaderUniformBuffer

(
    FGeometryShaderRHIParamRef Geometry...,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function

void

 

RHISetShaderUniformBuffer

(
    FPixelShaderRHIParamRef PixelShader,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function Virtual

void

 

RHISetStencilRef

(
    uint32 StencilRef
)

Public function Virtual

void

 

RHISetStereoViewport

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

Public function

void

 

RHISetStreamSource

(
    uint32 StreamIndex,
    FVertexBufferRHIParamRef VertexBuff...,
    uint32 Offset
)

Public function

void

 

RHISetViewport

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

Public function

void

 

RHITransitionResources

(
    EResourceTransitionAccess Transitio...,
    EResourceTransitionPipeline Transit...,
    FUnorderedAccessViewRHIParamRef ...,
    int32 NumUAVs
)

Public function Virtual

void

 

RHITransitionResources

(
    EResourceTransitionAccess Transitio...,
    FTextureRHIParamRef * InTexture...,
    int32 NumTextures
)

Explicitly transition a texture resource from readable -> writable by the GPU or vice versa.

Public function

void

 

RHIUpdateTextureReference

(
    FTextureReferenceRHIParamRef Textur...,
    FTextureRHIParamRef NewTexture
)

Overridden from IRHIComputeContext

Name Description

Public function

void

 

RHIDispatchComputeShader

(
    uint32 ThreadGroupCountX,
    uint32 ThreadGroupCountY,
    uint32 ThreadGroupCountZ
)

Public function

void

 

RHIDispatchIndirectComputeShader

(
    FVertexBufferRHIParamRef ArgumentBu...,
    uint32 ArgumentOffset
)

Public function

void

 

RHIPopEvent()

Public function

void

 

RHIPushEvent

(
    const TCHAR * Name,
    FColor Color
)

Public function Virtual

void

 

RHISetAsyncComputeBudget

(
    EAsyncComputeBudget Budget
)

Public function

void

 

RHISetComputeShader

(
    FComputeShaderRHIParamRef ComputeSh...
)

Sets the current compute shader.

Public function

void

 

RHISetShaderParameter

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 BufferIndex,
    uint32 BaseIndex,
    uint32 NumBytes,
    const void* NewValue
)

Public function

void

 

RHISetShaderResourceViewParameter

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 SamplerIndex,
    FShaderResourceViewRHIParamRef SRV
)

Public function

void

 

RHISetShaderSampler

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 SamplerIndex,
    FSamplerStateRHIParamRef NewState
)

Sets sampler state.

Public function

void

 

RHISetShaderTexture

(
    FComputeShaderRHIParamRef PixelShad...,
    uint32 TextureIndex,
    FTextureRHIParamRef NewTexture
)

Set the shader resource view of a surface.

Public function

void

 

RHISetShaderUniformBuffer

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 BufferIndex,
    FUniformBufferRHIParamRef Buffer
)

Public function

void

 

RHISetUAVParameter

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 UAVIndex,
    FUnorderedAccessViewRHIParamRef UAV
)

Sets a compute shader UAV parameter.

Public function

void

 

RHISetUAVParameter

(
    FComputeShaderRHIParamRef ComputeSh...,
    uint32 UAVIndex,
    FUnorderedAccessViewRHIParamRef UAV,
    uint32 InitialCount
)

Sets a compute shader counted UAV parameter and initial count

Public function

void

 

RHISubmitCommandsHint()

Submit the current command buffer to the GPU if possible.

Public function Virtual

void

 

RHITransitionResources

(
    EResourceTransitionAccess Transitio...,
    EResourceTransitionPipeline Transit...,
    FUnorderedAccessViewRHIParamRef ...,
    int32 NumUAVs,
    FComputeFenceRHIParamRef WriteCompu...
)

Explicitly transition a UAV from readable -> writable by the GPU or vice versa.

Public function Virtual

void

 

RHIWaitComputeFence

(
    FComputeFenceRHIParamRef InFence
)

Compute queue will wait for the fence to be written before continuing.

References

Module

RHI

Header

Runtime/RHI/Public/RHIContext.h