Skip to content

GDK FrameInterpolation

Navigation: SDKBackendsGDK Backend

GDK FrameInterpolation

FidelityFX SDK native frame interpolation implementation for GDK backend.

Functions

ffxCreateFrameinterpolationSwapchainX

FFX_API FfxErrorCode ffxCreateFrameinterpolationSwapchainX(FfxCommandQueue gameQueue, FfxCommandQueue computeQueue, FfxCommandQueue presentQueue, FfxPresentXFunc gamePresentXCallback, void *gamePresentXCallbackContext, FfxSwapchain &outGameSwapChain)

Creates a FfxSwapchain from passed in parameters. On console, the FfxSwapChain struct represents an overloaded command queue.

Parameters:

  • gameQueue (FfxCommandQueue) – [in] The ID3D12CommandQueue (graphics) from the calling application.
  • computeQueue (FfxCommandQueue) – [in] The ID3D12CommandQueue (compute) from the calling application to use for async workloads (see FfxFrameGenerationConfig to enable compute workloads).
  • presentQueue (FfxCommandQueue) – [in] The ID3D12CommandQueue (compute) from the calling application to use for async presentation (see FfxFrameGenerationConfig to enable asyncPresent).
  • gamePresentXCallback (FfxPresentXFunc)
  • gamePresentXCallbackContext (void *)
  • outGameSwapChain (FfxSwapchain &) – [out] The created FfxSwapchain.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/gdk/ffx_gdk.h (line 273, column 26)

ffxDestroyFrameinterpolationSwapchainX

FFX_API FfxErrorCode ffxDestroyFrameinterpolationSwapchainX(FfxSwapchain gameSwapChain)

Release a FfxSwapchain when done with it.

Parameters:

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

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/gdk/ffx_gdk.h (line 288, column 26)

ffxWaitForPresentX

FFX_API FfxErrorCode ffxWaitForPresentX(FfxSwapchain gameSwapChain)

Will wait until the PresentX call on the real frame buffer has been called. This is to control the pacing in calls to WaitFrameEventX.

Parameters:

  • gameSwapChain (FfxSwapchain) – [in] The FfxSwapchain object to query for present completion.

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/gdk/ffx_gdk.h (line 299, column 26)

ffxPresentX

FFX_API FfxErrorCode ffxPresentX(FfxSwapchain gameSwapChain, D3D12XBOX_FRAME_PIPELINE_TOKEN realBackBufferToken, FfxResource realBackBufferPlane, FfxResource interpolatedBackBufferPlane, FfxResource uiBackBufferPlane)

Replacement for PresentX to be called at the end of the frame when frame interpolation is enabled. This will either call the application callback for presentX presentation directly or will schedule frame interpolation to occur and pass presentation calls off to an asynchronous thread.

Parameters:

  • gameSwapChain (FfxSwapchain) – [in] The FfxSwapchain to use for presentation.
  • realBackBufferToken (D3D12XBOX_FRAME_PIPELINE_TOKEN)
  • realBackBufferPlane (FfxResource) – [in] The ID3D12Resource representing the back buffer prepared by the title
  • interpolatedBackBufferPlane (FfxResource) – [in] The ID3D12Resource representing the back buffer where interpolated data will be written
  • uiBackBufferPlane (FfxResource)

Returns: FFX_API FfxErrorCode

Source: sdk/include/FidelityFX/host/backends/gdk/ffx_gdk.h (line 313, column 26)

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/gdk/ffx_gdk.h (line 331, column 26)

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/gdk/ffx_gdk.h (line 344, column 26)

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/gdk/ffx_gdk.h (line 354, column 25)

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/gdk/ffx_gdk.h (line 366, column 26)

Dependencies: FfxFrameGenerationConfig, FfxResource