UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GPUSort.h File Reference
#include "CoreMinimal.h"
#include "RHI.h"

Go to the source code of this file.

Classes

struct  FGPUSortBuffers
 

Enumerations

enum  EGPUSortTest { GPU_SORT_TEST_SMALL = 1 , GPU_SORT_TEST_LARGE , GPU_SORT_TEST_EXHAUSTIVE , GPU_SORT_TEST_RANDOM }
 

Functions

int32 GetGPUSortPassCount (uint32 KeyMask)
 
ENGINE_API int32 SortGPUBuffers (FRHICommandList &RHICmdList, FGPUSortBuffers SortBuffers, int32 BufferIndex, uint32 KeyMask, int32 Count, ERHIFeatureLevel::Type FeatureLevel)
 
void TestGPUSort (EGPUSortTest TestToRun, ERHIFeatureLevel::Type FeatureLevel)
 

Enumeration Type Documentation

◆ EGPUSortTest

GPU sorting tests.

Enumerator
GPU_SORT_TEST_SMALL 

Tests the sort on a small set of elements.

GPU_SORT_TEST_LARGE 

Tests the sort on a large set of elements.

GPU_SORT_TEST_EXHAUSTIVE 

Tests the sort on many different sizes of elements.

GPU_SORT_TEST_RANDOM 

Function Documentation

◆ GetGPUSortPassCount()

int32 GetGPUSortPassCount ( uint32  KeyMask)

Get the number of passes we will need to make in order to sort

◆ SortGPUBuffers()

ENGINE_API int32 SortGPUBuffers ( FRHICommandList RHICmdList,
FGPUSortBuffers  SortBuffers,
int32  BufferIndex,
uint32  KeyMask,
int32  Count,
ERHIFeatureLevel::Type  FeatureLevel 
)

Sort a buffer on the GPU.

Parameters
SortBuffers- The buffer to sort including required views and a ping- pong location of appropriate size.
BufferIndex- Index of the buffer containing keys.
KeyMask- Bitmask indicating which key bits contain useful information.
Count- How many items in the buffer need to be sorted.
Returns
The index of the buffer containing sorted results.

◆ TestGPUSort()

void TestGPUSort ( EGPUSortTest  TestToRun,
ERHIFeatureLevel::Type  FeatureLevel 
)

Test that GPU sorting works.

Parameters
TestToRun- The test to run.