Skip to content

FidelityFX FSR1

Navigation: SDKEffect Components

FidelityFX FSR1

FidelityFX Super Resolution 1 runtime library.

Defines

FFX_FSR1_VERSION_MAJOR

#define FFX_FSR1_VERSION_MAJOR (1)

Include the interface for the backend of the FSR 1.0 API.

FidelityFX Super Resolution 1.0 major version.

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

FFX_FSR1_VERSION_MINOR

#define FFX_FSR1_VERSION_MINOR (2)

FidelityFX Super Resolution 1.0 minor version.

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

FFX_FSR1_VERSION_PATCH

#define FFX_FSR1_VERSION_PATCH (0)

FidelityFX Super Resolution 1.0 patch version.

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

FFX_FSR1_CONTEXT_COUNT

#define FFX_FSR1_CONTEXT_COUNT 2

FidelityFX Super Resolution 1.0 context count.

Defines the number of internal effect contexts required by FSR1

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

FFX_FSR1_CONTEXT_SIZE

#define FFX_FSR1_CONTEXT_SIZE (27448)

The size of the context specified in 32bit values.

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

Functions

ffxFsr1ContextCreate

FFX_API FfxErrorCode ffxFsr1ContextCreate(FfxFsr1Context *pContext, const FfxFsr1ContextDescription *pContextDescription)

Create a FidelityFX Super Resolution 1.0 context from the parameters programmed to the FfxFsr1ContextDescription structure.

The context structure is the main object used to interact with the Super Resoution 1.0 API, and is responsible for the management of the internal resources used by the FSR1 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 FSR1 frame-to-frame function. Depending on the precise configuration used when creating the FfxFsr1Context 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 FSR1 upscaling is disabled by a user. To destroy the FSR1 context you should call ffxFsr1ContextDestroy.

Parameters:

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

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_fsr1.h (line 198, column 22)

ffxFsr1ContextGetGpuMemoryUsage

FFX_API FfxErrorCode ffxFsr1ContextGetGpuMemoryUsage(FfxFsr1Context *pContext, FfxEffectMemoryUsage *pVramUsage)

Get GPU memory usage of the FidelityFX Super Resolution context.

Parameters:

  • pContext (FfxFsr1Context *) – [in] A pointer to a FfxFsr1Context structure.
  • pVramUsage (FfxEffectMemoryUsage *) – [out] A pointer to a FfxEffectMemoryUsage structure.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_fsr1.h (line 211, column 22)

ffxFsr1ContextDispatch

FFX_API FfxErrorCode ffxFsr1ContextDispatch(FfxFsr1Context *pContext, const FfxFsr1DispatchDescription *pDispatchDescription)

Parameters:

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

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_fsr1.h (line 224, column 22)

ffxFsr1ContextDestroy

FFX_API FfxErrorCode ffxFsr1ContextDestroy(FfxFsr1Context *pContext)

Destroy the FidelityFX FSR 1 context.

Parameters:

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

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_fsr1.h (line 236, column 22)

ffxFsr1GetUpscaleRatioFromQualityMode

FFX_API float ffxFsr1GetUpscaleRatioFromQualityMode(FfxFsr1QualityMode qualityMode)

Get the upscale ratio from the quality mode.

The following table enumerates the mapping of the quality modes to per-dimension scaling ratios.

Quality preset
Scale factor

FFX_FSR1_QUALITY_MODE_ULTRA_QUALITY
1.3x

FFX_FSR1_QUALITY_MODE_QUALITY
1.5x

FFX_FSR1_QUALITY_MODE_BALANCED
1.7x

FFX_FSR1_QUALITY_MODE_PERFORMANCE
2.0x

Passing an invalid qualityMode will return 0.0f.

Returns: The upscaling the per-dimension upscaling ratio for qualityMode according to the table above.

Parameters:

  • qualityMode (FfxFsr1QualityMode) – [in] The quality mode preset.

Returns: FFX_API float

Source: sdk/include/FidelityFX/host/ffx_fsr1.h (line 259, column 15)

ffxFsr1GetRenderResolutionFromQualityMode

FFX_API FfxErrorCode ffxFsr1GetRenderResolutionFromQualityMode(uint32_t *pRenderWidth, uint32_t *pRenderHeight, uint32_t displayWidth, uint32_t displayHeight, FfxFsr1QualityMode qualityMode)

A helper function to calculate the rendering resolution from a target resolution and desired quality level.

This function applies the scaling factor returned by ffxFsr1GetUpscaleRatioFromQualityMode to each dimension.

Parameters:

  • pRenderWidth (uint32_t *) – [out] A pointer to a uint32_t which will hold the calculated render resolution width.
  • pRenderHeight (uint32_t *) – [out] A pointer to a uint32_t which will hold the calculated render resolution height.
  • displayWidth (uint32_t) – [in] The target display resolution width.
  • displayHeight (uint32_t) – [in] The target display resolution height.
  • qualityMode (FfxFsr1QualityMode) – [in] The desired quality mode for FSR1 upscaling.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/ffx_fsr1.h (line 281, column 22)

ffxFsr1GetEffectVersion

FFX_API FfxVersionNumber ffxFsr1GetEffectVersion()

Queries the effect version number.

Returns: The SDK version the effect was built with.

Returns: FFX_API FfxVersionNumber

Source: sdk/include/FidelityFX/host/ffx_fsr1.h (line 294, column 26)

Enumerations

FfxFsr1Pass

enum FfxFsr1Pass

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

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

Values:

FFX_FSR1_PASS_EASU

FFX_FSR1_PASS_EASU = 0

A pass which upscales the color buffer using easu.

FFX_FSR1_PASS_EASU_RCAS

FFX_FSR1_PASS_EASU_RCAS = 1

A pass which upscales the color buffer in preparation for rcas.

FFX_FSR1_PASS_RCAS

FFX_FSR1_PASS_RCAS = 2

A pass which performs rcas sharpening on the upscaled image.

FFX_FSR1_PASS_COUNT

The number of passes performed by FSR2.

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

FfxFsr1QualityMode

enum FfxFsr1QualityMode

An enumeration of all the quality modes supported by FidelityFX Super Resolution 1 upscaling.

In order to provide a consistent user experience across multiple applications which implement FSR1. It is strongly recommended that the following preset scaling factors are made available through your application’s user interface.

If your application does not expose the notion of preset scaling factors for upscaling algorithms (perhaps instead implementing a fixed ratio which is immutable) or implementing a more dynamic scaling scheme (such as dynamic resolution scaling), then there is no need to use these presets.

Values:

FFX_FSR1_QUALITY_MODE_ULTRA_QUALITY

FFX_FSR1_QUALITY_MODE_ULTRA_QUALITY = 0

Perform upscaling with a per-dimension upscaling ratio of 1.3x.

FFX_FSR1_QUALITY_MODE_QUALITY

FFX_FSR1_QUALITY_MODE_QUALITY = 1

Perform upscaling with a per-dimension upscaling ratio of 1.5x.

FFX_FSR1_QUALITY_MODE_BALANCED

FFX_FSR1_QUALITY_MODE_BALANCED = 2

Perform upscaling with a per-dimension upscaling ratio of 1.7x.

FFX_FSR1_QUALITY_MODE_PERFORMANCE

FFX_FSR1_QUALITY_MODE_PERFORMANCE = 3

Perform upscaling with a per-dimension upscaling ratio of 2.0x.

Source: sdk/include/FidelityFX/host/ffx_fsr1.h (line 99, column 1)

FfxFsr1InitializationFlagBits

enum FfxFsr1InitializationFlagBits

An enumeration of bit flags used when creating a FfxFsr1Context. See FfxFsr1ContextDescription.

Values:

FFX_FSR1_ENABLE_RCAS

FFX_FSR1_ENABLE_RCAS = (1 <<0)

A bit indicating if we should use rcas.

FFX_FSR1_RCAS_PASSTHROUGH_ALPHA

FFX_FSR1_RCAS_PASSTHROUGH_ALPHA = (1 <<1)

A bit indicating if we should use passthrough alpha during rcas.

FFX_FSR1_RCAS_DENOISE

FFX_FSR1_RCAS_DENOISE = (1 <<2)

A bit indicating if denoising is invoked during rcas.

FFX_FSR1_ENABLE_HIGH_DYNAMIC_RANGE

FFX_FSR1_ENABLE_HIGH_DYNAMIC_RANGE = (1 <<3)

A bit indicating if the input color data provided is using a high-dynamic range.

FFX_FSR1_ENABLE_SRGB_CONVERSIONS

FFX_FSR1_ENABLE_SRGB_CONVERSIONS = (1 <<4)

A bit indicating that input/output resources require gamma conversions.

FFX_FSR1_ENABLE_RCAS_LOWER_LIMITER_COMPENSATION

FFX_FSR1_ENABLE_RCAS_LOWER_LIMITER_COMPENSATION = (1 <<5)

A bit indicating if we should compensate for possible negative output values during rcas.

Source: sdk/include/FidelityFX/host/ffx_fsr1.h (line 111, column 1)

Dependencies

This module depends on: