engine
 
载入中...
搜索中...
未找到
类 | Public 成员函数 | 所有成员列表
FGPUSortManager类 参考

A manager that handles different GPU sort tasks. 更多...

#include <GPUSortManager.h>

+ 类 FGPUSortManager 继承关系图:

类

struct  FAllocationInfo
 Information about the bindings for a given sort task. 更多...
 
struct  FKeyGenInfo
 A little helper to generate the batch element keys based on the number of elements in the batch and the sort precision. 更多...
 

Public 成员函数

bool AddTask (FAllocationInfo &OutInfo, int32 ValueCount, EGPUSortFlags TaskFlags)
 Add a GPU sort task to process this frame. 更多...
 
 DECLARE_EVENT_OneParam (FGPUSortManager, FPostPreRenderEvent, FRHICommandListImmediate &)
 Event to register and receive post-prerender notification.
 
 FGPUSortManager (ERHIFeatureLevel::Type InFeatureLevel)
 Creates the sort manager, this is when the settings are configured.
 
void OnPostRenderOpaque (FRHICommandListImmediate &RHICmdList)
 Callback that needs to be called in the rendering loop, after calls to FFXSystemInterface::PostRenderOpaque() are issued. 更多...
 
void OnPreRender (FRHICommandListImmediate &RHICmdList)
 Callback that needs to be called in the rendering loop, after calls to FFXSystemInterface::PreRender() are issued. 更多...
 
void Register (const FGPUSortKeyGenDelegate &CallbackDelegate, EGPUSortFlags UsedFlags, const FName &InName)
 Register a client system into the sort manager. 更多...
 

详细描述

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"

成员函数说明

◆ AddTask()

bool FGPUSortManager::AddTask ( FAllocationInfo &  OutInfo,
int32  ValueCount,
EGPUSortFlags  TaskFlags 
)

Add a GPU sort task to process this frame.

Tasks are expected to be created before OnPreRender() gets called.

参数
OutInfo- The details about the allocation bindings, if success.
IndexCount- The number of values that need to be sorted by this task.
SortFlags- The sort task requirements.

Return true if the task was added to a batch, false otherwise, could be because GPU sorting is disabled.

◆ OnPostRenderOpaque()

void FGPUSortManager::OnPostRenderOpaque ( FRHICommandListImmediate &  RHICmdList)

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

Tasks with EGPUSortFlags::KeyGenAfterPostRenderOpaque get their client callbacks issued to set the initial keys and values. After this any sort task that hasn't been processed yet, in OnPreRender(), gets processed now.

参数
RHICmdList- The command list to be used.

◆ OnPreRender()

void FGPUSortManager::OnPreRender ( FRHICommandListImmediate &  RHICmdList)

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

At this point, no other GPU sort tasks are allowed to be created through AddTask() as the sort batches get finalized. At this point, any task with the EGPUSortFlags::SortAfterPreRender will possibly be done, unless it also had the EGPUSortFlags::SortAfterPostRenderOpaque flag. Tasks with EGPUSortFlags::KeyGenAfterPreRender get their client callbacks issued to set the initial keys and values.

参数
RHICmdList- The command list to be used.

◆ Register()

void FGPUSortManager::Register ( const FGPUSortKeyGenDelegate &  CallbackDelegate,
EGPUSortFlags  UsedFlags,
const FName &  InName 
)

Register a client system into the sort manager.

Client systems are systems that will call AddTask(). Those systems need to register a callback, the possible used flags for their tasks and a name. The callback is required because the initial content to perform GPU sorts is only configured long after AddTask() gets called in the rendering loop.

参数
CallbackDelegate- The callback that will be used to set the initial keys and values for each batch elements.
UsedFlags- The possibly used flags for each of the client system tasks, used to perform some optimizations.
InName- A name defining this client system, used for GPU markers.

该类的文档由以下文件生成: