DX12 FrameInterpolation
FidelityFX SDK native frame interpolation implementation for DirectX 12 backend.
Functions
Return type |
Description |
---|---|
ffxReplaceSwapchainForFrameinterpolationDX12 ( FfxCommandQueue gameQueue, FfxSwapchain& gameSwapChain )
Replaces the current swapchain with the provided “FfxSwapchain“.
|
|
ffxCreateFrameinterpolationSwapchainDX12 ( const DXGI_SWAP_CHAIN_DESC* desc, ID3D12CommandQueue* queue, ID.gifactory* d.gifactory, FfxSwapchain& outGameSwapChain )
Creates a “FfxSwapchain“ from passed in parameters.
|
|
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.
|
|
ffxWaitForPresents (FfxSwapchain gameSwapChain)
Waits for the “FfxSwapchain“ to complete presentation.
|
|
ffxRegisterFrameinterpolationUiResourceDX12 ( FfxSwapchain gameSwapChain, FfxResource uiResource, uint32_t flags )
Registers a “FfxResource“ to use for UI with the provided “FfxSwapchain“.
|
|
ffxGetFrameinterpolationCommandlistDX12 ( FfxSwapchain gameSwapChain, FfxCommandList & gameCommandlist )
Fetches a “FfxCommandList“ from the “FfxSwapchain“.
|
|
ffxGetFrameinterpolationTextureDX12 (FfxSwapchain gameSwapChain)
Fetches a “FfxResource“ representing the backbuffer from the “FfxSwapchain“.
|
|
ffxSetFrameGenerationConfigToSwapchainDX12 (FfxFrameGenerationConfig const* config)
Sets a “FfxFrameGenerationConfig“ to the internal FrameInterpolationSwapChain (in the backend).
|
|
ffxConfigureFrameInterpolationSwapchainDX12 ( FfxSwapchain gameSwapChain, FfxFrameInterpolationSwapchainConfigureKey key, void* valuePtr )
Configures “FfxSwapchain“ via KeyValue API post “FfxSwapchain“ context creation.
|
|
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).
|
Detailed description
FidelityFX SDK native frame interpolation implementation for DirectX 12 backend.
Global functions
ffxReplaceSwapchainForFrameinterpolationDX12
FFX_API FfxErrorCode ffxReplaceSwapchainForFrameinterpolationDX12 (
FfxCommandQueue gameQueue,
FfxSwapchain& gameSwapChain
)
Replaces the current swapchain with the provided FfxSwapchain
.
Parameters:
gameQueue |
The |
gameSwapChain |
The |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_ARGUMENT |
One of the parameters is invalid. |
ffxCreateFrameinterpolationSwapchainDX12
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 |
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 |
ffxCreateFrameinterpolationSwapchainForHwndDX12
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 |
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 |
ffxWaitForPresents
FFX_API FfxErrorCode ffxWaitForPresents (FfxSwapchain gameSwapChain)
Waits for the FfxSwapchain
to complete presentation.
Parameters:
gameSwapChain |
The |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_ARGUMENT |
Could not query the interface for the frame interpolation swap chain. |
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 |
The |
uiResource |
The |
flags |
A set of |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_ARGUMENT |
Could not query the interface for the frame interpolation swap chain. |
ffxGetFrameinterpolationCommandlistDX12
FFX_API FfxErrorCode ffxGetFrameinterpolationCommandlistDX12 (
FfxSwapchain gameSwapChain,
FfxCommandList & gameCommandlist
)
Fetches a FfxCommandList
from the FfxSwapchain
.
Parameters:
gameSwapChain |
The |
gameCommandlist |
The |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_ARGUMENT |
Could not query the interface for the frame interpolation swap chain. |
ffxGetFrameinterpolationTextureDX12
FFX_API FfxResource ffxGetFrameinterpolationTextureDX12 (FfxSwapchain gameSwapChain)
Fetches a FfxResource
representing the backbuffer from the FfxSwapchain
.
Parameters:
gameSwapChain |
The |
Returns:
An abstract FidelityFX resources for the swapchain backbuffer.
ffxSetFrameGenerationConfigToSwapchainDX12
FFX_API FfxErrorCode ffxSetFrameGenerationConfigToSwapchainDX12 (FfxFrameGenerationConfig const* config)
Sets a FfxFrameGenerationConfig
to the internal FrameInterpolationSwapChain (in the backend).
Parameters:
config |
The |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_ARGUMENT |
Could not query the interface for the frame interpolation swap chain. |
ffxConfigureFrameInterpolationSwapchainDX12
FFX_API FfxErrorCode ffxConfigureFrameInterpolationSwapchainDX12 (
FfxSwapchain gameSwapChain,
FfxFrameInterpolationSwapchainConfigureKey key,
void* valuePtr
)
Configures FfxSwapchain
via KeyValue API post FfxSwapchain
context creation.
Parameters:
gameSwapChain |
The |
key |
The |
valuePtr |
The |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_ARGUMENT |
Could not query the interface for the frame interpolation swap chain. |
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 |
The |
vramUsage |
The |
Return values:
FFX_OK |
The operation completed successfully. |
FFX_ERROR_INVALID_ARGUMENT |
Could not query the interface for the frame interpolation swap chain. |