FGPUSortManager

A manager that handles different GPU sort tasks.

Windows
MacOS
Linux

Inheritance Hierarchy

FRefCountedObject

FGPUSortManager

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/GPUSortManager.h

Include

#include "GPUSortManager.h"

Syntax

class FGPUSortManager : public FRefCountedObject

Remarks

A manager that handles different GPU sort tasks. Each task has different constraints about when the data can be generated and when the sorted results need to be available. The usecase involes registering a sort task through AddTask() and then initializing the sort data through the KeyGen callback. The sort manager can be enabled or disabled through "fx.AllowGPUSorting"

Constructors

Name Description

Public function

FGPUSortManager

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Creates the sort manager, this is when the settings are configured.

Destructors

Name Description

Public function

~FGPUSortManager()

Functions

Name Description

Public function

bool

 

AddTask

(
    FAllocationInfo& OutInfo,
    int32 ValueCount,
    EGPUSortFlags TaskFlags
)

Add a GPU sort task to process this frame.

Public function

void

 

OnPostRenderOpaque

(
    FRHICommandListImmediate& RHICmdLi...
)

Callback that needs to be called in the rendering loop, after calls to FFXSystemInterface::PostRenderOpaque() are issued.

Public function

void

 

OnPreRender

(
    FRHICommandListImmediate& RHICmdLi...
)

Callback that needs to be called in the rendering loop, after calls to FFXSystemInterface::PreRender() are issued.

Public function

void

 

Register

(
    const FGPUSortKeyGenDelegate& Call...,
    EGPUSortFlags UsedFlags,
    const FName& InName
)

Register a client system into the sort manager.

Classes

Name

Description

Public struct

FAllocationInfo

Information about the bindings for a given sort task.

Public struct

FKeyGenInfo

A little helper to generate the batch element keys based on the number of elements in the batch and the sort precision.

Enums

Name

Description

Private enum

ESortBatchProcessingOrder

Defines the order in which sort batches are processed every frame.

Typedefs

Name

Description

FCallbackArray

FDynamicValueBufferArray

FSortBatchArray

Expected that few will be enough, since we only need severals batches when ESortBatchProcessingOrder::KeyGenAfterPreRenderAndSortAfterPostRenderOpaque.

FValueBufferArray

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