IRHIComputeContext

Context that is capable of doing Compute work. Can be async or compute on the gfx pipe.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

RHI

Header

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

Include

#include "RHIContext.h"

Syntax

class IRHIComputeContext

Remarks

Context that is capable of doing Compute work. Can be async or compute on the gfx pipe.

Functions

Name Description

Public function Virtual

void

 

RHICopyToStagingBuffer

(
    FRHIVertexBuffer* SourceBuffer...,
    FRHIStagingBuffer* Destination...,
    uint32 InOffset,
    uint32 InNumBytes
)

Performs a copy of the data in 'SourceBuffer' to 'DestinationStagingBuffer.' This will occur inline on the GPU timeline.

Public function

void

 

RHIDispatchComputeShader

(
    uint32 ThreadGroupCountX,
    uint32 ThreadGroupCountY,
    uint32 ThreadGroupCountZ
)

Public function

void

 

RHIDispatchIndirectComputeShader

(
    FRHIVertexBuffer* ArgumentBuff...,
    uint32 ArgumentOffset
)

Public function Virtual

void

 

RHIInvalidateCachedState()

Some RHI implementations (OpenGL) cache render state internally Signal to RHI that cached state is no longer valid

Public function

void

 

RHIPopEvent()

Public function

void

 

RHIPushEvent

(
    const TCHAR* Name,
    FColor Color
)

Public function Virtual

void

 

RHISetAsyncComputeBudget

(
    EAsyncComputeBudget Budget
)

Public function Virtual

void

 

RHISetComputePipelineState

(
    FRHIComputePipelineState* Comp...
)

Public function

void

 

RHISetComputeShader

(
    FRHIComputeShader* ComputeShad...
)

Sets the current compute shader.

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

Public function

void

 

RHISubmitCommandsHint()

Submit the current command buffer to the GPU if possible.

Public function

void

 

RHITransitionResources

(
    EResourceTransitionAccess Transitio...,
    EResourceTransitionPipeline Transit...,
    FRHIUnorderedAccessView** ...,
    int32 NumUAVs,
    FRHIComputeFence* WriteCompute...
)

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

Public function

void

 

RHIWaitComputeFence

(
    FRHIComputeFence* InFence
)

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

Public function Virtual

void

 

RHIWriteGPUFence

(
    FRHIGPUFence* FenceRHI
)

Write the fence in the GPU timeline.

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