Skip to content

DX12 Backend

Navigation: SDKBackends

DX12 Backend

FidelityFX SDK native backend implementation for DirectX 12.

Submodules

Functions

ffxGetScratchMemorySizeDX12

FFX_API size_t ffxGetScratchMemorySizeDX12(size_t maxContexts)

Query how much memory is required for the DirectX 12 backend’s scratch buffer.

Returns: The size (in bytes) of the required scratch memory buffer for the DX12 backend.

Parameters:

  • maxContexts (size_t) – [in] The maximum number of simultaneous effect contexts that will share the backend. (Note that some effects contain internal contexts which count towards this maximum)

Returns: FFX_API size_t

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

ffxGetDeviceDX12

FFX_API FfxDevice ffxGetDeviceDX12(ID3D12Device *device)

Create a FfxDevice from a ID3D12Device.

Returns: An abstract FidelityFX device.

Parameters:

  • device (ID3D12Device *) – [in] A pointer to the DirectX12 device.

Returns: FFX_API FfxDevice

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

ffxGetInterfaceDX12

FFX_API FfxErrorCode ffxGetInterfaceDX12(FfxInterface *backendInterface, FfxDevice device, void *scratchBuffer, size_t scratchBufferSize, size_t maxContexts)

Populate an interface with pointers for the DX12 backend.

Parameters:

  • backendInterface (FfxInterface *) – [out] A pointer to a FfxInterface structure to populate with pointers.
  • device (FfxDevice) – [in] A pointer to the DirectX12 device.
  • scratchBuffer (void *) – [in] A pointer to a buffer of memory which can be used by the DirectX(R)12 backend.
  • scratchBufferSize (size_t) – [in] The size (in bytes) of the buffer pointed to by scratchBuffer.
  • maxContexts (size_t) – [in] The maximum number of simultaneous effect contexts that will share the backend. (Note that some effects contain internal contexts which count towards this maximum)

Returns: FFX_API FfxErrorCode

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

ffxGetCommandListDX12

FFX_API FfxCommandList ffxGetCommandListDX12(ID3D12CommandList *cmdList)

Create a FfxCommandList from a ID3D12CommandList.

Returns: An abstract FidelityFX command list.

Parameters:

  • cmdList (ID3D12CommandList *) – [in] A pointer to the DirectX12 command list.

Returns: FFX_API FfxCommandList

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

ffxGetPipelineDX12

FFX_API FfxPipeline ffxGetPipelineDX12(ID3D12PipelineState *pipelineState)

Create a FfxPipeline from a ID3D12PipelineState.

Returns: An abstract FidelityFX pipeline.

Parameters:

  • pipelineState (ID3D12PipelineState *) – [in] A pointer to the DirectX12 pipeline state.

Returns: FFX_API FfxPipeline

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

ffxGetResourceDX12

FFX_API FfxResource ffxGetResourceDX12(const ID3D12Resource *dx12Resource, FfxResourceDescription ffxResDescription, const wchar_t *ffxResName, FfxResourceStates state=FFX_RESOURCE_STATE_COMPUTE_READ)

Fetch a FfxResource from a GPUResource.

Returns: An abstract FidelityFX resources.

Parameters:

  • dx12Resource (const ID3D12Resource *) – [in] A pointer to the DX12 resource.
  • ffxResDescription (FfxResourceDescription) – [in] An FfxResourceDescription for the resource representation.
  • ffxResName (const wchar_t *) – [in] (optional) A name string to identify the resource in debug mode.
  • state (FfxResourceStates) – [in] The state the resource is currently in.

Returns: FFX_API FfxResource

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

ffxLoadPixDll

FFX_API FfxErrorCode ffxLoadPixDll(const wchar_t *pixDllPath)

Loads PIX runtime dll to allow SDK calls to show up in Microsoft PIX.

Parameters:

  • pixDllPath (const wchar_t *) – [in] The path to the DLL to load.

Returns: FFX_API FfxErrorCode

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

ffxGetSurfaceFormatDX12

FFX_API FfxSurfaceFormat ffxGetSurfaceFormatDX12(DXGI_FORMAT format)

Fetch a FfxSurfaceFormat from a DXGI_FORMAT.

Returns: An FfxSurfaceFormat.

Parameters:

  • format (DXGI_FORMAT) – [in] The DXGI_FORMAT to convert to FfxSurfaceFormat.

Returns: FFX_API FfxSurfaceFormat

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

ffxGetDX12FormatFromSurfaceFormat

FFX_API DXGI_FORMAT ffxGetDX12FormatFromSurfaceFormat(FfxSurfaceFormat surfaceFormat)

Fetch a DXGI_FORMAT from a FfxSurfaceFormat.

Returns: An DXGI_FORMAT.

Parameters:

  • surfaceFormat (FfxSurfaceFormat) – [in] The FfxSurfaceFormat to convert to DXGI_FORMAT.

Returns: FFX_API DXGI_FORMAT

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

ffxGetResourceDescriptionDX12

FFX_API FfxResourceDescription ffxGetResourceDescriptionDX12(const ID3D12Resource *pResource, FfxResourceUsage additionalUsages=FFX_RESOURCE_USAGE_READ_ONLY)

Fetch a FfxResourceDescription from an existing ID3D12Resource.

Returns: An FfxResourceDescription.

Parameters:

  • pResource (const ID3D12Resource *) – [in] The ID3D12Resource resource to create a FfxResourceDescription for.
  • additionalUsages (FfxResourceUsage) – [in] Optional FfxResourceUsage flags needed for select resource mapping.

Returns: FFX_API FfxResourceDescription

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

ffxGetCommandQueueDX12

FFX_API FfxCommandQueue ffxGetCommandQueueDX12(ID3D12CommandQueue *pCommandQueue)

Fetch a FfxCommandQueue from an existing ID3D12CommandQueue.

Returns: An FfxCommandQueue.

Parameters:

  • pCommandQueue (ID3D12CommandQueue *) – [in] The ID3D12CommandQueue to create a FfxCommandQueue from.

Returns: FFX_API FfxCommandQueue

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

ffxGetSwapchainDX12

FFX_API FfxSwapchain ffxGetSwapchainDX12(IDXGISwapChain4 *pSwapchain)

Fetch a FfxSwapchain from an existing IDXGISwapChain4.

Returns: An FfxSwapchain.

Parameters:

  • pSwapchain (IDXGISwapChain4 *) – [in] The IDXGISwapChain4 to create a FfxSwapchain from.

Returns: FFX_API FfxSwapchain

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

ffxGetDX12SwapchainPtr

FFX_API IDXGISwapChain4 * ffxGetDX12SwapchainPtr(FfxSwapchain ffxSwapchain)

Fetch a IDXGISwapChain4 from an existing FfxSwapchain.

Returns: An IDXGISwapChain4 object.

Parameters:

  • ffxSwapchain (FfxSwapchain) – [in] The FfxSwapchain to fetch an IDXGISwapChain4 from.

Returns: FFX_API IDXGISwapChain4 *

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

Dependencies: FfxInterface, FfxResource, FfxResourceDescription