2026-03-08 19:33:07 -07:00
# AMD FSR2 Integration Notes
2026-03-08 21:40:26 -07:00
WoWee supports two FSR2 backends at runtime:
2026-03-08 19:33:07 -07:00
2026-03-08 21:40:26 -07:00
- `AMD FidelityFX SDK` backend (preferred when available).
- `Internal fallback` backend (used when AMD SDK prerequisites are not met).
2026-03-08 19:33:07 -07:00
## SDK Location
2026-03-08 21:40:26 -07:00
AMD SDK checkout path:
2026-03-08 19:33:07 -07:00
`extern/FidelityFX-FSR2`
2026-03-08 22:47:46 -07:00
FidelityFX SDK checkout path (framegen extern):
2026-03-09 00:39:11 -07:00
`extern/FidelityFX-SDK` (default branch `main` from WoWee's fork in build scripts and CI)
2026-03-08 22:47:46 -07:00
2026-03-09 00:36:53 -07:00
Override knobs for local build scripts:
2026-03-09 00:39:11 -07:00
- `WOWEE_FFX_SDK_REPO` (default: `https://github.com/Kelsidavis/FidelityFX-SDK.git` )
- `WOWEE_FFX_SDK_REF` (default: `main` )
2026-03-09 00:36:53 -07:00
2026-03-08 21:40:26 -07:00
Detection expects:
2026-03-08 19:33:07 -07:00
2026-03-08 21:40:26 -07:00
- `extern/FidelityFX-FSR2/src/ffx-fsr2-api/ffx_fsr2.h`
- `extern/FidelityFX-FSR2/src/ffx-fsr2-api/vk/shaders/ffx_fsr2_accumulate_pass_permutations.h`
2026-03-08 21:45:25 -07:00
- If permutation headers are missing in the SDK checkout, WoWee CMake copies a vendored snapshot from:
- `third_party/fsr2_vk_permutations`
2026-03-08 19:33:07 -07:00
## Build Flags
2026-03-08 21:40:26 -07:00
- `WOWEE_ENABLE_AMD_FSR2=ON` (default): attempt AMD backend integration.
2026-03-08 22:47:46 -07:00
- `WOWEE_ENABLE_AMD_FSR3_FRAMEGEN=ON` (default): build AMD FSR3 framegen interface probe when FidelityFX-SDK headers are present.
2026-03-08 19:33:07 -07:00
- `WOWEE_HAS_AMD_FSR2` compile define:
2026-03-08 21:40:26 -07:00
- `1` when AMD SDK prerequisites are present.
- `0` when missing, in which case internal fallback remains active.
2026-03-08 22:47:46 -07:00
- `WOWEE_HAS_AMD_FSR3_FRAMEGEN` compile define:
- `1` when FidelityFX-SDK FI/OF/FSR3+VK headers are detected.
- `0` when headers are missing (probe target disabled).
2026-03-08 19:33:07 -07:00
2026-03-08 22:53:21 -07:00
Runtime note:
- Renderer/UI now expose a persisted experimental framegen toggle.
2026-03-09 00:08:22 -07:00
- Runtime loader now supports:
- Path A: AMD SDK runtime binaries (`ffx_fsr3_vk` ).
- Path B: wrapper runtime libraries implementing WoWee's wrapper ABI.
2026-03-08 23:03:45 -07:00
- You can point to an explicit runtime binary with:
- `WOWEE_FFX_SDK_RUNTIME_LIB=/absolute/path/to/libffx_fsr3_vk.so` (or `.dll` / `.dylib` ).
2026-03-09 00:08:22 -07:00
- You can point to an explicit wrapper binary with:
- `WOWEE_FFX_SDK_RUNTIME_WRAPPER_LIB=/absolute/path/to/libffx_fsr3_vk_wrapper.so` (or `.dll` / `.dylib` ).
2026-03-09 00:36:53 -07:00
- WoWee now ships an in-tree wrapper target:
- `wowee_fsr3_vk_wrapper` (output in `build/bin` ).
- Wrapper backend runtime override:
- `WOWEE_FSR3_WRAPPER_BACKEND_LIB=/absolute/path/to/libffx_fsr3_vk.so` (or `.dll` / `.dylib` ).
2026-03-09 00:45:39 -07:00
- Wrapper backend mode selection:
- `WOWEE_FSR3_WRAPPER_BACKEND=vulkan_runtime`
- `WOWEE_FSR3_WRAPPER_BACKEND=dx12_bridge`
2026-03-09 01:23:04 -07:00
- Default is `vulkan_runtime` on all platforms.
2026-03-09 02:28:49 -07:00
- `dx12_bridge` is opt-in.
- On Windows: `dx12_bridge` performs DX12/Vulkan preflight, then loads the first runtime library exposing the required FSR3 dispatch exports.
- On Linux: `dx12_bridge` is enabled for wrapper runtime compatibility mode and uses Vulkan dispatch symbols in this build.
2026-03-09 00:50:09 -07:00
- DX12 bridge runtime override:
- `WOWEE_FSR3_DX12_RUNTIME_LIB=<path-to-amd_fidelityfx_framegeneration_dx12.dll>`
2026-03-09 00:54:36 -07:00
- DX12 bridge device preflight toggle:
- `WOWEE_FSR3_WRAPPER_DX12_VALIDATE_DEVICE=1` (default)
- `WOWEE_FSR3_WRAPPER_DX12_VALIDATE_DEVICE=0` to skip DXGI/D3D12 device creation probe
2026-03-09 00:58:43 -07:00
- DX12 bridge preflight also validates Vulkan Win32 interop support:
- required device functions: `vkGetMemoryWin32HandleKHR` , `vkImportSemaphoreWin32HandleKHR` , `vkGetSemaphoreWin32HandleKHR`
- required device extensions: `VK_KHR_external_memory` , `VK_KHR_external_memory_win32` , `VK_KHR_external_semaphore` , `VK_KHR_external_semaphore_win32`
2026-03-09 00:08:22 -07:00
- Path B wrapper ABI contract is declared in:
- `include/rendering/amd_fsr3_wrapper_abi.h`
2026-03-09 01:58:45 -07:00
- Current wrapper ABI version: `3` (dispatch payload carries external memory/semaphore handles and acquire/release fence values for bridge synchronization).
2026-03-09 00:08:22 -07:00
- Required wrapper exports:
- `wowee_fsr3_wrapper_get_abi_version`
2026-03-09 02:28:49 -07:00
- `wowee_fsr3_wrapper_get_backend`
2026-03-09 00:08:22 -07:00
- `wowee_fsr3_wrapper_initialize`
- `wowee_fsr3_wrapper_dispatch_upscale`
- `wowee_fsr3_wrapper_shutdown`
- Optional wrapper export:
- `wowee_fsr3_wrapper_dispatch_framegen`
2026-03-09 01:42:41 -07:00
- `wowee_fsr3_wrapper_get_last_error`
2026-03-09 02:28:49 -07:00
- `wowee_fsr3_wrapper_get_capabilities`
2026-03-08 22:53:21 -07:00
2026-03-08 19:33:07 -07:00
## Current Status
2026-03-08 21:40:26 -07:00
- AMD FSR2 Vulkan dispatch path is integrated and used when available.
- UI displays active backend in settings (`AMD FidelityFX SDK` or `Internal fallback` ).
- Runtime settings include persisted FSR2 jitter tuning.
2026-03-09 01:09:37 -07:00
- FidelityFX-SDK extern is fetched across platforms (default: `Kelsidavis/FidelityFX-SDK` on `main` ).
2026-03-08 21:40:26 -07:00
- Startup safety behavior remains enabled:
- persisted FSR2 is deferred until `IN_WORLD`
- startup falls back unless `WOWEE_ALLOW_STARTUP_FSR2=1`
2026-03-08 19:33:07 -07:00
2026-03-08 21:40:26 -07:00
## FSR Defaults
- Quality default: `Native (100%)`
- UI quality order: `Native` , `Ultra Quality` , `Quality` , `Balanced`
- Default sharpness: `1.6`
- Default FSR2 jitter sign: `0.38`
- Performance preset is intentionally removed.
## CI Notes
- `build-linux-amd-fsr2` clones AMD's repository and configures with `WOWEE_ENABLE_AMD_FSR2=ON` .
2026-03-08 22:47:46 -07:00
- All build jobs clone:
- `GPUOpen-Effects/FidelityFX-FSR2` (`master` )
2026-03-09 01:09:37 -07:00
- `Kelsidavis/FidelityFX-SDK` (`main` ) by default
- Linux CI additionally checks FidelityFX-SDK framegen files (legacy `sdk/...` and Kits layouts):
2026-03-08 22:47:46 -07:00
- `ffx_frameinterpolation_callbacks_glsl.h`
- `ffx_opticalflow_callbacks_glsl.h`
- `CMakeShadersFrameinterpolation.txt`
- `CMakeShadersOpticalflow.txt`
2026-03-09 01:09:37 -07:00
- CI builds `wowee_fsr3_framegen_amd_vk_probe` when that target is generated by CMake for the detected SDK layout.
2026-03-08 21:40:26 -07:00
- Some upstream SDK checkouts do not include generated Vulkan permutation headers.
2026-03-08 21:45:25 -07:00
- WoWee bootstraps those headers from the vendored snapshot so AMD backend builds remain cross-platform and deterministic.
- If SDK headers are missing entirely, WoWee still falls back to the internal backend.