Skip to content

FidelityFX LPM

Navigation: SDKEffect Components

FidelityFX LPM

FidelityFX Luma Preserving Mapper runtime library.

Defines

FFX_LPM_VERSION_MAJOR

#define FFX_LPM_VERSION_MAJOR (1)

FidelityFX Luma Preserving Mapper 1.3 major version.

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 38, column 9)

FFX_LPM_VERSION_MINOR

#define FFX_LPM_VERSION_MINOR (4)

FidelityFX Luma Preserving Mapper 1.3 minor version.

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 43, column 9)

FFX_LPM_VERSION_PATCH

#define FFX_LPM_VERSION_PATCH (0)

FidelityFX Luma Preserving Mapper 1.3 patch version.

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 48, column 9)

FFX_LPM_CONTEXT_COUNT

#define FFX_LPM_CONTEXT_COUNT 1

FidelityFX Luma Preserving Mapper context count.

Defines the number of internal effect contexts required by LPM

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 55, column 9)

FFX_LPM_CONTEXT_SIZE

#define FFX_LPM_CONTEXT_SIZE (9300)

The size of the context specified in 32bit values.

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 60, column 9)

Functions

ffxLpmContextCreate

FFX_API FfxErrorCode ffxLpmContextCreate(FfxLpmContext *pContext, const FfxLpmContextDescription *pContextDescription)

Create a FidelityFX Luma Preserving 1.0 context from the parameters programmed to the FfxLpmContextDescription structure.

The context structure is the main object used to interact with the Luma Preserving Mapper 1.0 API, and is responsible for the management of the internal resources used by the LPM 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 LPM frame-to-frame function. Depending on the precise configuration used when creating the FfxLpmContext a different set of resources and pipelines might be requested via the callback functions.

The FfxLpmContext should be destroyed when use of it is completed, typically when an application is unloaded or LPM tone and gamut mapping is disabled by a user. To destroy the LPM context you should call ffxLpmContextDestroy.

Parameters:

  • pContext (FfxLpmContext *) – [out] A pointer to a FfxLpmContext structure to populate.
  • pContextDescription (const FfxLpmContextDescription *) – [in] A pointer to a FfxLpmContextDescription structure.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 207, column 22)

ffxLpmContextDispatch

FFX_API FfxErrorCode ffxLpmContextDispatch(FfxLpmContext *pContext, const FfxLpmDispatchDescription *pDispatchDescription)

Dispatches work to the FidelityFX LPM context.

Parameters:

  • pContext (FfxLpmContext *) – [out] A pointer to a FfxLpmContext structure to populate.
  • pDispatchDescription (const FfxLpmDispatchDescription *) – [in] A pointer to a FfxLpmDispatchDescription structure.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 221, column 22)

ffxLpmContextDestroy

FFX_API FfxErrorCode ffxLpmContextDestroy(FfxLpmContext *pContext)

Destroy the FidelityFX LPM context.

Parameters:

  • pContext (FfxLpmContext *) – [out] A pointer to a FfxLpmContext structure to destroy.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 233, column 22)

FfxPopulateLpmConsts

FFX_API FfxErrorCode FfxPopulateLpmConsts(bool incon, bool insoft, bool incon2, bool inclip, bool inscaleOnly, uint32_t &outcon, uint32_t &outsoft, uint32_t &outcon2, uint32_t &outclip, uint32_t &outscaleOnly)

Sets up the constant buffer data necessary for LPM compute.

Parameters:

  • incon (bool) – [in]
  • insoft (bool) – [in]
  • incon2 (bool) – [in]
  • inclip (bool) – [in]
  • inscaleOnly (bool) – [in]
  • outcon (uint32_t &) – [out]
  • outsoft (uint32_t &) – [out]
  • outcon2 (uint32_t &) – [out]
  • outclip (uint32_t &) – [out]
  • outscaleOnly (uint32_t &) – [out]

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 252, column 22)

ffxLpmGetEffectVersion

FFX_API FfxVersionNumber ffxLpmGetEffectVersion()

Queries the effect version number.

Returns: The SDK version the effect was built with.

Returns: FFX_API FfxVersionNumber

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 269, column 26)

Enumerations

FfxLpmPass

enum FfxLpmPass

An enumeration of all the passes which constitute the LPM algorithm.

LPM is implemented as a composite of several compute passes each computing a key part of the final result. Each call to the FfxLPMScheduleGpuJobFunc callback function will correspond to a single pass included in FfxLPMPass. For a more comprehensive description of each pass, please refer to the LPM reference documentation.

Values:

FFX_LPM_PASS_FILTER

FFX_LPM_PASS_FILTER = 0

A pass which filters the color buffer using LPM’s tone and gamut mapping solution.

FFX_LPM_PASS_COUNT

The number of passes performed by LPM.

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 76, column 1)

FfxLpmInitializationFlagBits

enum FfxLpmInitializationFlagBits

An enumeration of bit flags used when creating a FfxLpmContext. See FfxLpmContextDescription.

Source: sdk/include/FidelityFX/host/ffx_lpm.h (line 118, column 1)

Dependencies: FfxLpmContext, FfxLpmContextDescription, FfxLpmDispatchDescription