Update FSR docs and make AMD CI header check non-fatal

This commit is contained in:
Kelsi 2026-03-08 21:40:26 -07:00
parent 94ad89c764
commit 09cdcd67b5
3 changed files with 43 additions and 39 deletions

View file

@ -110,19 +110,17 @@ jobs:
rm -rf extern/FidelityFX-FSR2 rm -rf extern/FidelityFX-FSR2
git clone --depth 1 https://github.com/GPUOpen-Effects/FidelityFX-FSR2.git extern/FidelityFX-FSR2 git clone --depth 1 https://github.com/GPUOpen-Effects/FidelityFX-FSR2.git extern/FidelityFX-FSR2
- name: Verify AMD FSR2 Vulkan permutation headers - name: Check AMD FSR2 Vulkan permutation headers (non-fatal)
run: | run: |
set -euo pipefail set -euo pipefail
SDK_DIR="$PWD/extern/FidelityFX-FSR2" SDK_DIR="$PWD/extern/FidelityFX-FSR2"
OUT_DIR="$SDK_DIR/src/ffx-fsr2-api/vk/shaders" OUT_DIR="$SDK_DIR/src/ffx-fsr2-api/vk/shaders"
test -f "$OUT_DIR/ffx_fsr2_tcr_autogen_pass_permutations.h" if [ -f "$OUT_DIR/ffx_fsr2_accumulate_pass_permutations.h" ]; then
test -f "$OUT_DIR/ffx_fsr2_autogen_reactive_pass_permutations.h" echo "AMD FSR2 Vulkan permutation headers detected."
test -f "$OUT_DIR/ffx_fsr2_accumulate_pass_permutations.h" else
test -f "$OUT_DIR/ffx_fsr2_compute_luminance_pyramid_pass_permutations.h" echo "WARNING: AMD FSR2 Vulkan permutation headers not found in SDK checkout."
test -f "$OUT_DIR/ffx_fsr2_depth_clip_pass_permutations.h" echo "Build will continue; WoWee CMake will fall back to internal FSR2 backend."
test -f "$OUT_DIR/ffx_fsr2_lock_pass_permutations.h" fi
test -f "$OUT_DIR/ffx_fsr2_reconstruct_previous_depth_pass_permutations.h"
test -f "$OUT_DIR/ffx_fsr2_rcas_pass_permutations.h"
- name: Configure (AMD ON) - name: Configure (AMD ON)
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWOWEE_ENABLE_AMD_FSR2=ON run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWOWEE_ENABLE_AMD_FSR2=ON

View file

@ -179,6 +179,14 @@ make -j$(nproc)
- `extern/FidelityFX-FSR2/src/ffx-fsr2-api/vk/shaders/ffx_fsr2_accumulate_pass_permutations.h` - `extern/FidelityFX-FSR2/src/ffx-fsr2-api/vk/shaders/ffx_fsr2_accumulate_pass_permutations.h`
- If SDK files or generated Vulkan permutation headers are missing, CMake falls back to the internal non-AMD FSR2 path automatically. - If SDK files or generated Vulkan permutation headers are missing, CMake falls back to the internal non-AMD FSR2 path automatically.
### Current FSR Defaults
- Upscaling quality default: `Native (100%)`
- UI quality order: `Native (100%)`, `Ultra Quality (77%)`, `Quality (67%)`, `Balanced (59%)`
- Default `FSR Sharpness`: `1.6`
- Default FSR2 `Jitter Sign`: `0.38`
- `Performance (50%)` preset is intentionally removed.
## Controls ## Controls
### Camera & Movement ### Camera & Movement
@ -239,6 +247,7 @@ make -j$(nproc)
## CI / CD ## CI / CD
- GitHub Actions builds on every push: Linux (x86-64, ARM64), Windows (MSYS2), macOS (ARM64) - GitHub Actions builds on every push: Linux (x86-64, ARM64), Windows (MSYS2), macOS (ARM64)
- `build-linux-amd-fsr2` clones AMD's FSR2 SDK and builds with `-DWOWEE_ENABLE_AMD_FSR2=ON`; if Vulkan permutation headers are absent in that SDK checkout, WoWee automatically falls back to the internal FSR2 backend
- Container build via `container/build-in-container.sh` (Podman) - Container build via `container/build-in-container.sh` (Podman)
## Security ## Security

View file

@ -1,50 +1,47 @@
# AMD FSR2 Integration Notes # AMD FSR2 Integration Notes
This project currently has two FSR2 states: WoWee supports two FSR2 backends at runtime:
- `AMD FidelityFX SDK` backend (preferred): enabled when SDK sources are present. - `AMD FidelityFX SDK` backend (preferred when available).
- `Internal fallback` backend: used when SDK is missing. - `Internal fallback` backend (used when AMD SDK prerequisites are not met).
## SDK Location ## SDK Location
Drop AMD's official FSR2 repo at: AMD SDK checkout path:
`extern/FidelityFX-FSR2` `extern/FidelityFX-FSR2`
Expected header for detection: Detection expects:
`extern/FidelityFX-FSR2/src/ffx-fsr2-api/ffx_fsr2.h` - `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`
## Build Flags ## Build Flags
- `WOWEE_ENABLE_AMD_FSR2=ON` (default): try to use AMD SDK if detected. - `WOWEE_ENABLE_AMD_FSR2=ON` (default): attempt AMD backend integration.
- `WOWEE_HAS_AMD_FSR2` compile define: - `WOWEE_HAS_AMD_FSR2` compile define:
- `1` when SDK header is found. - `1` when AMD SDK prerequisites are present.
- `0` otherwise (fallback path). - `0` when missing, in which case internal fallback remains active.
## Current Status ## Current Status
- CMake detects the SDK and defines `WOWEE_HAS_AMD_FSR2`. - AMD FSR2 Vulkan dispatch path is integrated and used when available.
- UI shows active FSR2 backend label in settings. - UI displays active backend in settings (`AMD FidelityFX SDK` or `Internal fallback`).
- Runtime logs clearly indicate whether AMD SDK is available. - Runtime settings include persisted FSR2 jitter tuning.
- Startup safety behavior remains enabled:
- persisted FSR2 is deferred until `IN_WORLD`
- startup falls back unless `WOWEE_ALLOW_STARTUP_FSR2=1`
## Remaining Work (to finish official AMD path) ## FSR Defaults
1. Add backend wrapper around `FfxFsr2Context` and Vulkan backend helpers. - Quality default: `Native (100%)`
2. Feed required inputs each frame: - UI quality order: `Native`, `Ultra Quality`, `Quality`, `Balanced`
- Color, depth, motion vectors - Default sharpness: `1.6`
- Jitter offsets - Default FSR2 jitter sign: `0.38`
- Delta time and render/display resolution - Performance preset is intentionally removed.
- Exposure / reactive mask as needed
3. Replace custom compute accumulation path with `ffxFsr2ContextDispatch`.
4. Keep current fallback path behind a runtime switch for safety.
5. Add a debug overlay:
- Backend in use
- Internal resolution
- Jitter values
- Motion vector validity stats
6. Validate with fixed camera + movement sweeps:
- Static shimmer
- Moving blur/ghosting
- Fine geometry stability
## CI Notes
- `build-linux-amd-fsr2` clones AMD's repository and configures with `WOWEE_ENABLE_AMD_FSR2=ON`.
- Some upstream SDK checkouts do not include generated Vulkan permutation headers.
- In that case, WoWee CMake intentionally falls back to the internal backend so CI remains buildable.