// AMD FidelityFX (vk_ffx.cpp): FSR 3.1 temporal upscaling through amd_fidelityfx_vk.dll, loaded at run time. #pragma once #include typedef struct { VkImage image; // level 0, layer 0, in VK_IMAGE_LAYOUT_GENERAL VkFormat format; uint32_t width, height; int storage; // created with VK_IMAGE_USAGE_STORAGE_BIT (FSR writes it) } VkFfxImage; int vk_ffx_load(void); // 1 when the library is there with its entry points (loaded once) // Records FSR 3.1 into cb: color (the scene light, render size), depth (D32F), mv (R16G16F, render pixels, current to // previous), out (the output size, RGBA16F, storage). jx, jy: the jitter the scene took, render pixels. fov_y in // radians (0: unknown). 0 on failure (the caller falls back as it does when DLSS fails). int vk_ffx_upscale(VkCommandBuffer cb, const VkFfxImage *color, const VkFfxImage *depth, const VkFfxImage *mv, const VkFfxImage *out, float jx, float jy, int reset, float dt_ms, float fov_y); void vk_ffx_release(void); // before the device goes away