Skip to content

Vulkan Backend

Navigation: SDKBackends

Vulkan Backend

FidelityFX SDK native backend implementation for Vulkan.

Functions

ffxGetScratchMemorySizeVK

FFX_API size_t ffxGetScratchMemorySizeVK(VkPhysicalDevice physicalDevice, size_t maxContexts)

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

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

Parameters:

  • physicalDevice (VkPhysicalDevice) – [in] A pointer to the VkPhysicalDevice device.
  • 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/vk/ffx_vk.h (line 86, column 16)

ffxGetDeviceVK

FFX_API FfxDevice ffxGetDeviceVK(VkDeviceContext *vkDeviceContext)

Create a FfxDevice from a VkDevice.

Returns: An abstract FidelityFX device.

Parameters:

  • vkDeviceContext (VkDeviceContext *) – [in] A pointer to a VKDeviceContext that holds all needed information

Returns: FFX_API FfxDevice

Source: sdk/include/FidelityFX/host/backends/vk/ffx_vk.h (line 103, column 19)

ffxGetInterfaceVK

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

Populate an interface with pointers for the VK backend.

Parameters:

  • backendInterface (FfxInterface *) – [out] A pointer to a FfxInterface structure to populate with pointers.
  • device (FfxDevice) – [in] A pointer to the VkDevice 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/vk/ffx_vk.h (line 120, column 22)

ffxGetCommandListVK

FFX_API FfxCommandList ffxGetCommandListVK(VkCommandBuffer cmdBuf)

Create a FfxCommandList from a VkCommandBuffer.

Returns: An abstract FidelityFX command list.

Parameters:

  • cmdBuf (VkCommandBuffer) – [in] A pointer to the Vulkan command buffer.

Returns: FFX_API FfxCommandList

Source: sdk/include/FidelityFX/host/backends/vk/ffx_vk.h (line 135, column 24)

ffxGetPipelineVK

FFX_API FfxPipeline ffxGetPipelineVK(VkPipeline pipeline)

Create a FfxPipeline from a VkPipeline.

Returns: An abstract FidelityFX pipeline.

Parameters:

  • pipeline (VkPipeline) – [in] A pointer to the Vulkan pipeline.

Returns: FFX_API FfxPipeline

Source: sdk/include/FidelityFX/host/backends/vk/ffx_vk.h (line 145, column 21)

ffxGetResourceVK

FFX_API FfxResource ffxGetResourceVK(void *vkResource, 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:

  • vkResource (void *) – [in] A pointer to the (agnostic) VK 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/vk/ffx_vk.h (line 158, column 21)

ffxGetSurfaceFormatVK

FFX_API FfxSurfaceFormat ffxGetSurfaceFormatVK(VkFormat format)

Fetch a FfxSurfaceFormat from a VkFormat.

Returns: An FfxSurfaceFormat.

Parameters:

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

Returns: FFX_API FfxSurfaceFormat

Source: sdk/include/FidelityFX/host/backends/vk/ffx_vk.h (line 171, column 26)

ffxGetBufferResourceDescriptionVK

FFX_API FfxResourceDescription ffxGetBufferResourceDescriptionVK(const VkBuffer buffer, const VkBufferCreateInfo createInfo, FfxResourceUsage additionalUsages=FFX_RESOURCE_USAGE_READ_ONLY)

Fetch a FfxResourceDescription from an existing VkBuffer.

Returns: An FfxResourceDescription.

Parameters:

  • buffer (const VkBuffer) – [in] The VkBuffer resource to create a FfxResourceDescription for.
  • createInfo (const VkBufferCreateInfo) – [in] The VkBufferCreateInfo of the buffer
  • additionalUsages (FfxResourceUsage) – [in] Optional FfxResourceUsage flags needed for select resource mapping.

Returns: FFX_API FfxResourceDescription

Source: sdk/include/FidelityFX/host/backends/vk/ffx_vk.h (line 183, column 32)

ffxGetImageResourceDescriptionVK

FFX_API FfxResourceDescription ffxGetImageResourceDescriptionVK(const VkImage image, const VkImageCreateInfo createInfo, FfxResourceUsage additionalUsages=FFX_RESOURCE_USAGE_READ_ONLY)

Fetch a FfxResourceDescription from an existing VkImage.

Returns: An FfxResourceDescription.

Parameters:

  • image (const VkImage) – [in] The VkImage resource to create a FfxResourceDescription for.
  • createInfo (const VkImageCreateInfo) – [in] The VkImageCreateInfo of the buffer
  • additionalUsages (FfxResourceUsage) – [in] Optional FfxResourceUsage flags needed for select resource mapping.

Returns: FFX_API FfxResourceDescription

Source: sdk/include/FidelityFX/host/backends/vk/ffx_vk.h (line 197, column 32)

ffxGetCommandQueueVK

FFX_API FfxCommandQueue ffxGetCommandQueueVK(VkQueue commandQueue)

Fetch a FfxCommandQueue from an existing VkQueue.

Returns: An FfxCommandQueue.

Parameters:

  • commandQueue (VkQueue) – [in] The VkQueue to create a FfxCommandQueue from.

Returns: FFX_API FfxCommandQueue

Source: sdk/include/FidelityFX/host/backends/vk/ffx_vk.h (line 209, column 25)

ffxGetSwapchainVK

FFX_API FfxSwapchain ffxGetSwapchainVK(VkSwapchainKHR swapchain)

Fetch a FfxSwapchain from an existing VkSwapchainKHR.

Returns: An FfxSwapchain.

Parameters:

NameTypeDefault
swapchainVkSwapchainKHR

Returns: FFX_API FfxSwapchain

Source: sdk/include/FidelityFX/host/backends/vk/ffx_vk.h (line 219, column 22)

ffxGetVKSwapchain

FFX_API VkSwapchainKHR ffxGetVKSwapchain(FfxSwapchain ffxSwapchain)

Fetch a VkSwapchainKHR from an existing FfxSwapchain.

Returns: An VkSwapchainKHR object.

Parameters:

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

Returns: FFX_API VkSwapchainKHR

Source: sdk/include/FidelityFX/host/backends/vk/ffx_vk.h (line 229, column 24)

Dependencies

This module depends on: