DX12 FrameInterpolation

FidelityFX SDK native frame interpolation implementation for DirectX 12 backend.

Functions

Return type

Description

FFX_API FfxErrorCode

ffxReplaceSwapchainForFrameinterpolationDX12 ( FfxCommandQueue gameQueue, FfxSwapchain& gameSwapChain )
Replaces the current swapchain with the provided “FfxSwapchain“.

FFX_API FfxErrorCode

ffxCreateFrameinterpolationSwapchainDX12 ( const DXGI_SWAP_CHAIN_DESC* desc, ID3D12CommandQueue* queue, IDXGIFactory* dxgiFactory, FfxSwapchain& outGameSwapChain )
Creates a “FfxSwapchain“ from passed in parameters.

FFX_API FfxErrorCode

ffxCreateFrameinterpolationSwapchainForHwndDX12 ( HWND hWnd, const DXGI_SWAP_CHAIN_DESC1* desc1, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC* fullscreenDesc, ID3D12CommandQueue* queue, IDXGIFactory* dxgiFactory, FfxSwapchain& outGameSwapChain )
Creates a “FfxSwapchain“ from passed in parameters.

FFX_API FfxErrorCode

ffxWaitForPresents (FfxSwapchain gameSwapChain)
Waits for the “FfxSwapchain“ to complete presentation.

FFX_API FfxErrorCode

ffxRegisterFrameinterpolationUiResourceDX12 ( FfxSwapchain gameSwapChain, FfxResource uiResource, uint32_t flags )
Registers a “FfxResource“ to use for UI with the provided “FfxSwapchain“.

FFX_API FfxErrorCode

ffxGetFrameinterpolationCommandlistDX12 ( FfxSwapchain gameSwapChain, FfxCommandList & gameCommandlist )
Fetches a “FfxCommandList“ from the “FfxSwapchain“.

FFX_API FfxResource

ffxGetFrameinterpolationTextureDX12 (FfxSwapchain gameSwapChain)
Fetches a “FfxResource“ representing the backbuffer from the “FfxSwapchain“.

FFX_API FfxErrorCode

Sets a “FfxFrameGenerationConfig“ to the internal FrameInterpolationSwapChain (in the backend).

Detailed description

FidelityFX SDK native frame interpolation implementation for DirectX 12 backend.

Global functions

ffxReplaceSwapchainForFrameinterpolationDX12

Copied!

FFX_API  FfxErrorCode  ffxReplaceSwapchainForFrameinterpolationDX12 (
    FfxCommandQueue gameQueue,
    FfxSwapchain& gameSwapChain
)

Replaces the current swapchain with the provided FfxSwapchain.

Parameters:

gameQueue

The FfxCommandQueue presentation will occur on.

gameSwapChain

The FfxSwapchain to use for frame interpolation presentation.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_ARGUMENT

One of the parameters is invalid.


ffxCreateFrameinterpolationSwapchainDX12

Copied!

FFX_API  FfxErrorCode  ffxCreateFrameinterpolationSwapchainDX12 (
    const DXGI_SWAP_CHAIN_DESC* desc,
    ID3D12CommandQueue* queue,
    IDXGIFactory* dxgiFactory,
    FfxSwapchain& outGameSwapChain
)

Creates a FfxSwapchain from passed in parameters.

Parameters:

desc

The DXGI_SWAP_CHAIN_DESC describing the swapchain creation parameters from the calling application.

queue

The ID3D12CommandQueue to use for frame interpolation presentation.

dxgiFactory

The IDXGIFactory to use for DX12 swapchain creation.

outGameSwapChain

The created FfxSwapchain.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_ARGUMENT

One of the parameters is invalid. FFX_ERROR_OUT_OF_MEMORY Insufficient memory available to allocate FfxSwapchain or underlying component.


ffxCreateFrameinterpolationSwapchainForHwndDX12

Copied!

FFX_API  FfxErrorCode  ffxCreateFrameinterpolationSwapchainForHwndDX12 (
    HWND hWnd,
    const DXGI_SWAP_CHAIN_DESC1* desc1,
    const DXGI_SWAP_CHAIN_FULLSCREEN_DESC* fullscreenDesc,
    ID3D12CommandQueue* queue,
    IDXGIFactory* dxgiFactory,
    FfxSwapchain& outGameSwapChain
)

Creates a FfxSwapchain from passed in parameters.

Parameters:

hWnd

The HWND handle for the calling application.

desc1

The DXGI_SWAP_CHAIN_DESC1 describing the swapchain creation parameters from the calling application.

fullscreenDesc

The DXGI_SWAP_CHAIN_FULLSCREEN_DESC describing the full screen swapchain creation parameters from the calling application.

queue

The ID3D12CommandQueue to use for frame interpolation presentation.

dxgiFactory

The IDXGIFactory to use for DX12 swapchain creation.

outGameSwapChain

The created FfxSwapchain.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_ARGUMENT

One of the parameters is invalid. FFX_ERROR_OUT_OF_MEMORY Insufficient memory available to allocate FfxSwapchain or underlying component.


ffxWaitForPresents

Copied!

FFX_API  FfxErrorCode  ffxWaitForPresents (FfxSwapchain gameSwapChain)

Waits for the FfxSwapchain to complete presentation.

Parameters:

gameSwapChain

The FfxSwapchain to wait on.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_ARGUMENT

Could not query the interface for the frame interpolation swap chain.


ffxRegisterFrameinterpolationUiResourceDX12

Copied!

FFX_API  FfxErrorCode  ffxRegisterFrameinterpolationUiResourceDX12 (
    FfxSwapchain gameSwapChain,
    FfxResource  uiResource,
    uint32_t flags
)

Registers a FfxResource to use for UI with the provided FfxSwapchain.

Parameters:

gameSwapChain

The FfxSwapchain to to register the UI resource with.

uiResource

The FfxResource representing the UI resource.

flags

A set of FfxUiCompositionFlags.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_ARGUMENT

Could not query the interface for the frame interpolation swap chain.


ffxGetFrameinterpolationCommandlistDX12

Copied!

FFX_API  FfxErrorCode  ffxGetFrameinterpolationCommandlistDX12 (
    FfxSwapchain gameSwapChain,
    FfxCommandList & gameCommandlist
)

Fetches a FfxCommandList from the FfxSwapchain.

Parameters:

gameSwapChain

The FfxSwapchain to get a FfxCommandList from.

gameCommandlist

The FfxCommandList from the provided FfxSwapchain.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_ARGUMENT

Could not query the interface for the frame interpolation swap chain.


ffxGetFrameinterpolationTextureDX12

Copied!

FFX_API  FfxResource  ffxGetFrameinterpolationTextureDX12 (FfxSwapchain gameSwapChain)

Fetches a FfxResource representing the backbuffer from the FfxSwapchain.

Parameters:

gameSwapChain

The FfxSwapchain to get a FfxResource backbuffer from.

Returns:

An abstract FidelityFX resources for the swapchain backbuffer.


ffxSetFrameGenerationConfigToSwapchainDX12

Copied!

FFX_API  FfxErrorCode  ffxSetFrameGenerationConfigToSwapchainDX12 (FfxFrameGenerationConfig  const* config)

Sets a FfxFrameGenerationConfig to the internal FrameInterpolationSwapChain (in the backend).

Parameters:

config

The FfxFrameGenerationConfig to set.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_ARGUMENT

Could not query the interface for the frame interpolation swap chain.