FidelityFX Parallel Sort
Navigation: SDK → Effect Components
FidelityFX Parallel Sort
FidelityFX Single Pass Downsampler runtime library.
Defines
FFX_PARALLELSORT_VERSION_MAJOR
#define FFX_PARALLELSORT_VERSION_MAJOR (1)
FidelityFX Parallel Sort major version.
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 38, column 9)
FFX_PARALLELSORT_VERSION_MINOR
#define FFX_PARALLELSORT_VERSION_MINOR (3)
FidelityFX Parallel Sort minor version.
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 43, column 9)
FFX_PARALLELSORT_VERSION_PATCH
#define FFX_PARALLELSORT_VERSION_PATCH (0)
FidelityFX Parallel Sort patch version.
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 48, column 9)
FFX_PARALLELSORT_CONTEXT_COUNT
#define FFX_PARALLELSORT_CONTEXT_COUNT 1
FidelityFX SPD context count.
Defines the number of internal effect contexts required by SPD
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 55, column 9)
FFX_PARALLELSORT_CONTEXT_SIZE
#define FFX_PARALLELSORT_CONTEXT_SIZE (373794)
The size of the context specified in 32bit values.
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 60, column 9)
Functions
ffxParallelSortContextCreate
FFX_API FfxErrorCode ffxParallelSortContextCreate(FfxParallelSortContext *pContext, const FfxParallelSortContextDescription *pContextDescription)
Create a FidelityFX Parallel Sort context from the parameters programmed to the FfxParallelSortContextDescription structure.
The context structure is the main object used to interact with the parallel sort API, and is responsible for the management of the internal resources used by the parallel sort algorithm. When this API is called, multiple calls will be made via the pointers contained in the callbacks structure. These callbacks will attempt to retreive the device capabilities, and create the internal resources, and pipelines required by parallel sorts’ frame-to-frame function. Depending on the precise configuration used when creating the FfxParallelSortContext a different set of resources and pipelines might be requested via the callback functions.
The FfxParallelSortContext should be destroyed when use of it is completed, typically when an application is unloaded or parallel sort upscaling is disabled by a user. To destroy the parallel sort context you should call ffxParallelSortContextDestroy.
Parameters:
pContext
(FfxParallelSortContext *
) – [out] A pointer to a FfxParallelSortContext structure to populate.pContextDescription
(const FfxParallelSortContextDescription *
) – [in] A pointer to a FfxParallelSortContextDescription structure.
Returns: FFX_API FfxErrorCode
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 170, column 22)
ffxParallelSortContextDispatch
FFX_API FfxErrorCode ffxParallelSortContextDispatch(FfxParallelSortContext *pContext, const FfxParallelSortDispatchDescription *pDispatchDescription)
Execute a FidelityFX Parallel Sort context to sort the provided data according to the passed in dispatch description.
Parameters:
pContext
(FfxParallelSortContext *
) – [out] A pointer to a FfxParallelSortContext structure to populate.pDispatchDescription
(const FfxParallelSortDispatchDescription *
) – [in] A pointer to a FfxParallelSortDispatchDescription structure.
Returns: FFX_API FfxErrorCode
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 186, column 22)
ffxParallelSortContextDestroy
FFX_API FfxErrorCode ffxParallelSortContextDestroy(FfxParallelSortContext *pContext)
Destroy the FidelityFX Parallel Sort context.
Parameters:
pContext
(FfxParallelSortContext *
) – [out] A pointer to a FfxParallelSortContext structure to destroy.
Returns: FFX_API FfxErrorCode
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 198, column 22)
ffxParallelSortGetEffectVersion
FFX_API FfxVersionNumber ffxParallelSortGetEffectVersion()
Queries the effect version number.
Returns: The SDK version the effect was built with.
Returns: FFX_API FfxVersionNumber
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 206, column 26)
Enumerations
FfxParallelSortPass
enum FfxParallelSortPass
An enumeration of the passes which constitute the Parallel Sort algorithm.
Parallel Sort is implemented as a multi-pass algorithm that is invoked over a number of successive iterations until all bits in the key are sorted. For a more comprehensive description of Parallel Sort’s inner workings, please refer to the Parallel Sort reference documentation.
Values:
FFX_PARALLELSORT_PASS_SETUP_INDIRECT_ARGS
FFX_PARALLELSORT_PASS_SETUP_INDIRECT_ARGS = 0
A pass which sets up indirect params to invoke sorting when FFX_PARALLEL_SORT_INDIRECT flag bit is set.
FFX_PARALLELSORT_PASS_SUM
A pass which counts the number of occurrences of each value in the data set.
FFX_PARALLELSORT_PASS_REDUCE
A pass which further reduces the counts across thread groups for faster offset calculations in large data sets.
FFX_PARALLELSORT_PASS_SCAN
A pass which prefixes the count totals into global offsets.
FFX_PARALLELSORT_PASS_SCAN_ADD
A pass which does a second prefix add the global offsets to each local thread group offset.
FFX_PARALLELSORT_PASS_SCATTER
A pass which performs a local sort of all values in the thread group and outputs to new global offset.
FFX_PARALLELSORT_PASS_COUNT
The number of passes in Parallel Sort.
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 74, column 1)
FfxParallelSortInitializationFlagBits
enum FfxParallelSortInitializationFlagBits
An enumeration of bit flags used when creating a FfxParallelSortContextDescription. See FfxParallelSortContextDescription.
Values:
FFX_PARALLELSORT_INDIRECT_SORT
FFX_PARALLELSORT_INDIRECT_SORT = (1 <<0)
A bit indicating if we should use indirect version of sort algorithm.
FFX_PARALLELSORT_PAYLOAD_SORT
FFX_PARALLELSORT_PAYLOAD_SORT = (1 <<1)
A bit indicating if we should sort a payload buffer
Source: sdk/include/FidelityFX/host/ffx_parallelsort.h
(line 91, column 1)
Dependencies: FfxParallelSortContext, FfxParallelSortContextDescription, FfxParallelSortDispatchDescription