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, ID.gifactory* d.gifactory, 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, ID.gifactory* d.gifactory, 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).

FFX_API FfxErrorCode

ffxConfigureFrameInterpolationSwapchainDX12 ( FfxSwapchain gameSwapChain, FfxFrameInterpolationSwapchainConfigureKey key, void* valuePtr )
Configures “FfxSwapchain“ via KeyValue API post “FfxSwapchain“ context creation.

FFX_API FfxErrorCode

Query how much GPU memory created by “FfxSwapchain“. This excludes GPU memory created by DXGI (ie. size of DXGI swapchaim backbuffers).

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,
    ID.gifactory* d.gifactory,
    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.

d.gifactory

The ID.gifactory 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,
    ID.gifactory* d.gifactory,
    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.

d.gifactory

The ID.gifactory 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.


ffxConfigureFrameInterpolationSwapchainDX12

Copied!

FFX_API  FfxErrorCode  ffxConfigureFrameInterpolationSwapchainDX12 (
    FfxSwapchain gameSwapChain,
    FfxFrameInterpolationSwapchainConfigureKey key,
    void* valuePtr
)

Configures FfxSwapchain via KeyValue API post FfxSwapchain context creation.

Parameters:

gameSwapChain

The FfxSwapchain to configure via KeyValue API

key

The FfxFrameInterpolationSwapchainConfigureKey is key

valuePtr

The <void *> pointer to value. What this pointer deference to depends on key.

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_ARGUMENT

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


ffxFrameInterpolationSwapchainGetGpuMemoryUsageDX12

Copied!

FFX_API  FfxErrorCode  ffxFrameInterpolationSwapchainGetGpuMemoryUsageDX12 (
    FfxSwapchain gameSwapChain,
    FfxEffectMemoryUsage * vramUsage
)

Query how much GPU memory created by FfxSwapchain. This excludes GPU memory created by DXGI (ie. size of DXGI swapchaim backbuffers).

Parameters:

gameSwapChain

The FfxSwapchain to configure via KeyValue API

vramUsage

The FfxEffectMemoryUsage is the GPU memory created by FrameInterpolationSwapchain

Return values:

FFX_OK

The operation completed successfully.

FFX_ERROR_INVALID_ARGUMENT

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


Related pages

  • Visit the FidelityFX SDK product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNAâ„¢ 2 GPUs, AMD Ryzenâ„¢ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!