FidelityFX LPM
FidelityFX Luma Preserving Mapper runtime library.
Enumerations
Name |
Description |
---|---|
FfxLpmInitializationFlagBits |
An enumeration of bit flags used when creating a “FfxLpmContext“. See “FfxLpmContextDescription“.
|
FfxLpmPass |
An enumeration of all the passes which constitute the LPM algorithm.
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.
|
Structs
Name |
Description |
---|---|
A structure encapsulating the FidelityFX Luma Preserving 1.0 context.
|
|
A structure encapsulating the parameters required to initialize FidelityFX Luma Preserving Mapper.
|
|
A structure encapsulating the parameters for dispatching the various passes of FidelityFX Luma Preserving Mapper 1.0.
|
Functions
Return type |
Description |
---|---|
ffxLpmContextCreate ( FfxLpmContext * pContext, const FfxLpmContextDescription * pContextDescription )
Create a FidelityFX Luma Preserving 1.0 context from the parameters programmed to the “FfxLpmContextDescription“ structure.
|
|
ffxLpmContextDispatch ( FfxLpmContext * pContext, const FfxLpmDispatchDescription * pDispatchDescription )
Dispatches work to the FidelityFX LPM context.
|
|
ffxLpmContextDestroy (FfxLpmContext * pContext)
Destroy the FidelityFX LPM context.
|
|
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.
|
|
Queries the effect version number.
|
Macros
Name |
Description |
---|---|
FidelityFX Luma Preserving Mapper context count.
|
|
FFX_LPM_CONTEXT_SIZE (9300) |
The size of the context specified in 32bit values.
|
FidelityFX Luma Preserving Mapper 1.3 major version.
|
|
FidelityFX Luma Preserving Mapper 1.3 minor version.
|
|
FidelityFX Luma Preserving Mapper 1.3 patch version.
|
Detailed description
FidelityFX Luma Preserving Mapper runtime library.
Global 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 |
A pointer to a |
pContextDescription |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_CODE_NULL_POINTER |
The operation failed because either |
FFX_ERROR_INCOMPLETE_INTERFACE |
The operation failed because the |
FFX_ERROR_BACKEND_API_ERROR |
The operation failed because of an error returned from the backend. |
ffxLpmContextDispatch
FFX_API FfxErrorCode ffxLpmContextDispatch (
FfxLpmContext * pContext,
const FfxLpmDispatchDescription * pDispatchDescription
)
Dispatches work to the FidelityFX LPM context.
Parameters:
pContext |
A pointer to a |
pDispatchDescription |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_CODE_NULL_POINTER |
The operation failed because either |
FFX_ERROR_BACKEND_API_ERROR |
The operation failed because of an error returned from the backend. |
ffxLpmContextDestroy
FFX_API FfxErrorCode ffxLpmContextDestroy (FfxLpmContext * pContext)
Destroy the FidelityFX LPM context.
Parameters:
pContext |
A pointer to a |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_CODE_NULL_POINTER |
The operation failed because either |
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 |
|
insoft |
|
incon2 |
|
inclip |
|
inscaleOnly |
|
outcon |
|
outsoft |
|
outcon2 |
|
outclip |
|
outscaleOnly |
Return values:
FFX_OK |
The operation completed successfully. |
ffxLpmGetEffectVersion
FFX_API FfxVersionNumber ffxLpmGetEffectVersion ()
Queries the effect version number.
Returns:
The SDK version the effect was built with.
Macros
FFX_LPM_CONTEXT_COUNT
FidelityFX Luma Preserving Mapper context count.
Defines the number of internal effect contexts required by LPM
FFX_LPM_CONTEXT_SIZE
The size of the context specified in 32bit values.
FFX_LPM_VERSION_MAJOR
FidelityFX Luma Preserving Mapper 1.3 major version.
FFX_LPM_VERSION_MINOR
FidelityFX Luma Preserving Mapper 1.3 minor version.
FFX_LPM_VERSION_PATCH
FidelityFX Luma Preserving Mapper 1.3 patch version.