FSortBatch

Defines a sort batch that regroups several sort tasks created by [FGPUSortManager::AddTask()](API\Runtime\Engine\FGPUSortManager\AddTask), becoming sort the batch elements.

Windows
MacOS
Linux

References

Module

Engine

Header

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

Include

#include "GPUSortManager.h"

Syntax

struct FSortBatch

Remarks

Defines a sort batch that regroups several sort tasks created by FGPUSortManager::AddTask(), becoming sort the batch elements. The condition to regroup task in the same batch rely mostly around the key precisions and the sort location (PreRender or PostRenderOpaque). Each SortBatch maps to a single GPU sort task.

Variables

Name Description

Public variable

FDynamicValueBu...

 

DynamicValueBuffer

The buffer to hold the final sorted values.

Public variable

EGPUSortFlags

 

Flags

The common requirement flag for this batch.

Public variable

int32

 

Id

An Id defining this batch. Passed along FGPUSortKeyGenDelegate.

Public variable

int32

 

NumElements

The number of elements (tasks) grouped in this batch.

Public variable

ESortBatchProce...

 

ProcessingOrder

This batch processing order in the frame.

Public variable

FParticleSortBu...

 

SortBuffers

The scratch buffers used to hold the initial keys and values and perform the GPU sort.

Functions

Name Description

Public function

void

 

GenerateKeys

(
    FRHICommandListImmediate& RHICmdLi...,
    const FCallbackArray& InCallbacks,
    EGPUSortFlags KeyGenLocation
)

Call each delegate registered in the FGPUSortManager so they setup their task data for each element they own in the batch.

Public function Const

int32

 

GetAllocatedValueCount()

Get the batch buffer allocated size.

Public function Const

int32

 

GetUsedValueCount()

Get batch currently used size for this frame.

Public function

void

 

SortAndResolve

(
    FRHICommandListImmediate& RHICmdLi...,
    ERHIFeatureLevel::Type InFeatureLev...
)

Perform the GPU sort and resolve to all buffers referenced in FGPUSortManager::AddTask(), if the buffer grew in size.

Public function

void

 

UpdateProcessingOrder()

Compute the processing order from the current value of Flags.

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