RDNA 2 (RX 6800 XT): FSR 3.1 fallback, output size with FSR, memory and thread pools — findings + patches on Hawkeye54781/rdna2-fixes #89

Open
opened 2026-12-01 18:04:09 +00:00 by github-bot · 1 comment
Owner

@⁠Hawkeye54781 on GitHub · 2026-12-01 18:01 UTC · original

RDNA 2 (RX 6800 XT): FSR 3.1 fallback, output size with FSR, memory and thread pools — a findings report and three patches

Tested tonight on one machine, one long session of measuring. Hardware and build:

  • Ryzen 5 5600X (6c/12t), RX 6800 XT 16 GB, 2560x1440 monitor
  • GE-Proton 11-15, the Mesa 26.3.1 RADV this fork's setup.sh builds (with patches/mesa.patch), ntsync
  • Retail build 1.0.2.1, Series X profile, VICTORY_OUTPUT=2560x1440, VICTORY_BVH_BUILDER=0, VICTORY_FSR_4K=quality (then performance), VICTORY_FRAME_INTERVAL_MS=33

Branch with the patches: Hawkeye54781/rdna2-fixes (from main at 37bb30f). Everything below was measured from this fork's own logs and panel, not guessed.

1. The SDK offers RDNA 2 no FSR 4 — the fork refuses its FSR 3.1

select_version() demands a provider name starting 4.1. and the post-create check demands one too. On RDNA 2 the signed FidelityFX SDK dll offers 3.1.6, 2.3.4 only (FSR 4 needs WMMA). So VICTORY_FSR_4K=* was unusable: first "no FSR 4.1 provider for this adapter", and once a 3.1 context was made anyway, the post-create check destroyed it and the title called through a dead pointer (0xc0000005 executing 0xffff900003c60000).

Patched: fall back to the best provider the card has (4.1 if offered, else 3.1.x) at both checks. FSR 3.1.6 then serves the title's upscaler dispatch end to end. Same pixel count as the title's own upscaler, visibly sharper.

2. The output-size patch is skipped on the FSR path — FSR was welded to a 4K display

run.rs applied the resolution patch only if execute && fsr.is_none(), and the FSR path sets VICTORY_DISPLAY_MODE=3840x2160. So with an FSR preset the title's output followed the display mode: on a 1440p monitor the fork rendered 2560x1440 and upscaled to 3840x2160, which the monitor downscaled again. The FidelityFX context line said it: render=[2560, 1440] output=[3840, 2160].

Patched: apply apply_asked with an FSR preset too. Now render=[1706, 960] output=[2560, 1440] — the same internal size the title's own upscaler picks, with FSR doing the upscale, and 1440p back buffers instead of 4K.

Also for the record: the fork's set_var("VICTORY_DISPLAY_MODE", "3840x2160") on the FSR path cost us one run to an X11 BadRRCrtc during a swapchain recreate (RRGetCrtcInfo, Crtc 0x20) — the title believed in a 4K display the monitor does not have. With the output size applied, the 4K display mode is the remaining mismatch; on this machine the FSR run is stable with it, but it looks worth aligning.

3. The card's room for title memory: 12 GiB kept for the host starves a 16 GiB card

CARD_KEPT_FOR_HOST = 12 GiB left the title 4 GiB of 16 (log: card_mb_for_title=4080), and the periodic line read 8798 MB in RAM, 3176 MB in VRAM — most of the hot set read over PCIe while 12 GiB of VRAM was held for the host. VICTORY_TITLE_CARD_GB (which other forks' notes mention) is not read anywhere in this code.

Patched: VICTORY_TITLE_CARD_GB=<gib> asks for the title's room outright. At 10 the same line read 9534 MB in RAM falling over a session with the card's share filling; at 6 the host texture queue kept its room. The two consumers fight over one pool, and the balance is the setting.

4. Residency promotion was capped at 8 MiB a wave

MOST = 128 pages of 64 KiB per wave, one wave a second: the hot set filled at ~8 MiB/s regardless of the room. VICTORY_WAVE_MB=<mb> sets the budget; at 1024 the card's share climbed steadily instead of plateauing. (A warm --used before play does the same job without the game competing; both help.)

5. Thread pools sized for a 32-thread machine

thin.rs starts min(cores, 10) translating threads and dstorage one worker per logical thread. On the 5600X that was 10+12 pool threads on 12 logical CPUs beside the title's own threads and the frame thread: the pools sat in waits while the frame thread starved (the trace read: card-side bookkeeping busy, frame prepare late). Patched: half the logical threads (6 and 6-8), at least 4. Same throughput — the pools were mostly idle — steadier frames on six cores.

What is still open (measured, not fixed)

  • The texture pass runs on the frame thread. Its 250 ms span (750 with a backlog) is per pass, several passes a frame; during streaming bursts the queue held 15-24k slots waiting and the frame rate floored at ~4.6-5. A parallel fan-out of the pass's per-slot reads was tried and reverted: pre-reads fed stale fingerprints and the picture broke (black and corrupt textures). The staleness model (fingerprint_blank / compare_source / the look-vs-upload gap) needs a correctness pass before the reads can leave the frame thread. This is the one change that would move the open world most on a small CPU.
  • Sustained texture upload measured 45-57 MB/s from the logs (26 GiB in one session) — the PCIe link has room; the time budget is the cap.
  • With the card's share filled (gpu_busy_percent 100, the panel's clock busy_percent 91-100) and 7 GiB still in RAM, the GPU reads the rest of the hot set over PCIe: the picture of the split pool this fork exists to remove, at the resolution a 16 GB card can hold it at.
  • CONSOLE=series-s (Lockhart) dies at System Init, frame 0, E_INVALIDARG in the back-buffer code the Series X patches touch — probably the Lockhart path was never exercised.

Environment notes

  • GE-Proton 11-15's tree-indexed wineserver (merged Nov 27) is worth naming in the README for Proton users: the family's forks measure it at 2-5x frame time. Stock GE 11-1..11-14 walk a view list per map.
  • fsrSharpen in the title's settings.xml (0.2 default) is worth raising with FSR 3.1 on a 1440p panel.

Happy to send the branch as a pull request if the shape is right, and to test whatever the texture-pass correctness pass comes up with on this machine.

**@⁠Hawkeye54781** on GitHub · 2026-12-01 18:01 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/89) # RDNA 2 (RX 6800 XT): FSR 3.1 fallback, output size with FSR, memory and thread pools — a findings report and three patches Tested tonight on one machine, one long session of measuring. Hardware and build: - **Ryzen 5 5600X (6c/12t), RX 6800 XT 16 GB, 2560x1440 monitor** - GE-Proton 11-15, the Mesa 26.3.1 RADV this fork's `setup.sh` builds (with `patches/mesa.patch`), ntsync - Retail build 1.0.2.1, Series X profile, `VICTORY_OUTPUT=2560x1440`, `VICTORY_BVH_BUILDER=0`, `VICTORY_FSR_4K=quality` (then `performance`), `VICTORY_FRAME_INTERVAL_MS=33` Branch with the patches: `Hawkeye54781/rdna2-fixes` (from `main` at `37bb30f`). Everything below was measured from this fork's own logs and panel, not guessed. ## 1. The SDK offers RDNA 2 no FSR 4 — the fork refuses its FSR 3.1 `select_version()` demands a provider name starting `4.1.` and the post-create check demands one too. On RDNA 2 the signed FidelityFX SDK dll offers `3.1.6, 2.3.4` only (FSR 4 needs WMMA). So `VICTORY_FSR_4K=*` was unusable: first "no FSR 4.1 provider for this adapter", and once a 3.1 context was made anyway, the post-create check destroyed it and the title called through a dead pointer (`0xc0000005` executing `0xffff900003c60000`). Patched: fall back to the best provider the card has (4.1 if offered, else 3.1.x) at both checks. FSR 3.1.6 then serves the title's upscaler dispatch end to end. Same pixel count as the title's own upscaler, visibly sharper. ## 2. The output-size patch is skipped on the FSR path — FSR was welded to a 4K display `run.rs` applied the resolution patch only `if execute && fsr.is_none()`, and the FSR path sets `VICTORY_DISPLAY_MODE=3840x2160`. So with an FSR preset the title's output followed the display mode: on a 1440p monitor the fork rendered 2560x1440 and upscaled to **3840x2160**, which the monitor downscaled again. The FidelityFX context line said it: `render=[2560, 1440] output=[3840, 2160]`. Patched: apply `apply_asked` with an FSR preset too. Now `render=[1706, 960] output=[2560, 1440]` — the same internal size the title's own upscaler picks, with FSR doing the upscale, and 1440p back buffers instead of 4K. Also for the record: the fork's `set_var("VICTORY_DISPLAY_MODE", "3840x2160")` on the FSR path cost us one run to an X11 `BadRRCrtc` during a swapchain recreate (`RRGetCrtcInfo`, Crtc `0x20`) — the title believed in a 4K display the monitor does not have. With the output size applied, the 4K display mode is the remaining mismatch; on this machine the FSR run is stable with it, but it looks worth aligning. ## 3. The card's room for title memory: 12 GiB kept for the host starves a 16 GiB card `CARD_KEPT_FOR_HOST = 12 GiB` left the title 4 GiB of 16 (log: `card_mb_for_title=4080`), and the periodic line read `8798 MB in RAM, 3176 MB in VRAM` — most of the hot set read over PCIe while 12 GiB of VRAM was held for the host. `VICTORY_TITLE_CARD_GB` (which other forks' notes mention) is not read anywhere in this code. Patched: `VICTORY_TITLE_CARD_GB=<gib>` asks for the title's room outright. At 10 the same line read `9534 MB in RAM` falling over a session with the card's share filling; at 6 the host texture queue kept its room. The two consumers fight over one pool, and the balance is the setting. ## 4. Residency promotion was capped at 8 MiB a wave `MOST = 128` pages of 64 KiB per wave, one wave a second: the hot set filled at ~8 MiB/s regardless of the room. `VICTORY_WAVE_MB=<mb>` sets the budget; at 1024 the card's share climbed steadily instead of plateauing. (A `warm --used` before play does the same job without the game competing; both help.) ## 5. Thread pools sized for a 32-thread machine `thin.rs` starts `min(cores, 10)` translating threads and dstorage one worker per logical thread. On the 5600X that was 10+12 pool threads on 12 logical CPUs beside the title's own threads and the frame thread: the pools sat in waits while the frame thread starved (the trace read: card-side bookkeeping busy, frame prepare late). Patched: half the logical threads (6 and 6-8), at least 4. Same throughput — the pools were mostly idle — steadier frames on six cores. ## What is still open (measured, not fixed) - **The texture pass runs on the frame thread.** Its 250 ms span (750 with a backlog) is per pass, several passes a frame; during streaming bursts the queue held 15-24k slots waiting and the frame rate floored at ~4.6-5. A parallel fan-out of the pass's per-slot reads was tried and **reverted**: pre-reads fed stale fingerprints and the picture broke (black and corrupt textures). The staleness model (`fingerprint_blank` / `compare_source` / the look-vs-upload gap) needs a correctness pass before the reads can leave the frame thread. This is the one change that would move the open world most on a small CPU. - Sustained texture upload measured 45-57 MB/s from the logs (26 GiB in one session) — the PCIe link has room; the time budget is the cap. - With the card's share filled (`gpu_busy_percent` 100, the panel's `clock busy_percent` 91-100) and 7 GiB still in RAM, the GPU reads the rest of the hot set over PCIe: the picture of the split pool this fork exists to remove, at the resolution a 16 GB card can hold it at. - `CONSOLE=series-s` (Lockhart) dies at `System Init`, frame 0, `E_INVALIDARG` in the back-buffer code the Series X patches touch — probably the Lockhart path was never exercised. ## Environment notes - GE-Proton 11-15's tree-indexed wineserver (merged Nov 27) is worth naming in the README for Proton users: the family's forks measure it at 2-5x frame time. Stock GE 11-1..11-14 walk a view list per map. - `fsrSharpen` in the title's `settings.xml` (0.2 default) is worth raising with FSR 3.1 on a 1440p panel. Happy to send the branch as a pull request if the shape is right, and to test whatever the texture-pass correctness pass comes up with on this machine.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 18:04:09 +00:00
Author
Owner

@⁠imnotagooddeveloper on GitHub · 2026-12-02 00:50 UTC · original

Hello, Idk will it work but you can place Optiscaler's fsr4 dll's to /deps/fsr4/ folder. It worked for me (using rx 6700xt)

**@⁠imnotagooddeveloper** on GitHub · 2026-12-02 00:50 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/89#issuecomment-7331010910) Hello, Idk will it work but you can place Optiscaler's fsr4 dll's to `/deps/fsr4/` folder. It worked for me (using rx 6700xt)
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/lobomfz--VIctory-xmem#89
No description provided.