Skip to content

DX12 FrameInterpolation

Navigation: SDKBackendsDX12 Backend

DX12 FrameInterpolation

FidelityFX SDK native frame interpolation implementation for DirectX 12 backend.

Functions

ffxReplaceSwapchainForFrameinterpolationDX12

FFX_API FfxErrorCode ffxReplaceSwapchainForFrameinterpolationDX12(FfxCommandQueue gameQueue, FfxSwapchain &gameSwapChain)

Replaces the current swapchain with the provided FfxSwapchain.

Parameters:

  • gameQueue (FfxCommandQueue) – [in] The FfxCommandQueue presentation will occur on.
  • gameSwapChain (FfxSwapchain &) – [in] The FfxSwapchain to use for frame interpolation presentation.

Returns: FFX_API FfxErrorCode

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

ffxCreateFrameinterpolationSwapchainDX12

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 (const DXGI_SWAP_CHAIN_DESC *) – [in] The DXGI_SWAP_CHAIN_DESC describing the swapchain creation parameters from the calling application.
  • queue (ID3D12CommandQueue *) – [in] The ID3D12CommandQueue to use for frame interpolation presentation.
  • dxgiFactory (IDXGIFactory *) – [in] The IDXGIFactory to use for DX12 swapchain creation.
  • outGameSwapChain (FfxSwapchain &) – [out] The created FfxSwapchain.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/dx12/ffx_dx12.h (line 223, column 22)

ffxCreateFrameinterpolationSwapchainForHwndDX12

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 (HWND) – [in] The HWND handle for the calling application.
  • desc1 (const DXGI_SWAP_CHAIN_DESC1 *) – [in] The DXGI_SWAP_CHAIN_DESC1 describing the swapchain creation parameters from the calling application.
  • fullscreenDesc (const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *) – [in] The DXGI_SWAP_CHAIN_FULLSCREEN_DESC describing the full screen swapchain creation parameters from the calling application.
  • queue (ID3D12CommandQueue *) – [in] The ID3D12CommandQueue to use for frame interpolation presentation.
  • dxgiFactory (IDXGIFactory *) – [in] The IDXGIFactory to use for DX12 swapchain creation.
  • outGameSwapChain (FfxSwapchain &) – [out] The created FfxSwapchain.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/dx12/ffx_dx12.h (line 244, column 22)

ffxWaitForPresents

FFX_API FfxErrorCode ffxWaitForPresents(FfxSwapchain gameSwapChain)

Waits for the FfxSwapchain to complete presentation.

Parameters:

  • gameSwapChain (FfxSwapchain) – [in] The FfxSwapchain to wait on.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/dx12/ffx_dx12.h (line 261, column 22)

ffxRegisterFrameinterpolationUiResourceDX12

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

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

Parameters:

  • gameSwapChain (FfxSwapchain) – [in] The FfxSwapchain to to register the UI resource with.
  • uiResource (FfxResource) – [in] The FfxResource representing the UI resource.
  • flags (uint32_t) – [in] A set of FfxUiCompositionFlags.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/dx12/ffx_dx12.h (line 275, column 22)

ffxGetFrameinterpolationCommandlistDX12

FFX_API FfxErrorCode ffxGetFrameinterpolationCommandlistDX12(FfxSwapchain gameSwapChain, FfxCommandList &gameCommandlist)

Fetches a FfxCommandList from the FfxSwapchain.

Parameters:

  • gameSwapChain (FfxSwapchain) – [in] The FfxSwapchain to get a FfxCommandList from.
  • gameCommandlist (FfxCommandList &) – [out] The FfxCommandList from the provided FfxSwapchain.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/dx12/ffx_dx12.h (line 288, column 22)

ffxGetFrameinterpolationTextureDX12

FFX_API FfxResource ffxGetFrameinterpolationTextureDX12(FfxSwapchain gameSwapChain)

Fetches a FfxResource representing the backbuffer from the FfxSwapchain.

Returns: An abstract FidelityFX resources for the swapchain backbuffer.

Parameters:

  • gameSwapChain (FfxSwapchain) – [in] The FfxSwapchain to get a FfxResource backbuffer from.

Returns: FFX_API FfxResource

Source: sdk/include/FidelityFX/host/backends/dx12/ffx_dx12.h (line 298, column 21)

ffxSetFrameGenerationConfigToSwapchainDX12

FFX_API FfxErrorCode ffxSetFrameGenerationConfigToSwapchainDX12(FfxFrameGenerationConfig const *config)

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

Parameters:

  • config (FfxFrameGenerationConfig const *) – [in] The FfxFrameGenerationConfig to set.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/dx12/ffx_dx12.h (line 314, column 22)

ffxConfigureFrameInterpolationSwapchainDX12

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

Configures FfxSwapchain via KeyValue API post FfxSwapchain context creation.

Parameters:

  • gameSwapChain (FfxSwapchain) – [in] The FfxSwapchain to configure via KeyValue API
  • key (FfxFrameInterpolationSwapchainConfigureKey) – [in] The FfxFrameInterpolationSwapchainConfigureKey is key
  • valuePtr (void *) – [in] The <void *> pointer to value. What this pointer deference to depends on key.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/dx12/ffx_dx12.h (line 335, column 22)

ffxFrameInterpolationSwapchainGetGpuMemoryUsageDX12

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 (FfxSwapchain) – [in] The FfxSwapchain to configure via KeyValue API
  • vramUsage (FfxEffectMemoryUsage *) – [inout] The FfxEffectMemoryUsage is the GPU memory created by FrameInterpolationSwapchain

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/dx12/ffx_dx12.h (line 348, column 22)

Dependencies: FfxEffectMemoryUsage, FfxFrameGenerationConfig, FfxResource