FComputeShaderUtils

All utils for compute shaders.

Windows
MacOS
Linux

References

Module

RenderCore

Header

/Engine/Source/Runtime/RenderCore/Public/RenderGraphUtils.h

Include

#include "RenderGraphUtils.h"

Syntax

struct FComputeShaderUtils

Remarks

All utils for compute shaders.

Functions

Name Description

Public function Static

void

 

AddPass

(
    FRDGBuilder& GraphBuilder,
    FRDGEventName&& PassName,
    const TShaderRef< TShaderClass >& ...,
    typename TShaderClass::FParameters ...,
    FIntVector GroupCount
)

Dispatch a compute shader to render graph builder with its parameters.

Public function Static

void

 

AddPass

(
    FRDGBuilder& GraphBuilder,
    FRDGEventName&& PassName,
    const TShaderRef< TShaderClass >& ...,
    typename TShaderClass::FParameters ...,
    FRDGBufferRef IndirectArgsBuffer,
    uint32 IndirectArgOffset
)

Dispatch a compute shader to render graph builder with its parameters.

Public function Static

void

 

ClearUAV

(
    FRDGBuilder& GraphBuilder,
    FGlobalShaderMap* ShaderMap,
    FRDGBufferUAVRef UAV,
    uint32 ClearValue
)

Public function Static

void

 

ClearUAV

(
    FRDGBuilder& GraphBuilder,
    FGlobalShaderMap* ShaderMap,
    FRDGBufferUAVRef UAV,
    FVector4 ClearValue
)

Public function Static

void

 

Dispatch

(
    FRHICommandList& RHICmdList,
    const TShaderRef< TShaderClass >& ...,
    const typename TShaderClass::FParam...,
    FIntVector GroupCount
)

Dispatch a compute shader to rhi command list with its parameters.

Public function Static

void

 

DispatchIndirect

(
    FRHICommandList& RHICmdList,
    const TShaderRef< TShaderClass >& ...,
    const typename TShaderClass::FParam...,
    FRHIVertexBuffer* IndirectArgs...,
    uint32 IndirectArgOffset
)

Indirect dispatch a compute shader to rhi command list with its parameters.

Public function Static

void

 

DispatchIndirect

(
    FRHICommandList& RHICmdList,
    const TShaderClass* ComputeSha...,
    const typename TShaderClass::FParam...,
    FRDGBufferRef IndirectArgsBuffer,
    uint32 IndirectArgOffset
)

Dispatch a compute shader to rhi command list with its parameters and indirect args.

Public function Static

FIntVector

 

GetGroupCount

(
    const int32 ThreadCount,
    const int32 GroupSize
)

Compute the number of group to dispatch.

Public function Static

FIntVector

 

GetGroupCount

(
    const FIntPoint& ThreadCount,
    const FIntPoint& GroupSize
)

Public function Static

FIntVector

 

GetGroupCount

(
    const FIntPoint& ThreadCount,
    const int32 GroupSize
)

Public function Static

FIntVector

 

GetGroupCount

(
    const FIntVector& ThreadCount,
    const FIntVector& GroupSize
)

Constants

Name

Description

kGolden2DGroupSize

Ideal size of group size 8x8 to occupy at least an entire wave on GCN, two warp on Nvidia.

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