Skip to content

ParallelSortRenderModule

class ParallelSortRenderModule : public cauldron::RenderModule

ParallelSortRenderModule handles a number of tasks related to Parallel Sort.

ParallelSortRenderModule takes care of: creating UI section that enable users to switch between options of Parallel Sort performs sorting of key and (optional) payload using FidelityFX ParallelSort Effect Component displays sort result validation (use sorted keys to re-construct a texture image properly)

Dependencies: FfxParallelSortContext, FfxParallelSortContextDescription

Inherits from: public cauldron::RenderModule

Public Interface

Constructor:

ParallelSortRenderModule

inline ParallelSortRenderModule()

Constructor with default behavior.

Attributes: inline

Source: samples/parallelsort/parallelsortrendermodule.h (line 65, column 5)

Destructor:

~ParallelSortRenderModule

virtual ~ParallelSortRenderModule()

Tear down the FFX API Context and release resources.

Attributes: virtual

Source: samples/parallelsort/parallelsortrendermodule.h (line 70, column 13)

Public Functions:

Init

virtual void Init(const json &initData) override

Initialize FFX API Context, creates randomized key/payload data to sort, loads required textures, and setup UI section for Parallel Sort.

Parameters:

NameTypeDefault
initDataconst json &

Attributes: virtual

Source: samples/parallelsort/parallelsortrendermodule.h (line 76, column 10)

Execute

virtual void Execute(double deltaTime, cauldron::CommandList *pCmdList) override

Setup input resources and parameters FFX API needs this frame and then call the FFX Dispatch to sort the keys (and payload).

Parameters:

NameTypeDefault
deltaTimedouble
pCmdListcauldron::CommandList *

Attributes: virtual

Source: samples/parallelsort/parallelsortrendermodule.h (line 81, column 10)

OnResize

virtual void OnResize(const cauldron::ResolutionInfo &resInfo) override

Called by the framework when resolution changes.

Parameters:

NameTypeDefault
resInfoconst cauldron::ResolutionInfo &

Attributes: virtual

Source: samples/parallelsort/parallelsortrendermodule.h (line 86, column 10)

Private Interface

Private Functions:

InitFfxContext

void InitFfxContext()

Source: samples/parallelsort/parallelsortrendermodule.h (line 109, column 10)

DestroyFfxContext

void DestroyFfxContext()

Source: samples/parallelsort/parallelsortrendermodule.h (line 111, column 10)

TextureLoadComplete

void TextureLoadComplete(const std::vector<const cauldron::Texture *> &textureList, void *)

Callback for texture loading so we can complete parameter binding and mark the module “ready”.

Parameters:

NameTypeDefault
textureListconst std::vector<const cauldron::Texture *> &
void *

Source: samples/parallelsort/parallelsortrendermodule.h (line 116, column 10)

ResetParallelSortContext

void ResetParallelSortContext()

Destroys and recreates FfxParallelSortContext to reflect changes request from the UI.

Source: samples/parallelsort/parallelsortrendermodule.h (line 121, column 10)

Private Members:

const uint32_t s_NumKeys

static const uint32_t s_NumKeys

Attributes: static, private

Source: samples/parallelsort/parallelsortrendermodule.h (line 99, column 27)

const cauldron::Buffer * m_pKeysToSort

const cauldron::Buffer * m_pKeysToSort = = nullptr

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 102, column 28)

const cauldron::Buffer * m_pPayloadToSort

const cauldron::Buffer * m_pPayloadToSort = = nullptr

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 103, column 28)

const cauldron::Buffer * m_pUnsortedBuffers

const cauldron::Buffer * m_pUnsortedBuffers = = &#123; nullptr &#125;

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 105, column 28)

const cauldron::CopyResource * m_pCopyResources

const cauldron::CopyResource * m_pCopyResources = = &#123; nullptr &#125;

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 106, column 34)

const cauldron::Texture * m_pValidationTextures

const cauldron::Texture * m_pValidationTextures = = &#123; nullptr &#125;

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 107, column 29)

FfxParallelSortContextDescription m_InitializationParameters

FfxParallelSortContextDescription m_InitializationParameters = = &#123;&#125;

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 124, column 39)

FfxParallelSortContext m_ParallelSortContext

FfxParallelSortContext m_ParallelSortContext

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 125, column 39)

int32_t m_ParallelSortResolutions

int32_t m_ParallelSortResolutions = = 1

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 127, column 17)

int32_t m_ParallelSortPresentationMode

int32_t m_ParallelSortPresentationMode = = 0

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 128, column 17)

bool m_ParallelSortRenderSortedKeys

bool m_ParallelSortRenderSortedKeys = = false

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 129, column 17)

bool m_ParallelSortPayload

bool m_ParallelSortPayload = = false

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 130, column 17)

bool m_ParallelSortIndirectExecution

bool m_ParallelSortIndirectExecution = = false

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 131, column 17)

cauldron::RootSignature * m_pRootSignature

cauldron::RootSignature * m_pRootSignature = = nullptr

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 133, column 32)

cauldron::PipelineObject * m_pPipelineObj

cauldron::PipelineObject * m_pPipelineObj = = nullptr

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 134, column 32)

cauldron::ParameterSet * m_pParameters

cauldron::ParameterSet * m_pParameters = = nullptr

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 135, column 32)

const cauldron::Texture * m_pRenderTarget

const cauldron::Texture * m_pRenderTarget = = nullptr

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 136, column 32)

const cauldron::RasterView * m_pRasterView

const cauldron::RasterView * m_pRasterView = = nullptr

Attributes: private

Source: samples/parallelsort/parallelsortrendermodule.h (line 137, column 32)

Source: samples/parallelsort/parallelsortrendermodule.h (line 59, column 1)