hle, gpu: fall back to FSR 3.1 upscaler when FSR 4.1 is unavailable #324

Manually merged
github merged 1 commit from github-bot/gh-324 into main 2026-12-03 16:31:07 +00:00 AGit
Owner

@⁠EzequielGhR on GitHub · 2026-12-03 14:12 UTC · original
feat/framegen_fsr3.1_fallback_rdna2 → main · +49 −15 · 5 files · 1 commits · merged 2026-12-03 16:26 UTC

Closes #160

Summary

Allows RDNA 2 / RDNA 3 GPUs (where amd_fidelityfx_upscaler_dx12.dll exposes 3.1.x instead of 4.1.x under Wine/vkd3d-proton) to use host FidelityFX upscaling, presets (VICTORY_PRESET), and FSR 3.1 frame generation (VICTORY_FIDELITYFX_FRAMEGEN=1).

I don't have access to an llm to walk me through the whole repo so if there are tests I didn't see or something please let me know and I'll fix things as soon as I am able.

Changes

  • victory-hle (fidelityfx.rs):
    • Fall back to a 3.1.x upscaler provider in select_version and post-creation version validation when no 4.1.x provider is exposed by the adapter.
    • Pass null() instead of the guest Xbox memory allocator pointer into host ffxCreateContext and ffxDestroyContext so the 3.1.x provider uses host memory allocation instead of jumping to unmapped guest callbacks (0xc0000005).
    • Forward the selected provider version string to victory-gpu.
  • victory-gpu (external.rs, host/panel.rs):
    • Display FSR 3 (FSR3 Q/B/P) in the F3 performance panel when a 3.x host upscaler is active, while keeping FSR 4 (FSR4 Q/B/P) when 4.x is active.

Testing

  • Tested on AMD Radeon RX 6800 XT (RDNA 2, 16 GB) with Mesa RADV 26.3.1 and AMD FidelityFX SDK 2.4.0 (3.1.6 upscaler + frame generation).
  • Verified VICTORY_FSR_4K=balanced, VICTORY_FIDELITYFX_FRAMEGEN=1, VICTORY_UI_PLANE=1920x1080 VICTORY_OUTPUT=1920X1080, and the F3 performance panel readout.

Current run.conf

VICTORY_BVH_BUILDER=0
VICTORY_FSR_4K=balanced
VICTORY_OUTPUT=1920x1080
VICTORY_HUD_PLANE=1920x1080

VICTORY_LOD_SCALE=0.35
VICTORY_SMALL_CULL=5.0
VICTORY_VEHICLE_LOD_BIAS=1.5

VICTORY_LOW_SHADOWS=1024
VICTORY_SHADOW_CASCADES=2
VICTORY_LOW_VOLUMETRIC=1
VICTORY_VOLUMETRIC_QUALITY=2
VICTORY_TREE_QUALITY=2
VICTORY_WORLD_DIST_SCALE=0.45
VICTORY_FIDELITYFX_FRAMEGEN=1
VICTORY_SKIP_BINK=1
VICTORY_LOG=warn
**@⁠EzequielGhR** on GitHub · 2026-12-03 14:12 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/324) `feat/framegen_fsr3.1_fallback_rdna2` → `main` · +49 −15 · 5 files · 1 commits · merged 2026-12-03 16:26 UTC Closes #160 ### Summary Allows RDNA 2 / RDNA 3 GPUs (where `amd_fidelityfx_upscaler_dx12.dll` exposes `3.1.x` instead of `4.1.x` under Wine/vkd3d-proton) to use host FidelityFX upscaling, presets (`VICTORY_PRESET`), and FSR 3.1 frame generation (`VICTORY_FIDELITYFX_FRAMEGEN=1`). I don't have access to an llm to walk me through the whole repo so if there are tests I didn't see or something please let me know and I'll fix things as soon as I am able. ### Changes - **`victory-hle` (`fidelityfx.rs`):** - Fall back to a `3.1.x` upscaler provider in `select_version` and post-creation version validation when no `4.1.x` provider is exposed by the adapter. - Pass `null()` instead of the guest Xbox `memory` allocator pointer into host `ffxCreateContext` and `ffxDestroyContext` so the `3.1.x` provider uses host memory allocation instead of jumping to unmapped guest callbacks (`0xc0000005`). - Forward the selected provider version string to `victory-gpu`. - **`victory-gpu` (`external.rs`, `host/panel.rs`):** - Display `FSR 3` (`FSR3 Q/B/P`) in the F3 performance panel when a `3.x` host upscaler is active, while keeping `FSR 4` (`FSR4 Q/B/P`) when `4.x` is active. ### Testing - Tested on **AMD Radeon RX 6800 XT (RDNA 2, 16 GB)** with Mesa RADV `26.3.1` and AMD FidelityFX SDK `2.4.0` (`3.1.6` upscaler + frame generation). - Verified `VICTORY_FSR_4K=balanced`, `VICTORY_FIDELITYFX_FRAMEGEN=1`, `VICTORY_UI_PLANE=1920x1080` `VICTORY_OUTPUT=1920X1080`, and the F3 performance panel readout. ### Current run.conf ``` VICTORY_BVH_BUILDER=0 VICTORY_FSR_4K=balanced VICTORY_OUTPUT=1920x1080 VICTORY_HUD_PLANE=1920x1080 VICTORY_LOD_SCALE=0.35 VICTORY_SMALL_CULL=5.0 VICTORY_VEHICLE_LOD_BIAS=1.5 VICTORY_LOW_SHADOWS=1024 VICTORY_SHADOW_CASCADES=2 VICTORY_LOW_VOLUMETRIC=1 VICTORY_VOLUMETRIC_QUALITY=2 VICTORY_TREE_QUALITY=2 VICTORY_WORLD_DIST_SCALE=0.45 VICTORY_FIDELITYFX_FRAMEGEN=1 VICTORY_SKIP_BINK=1 VICTORY_LOG=warn ```
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 14:19:45 +00:00
github manually merged commit b3fb838448 into main 2026-12-03 16:31:07 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.