Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FGPUSortManager
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.
| Name | FSortBatch |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/GPUSortManager.h |
| Include Path | #include "GPUSortManager.h" |
Syntax
struct FSortBatch
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DynamicValueBuffer | FDynamicValueBuffer * | The buffer to hold the final sorted values. | GPUSortManager.h | |
| Flags | EGPUSortFlags | The common requirement flag for this batch. | GPUSortManager.h | |
| Id | int32 | An Id defining this batch. Passed along FGPUSortKeyGenDelegate. | GPUSortManager.h | |
| NumElements | int32 | The number of elements (tasks) grouped in this batch. | GPUSortManager.h | |
| ProcessingOrder | ESortBatchProcessingOrder | This batch processing order in the frame. | GPUSortManager.h | |
| SortBuffers | FParticleSortBuffers * | The scratch buffers used to hold the initial keys and values and perform the GPU sort. | GPUSortManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void GenerateKeys
(
FRHICommandListImmediate& RHICmdList, |
Call each delegate registered in the FGPUSortManager so they setup their task data for each element they own in the batch. | GPUSortManager.h | |
int32 GetAllocatedValueCount() |
Get the batch buffer allocated size. | GPUSortManager.h | |
int32 GetUsedValueCount() |
Get batch currently used size for this frame. | GPUSortManager.h | |
void SortAndResolve
(
FRHICommandListImmediate& RHICmdList, |
Perform the GPU sort and resolve to all buffers referenced in FGPUSortManager::AddTask(), if the buffer grew in size. | GPUSortManager.h | |
void UpdateProcessingOrder() |
Compute the processing order from the current value of Flags. | GPUSortManager.h |