run: honor VICTORY_FSR_HOST on Series S and allow FrameGen with it #384

Open
github-bot wants to merge 5 commits from github-bot/gh-384 into main AGit
Owner

@⁠MikeSouza1 on GitHub · 2026-12-03 22:46 UTC · original
MikeSouza1:fix/series-s-fsr-host-and-framegen → main · +76 −14 · 3 files · 5 commits · open

Fixes #403

Problem

  1. Commit 374850871 ("run: Series S defaults to the title's upscaler") sets VICTORY_UPSCALER=6 on Console::SeriesS whenever VICTORY_UPSCALER is unset, without checking whether VICTORY_FSR_HOST=1 is actively serving FidelityFX on the host. Even though the comment above it notes VICTORY_FSR_HOST=1 serves FidelityFX on the host instead, host FSR on Series S was bypassed unless VICTORY_UPSCALER=7 was also set manually.
  2. In the VICTORY_FSR_HOST=1 branch, victory_hle::modules::fidelityfx::use_frame_generation(dir) was not called when VICTORY_FIDELITYFX_FRAMEGEN=1 is set, even though victory_gpu::framegen is console-agnostic and consumes the host upscaler's recorded depth/motion inputs directly.

Fix

  • Make victory_hle::modules::fidelityfx::serving() pub and gate the Series S VICTORY_UPSCALER=6 fallback on serving() (which only becomes true once a live host FidelityFX upscaler provider is loaded and selected), keeping the safe VICTORY_UPSCALER=6 fallback whenever VICTORY_FSR_HOST is off, unset, or fails to select a provider.
  • Extract a single maybe_use_frame_generation(dir) helper in apps/victory/src/run.rs used by both VICTORY_FSR_4K and VICTORY_FSR_HOST=1 when VICTORY_FIDELITYFX_FRAMEGEN=1 is set. Note: this also enables AMD frame generation on Series X when using VICTORY_FSR_HOST=1 + VICTORY_FIDELITYFX_FRAMEGEN=1 (shared depth/motion dispatch path).
  • Update docs/SETTINGS.md for VICTORY_FSR_HOST and VICTORY_FIDELITYFX_FRAMEGEN, and add unit tests in series_s_output_tests.

Verification

  • Unit tests & build: PKG=victory ./build.sh check (0 warnings), PKG=victory ./build.sh test -- series_s_output_tests (5 passed; 0 failed).
  • Gameplay testing (Fedora Linux kernel 7.3.6, Ryzen 5 5600G, 16 GB RAM, RX 6750 XT 12 GB RADV NAVI22, CONSOLE=series-s, VICTORY_OUTPUT=1920x1080, VICTORY_BVH_BUILDER=1):
    • With VICTORY_FSR_HOST=1: FidelityFX: upscaler context on the host provider="3.1.6" render=[1280, 720] output=[1920, 1080] activates cleanly on Series S (no black screen); steady-state in-world frame time improved from 63.3 ms (17.7 fps, min 3.7) to 51.8 ms (19.6 fps, min 16.0) with zero texture/pipeline warnings.
    • With VICTORY_FSR_HOST=1 + VICTORY_FIDELITYFX_FRAMEGEN=1 (re-verified on 3b84f58, logs + screenshot in the comments below): proxy 3.1.7 and generator 3.1.6 initialize, compose the interface plane separately, and generate interpolated frames over a normal 3D outdoor scene (generated frames frame=3801 rendered=3 generated=3 presents=4).
**@⁠MikeSouza1** on GitHub · 2026-12-03 22:46 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/384) `MikeSouza1:fix/series-s-fsr-host-and-framegen` → `main` · +76 −14 · 3 files · 5 commits · open Fixes #403 ## Problem 1. Commit `374850871` ("run: Series S defaults to the title's upscaler") sets `VICTORY_UPSCALER=6` on `Console::SeriesS` whenever `VICTORY_UPSCALER` is unset, without checking whether `VICTORY_FSR_HOST=1` is actively serving FidelityFX on the host. Even though the comment above it notes `VICTORY_FSR_HOST=1 serves FidelityFX on the host instead`, host FSR on Series S was bypassed unless `VICTORY_UPSCALER=7` was also set manually. 2. In the `VICTORY_FSR_HOST=1` branch, `victory_hle::modules::fidelityfx::use_frame_generation(dir)` was not called when `VICTORY_FIDELITYFX_FRAMEGEN=1` is set, even though `victory_gpu::framegen` is console-agnostic and consumes the host upscaler's recorded depth/motion inputs directly. ## Fix - Make `victory_hle::modules::fidelityfx::serving()` `pub` and gate the Series S `VICTORY_UPSCALER=6` fallback on `serving()` (which only becomes true once a live host FidelityFX upscaler provider is loaded and selected), keeping the safe `VICTORY_UPSCALER=6` fallback whenever `VICTORY_FSR_HOST` is off, unset, or fails to select a provider. - Extract a single `maybe_use_frame_generation(dir)` helper in `apps/victory/src/run.rs` used by both `VICTORY_FSR_4K` and `VICTORY_FSR_HOST=1` when `VICTORY_FIDELITYFX_FRAMEGEN=1` is set. Note: this also enables AMD frame generation on Series X when using `VICTORY_FSR_HOST=1` + `VICTORY_FIDELITYFX_FRAMEGEN=1` (shared depth/motion dispatch path). - Update `docs/SETTINGS.md` for `VICTORY_FSR_HOST` and `VICTORY_FIDELITYFX_FRAMEGEN`, and add unit tests in `series_s_output_tests`. ## Verification - Unit tests & build: `PKG=victory ./build.sh check` (0 warnings), `PKG=victory ./build.sh test -- series_s_output_tests` (`5 passed; 0 failed`). - Gameplay testing (Fedora Linux kernel 7.3.6, Ryzen 5 5600G, 16 GB RAM, RX 6750 XT 12 GB RADV NAVI22, `CONSOLE=series-s`, `VICTORY_OUTPUT=1920x1080`, `VICTORY_BVH_BUILDER=1`): - With `VICTORY_FSR_HOST=1`: `FidelityFX: upscaler context on the host provider="3.1.6" render=[1280, 720] output=[1920, 1080]` activates cleanly on Series S (no black screen); steady-state in-world frame time improved from `63.3 ms` (`17.7 fps`, `min 3.7`) to `51.8 ms` (`19.6 fps`, `min 16.0`) with zero texture/pipeline warnings. - With `VICTORY_FSR_HOST=1` + `VICTORY_FIDELITYFX_FRAMEGEN=1` (re-verified on `3b84f58`, logs + screenshot in the comments below): proxy `3.1.7` and generator `3.1.6` initialize, compose the interface plane separately, and generate interpolated frames over a normal 3D outdoor scene (`generated frames frame=3801 rendered=3 generated=3 presents=4`).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 22:48:39 +00:00
Author
Owner

@⁠maple-quartz18 on GitHub · 2026-12-03 23:53 UTC · original

agreed

**@⁠maple-quartz18** on GitHub · 2026-12-03 23:53 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/384#issuecomment-7396109327) agreed
Author
Owner

@⁠Mylloon on GitHub · 2026-12-04 01:30 UTC · original

Just tested the PR, works great!

**@⁠Mylloon** on GitHub · 2026-12-04 01:30 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/384#issuecomment-7397911375) Just tested the PR, works great!
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-04 07:36 UTC · original

Read through this at 1230388 and built it natively on Windows (MSVC, not Wine). cargo test -p victory --bins passes 25/25, and clippy has nothing new in run.rs.

What changes, as far as I can tell from the code:

  • Series S with VICTORY_FSR_HOST unset or =0: same as main. host_fsr_serving stays false and the VICTORY_UPSCALER=6 default still applies (run.rs:258-263).
  • Series S with VICTORY_FSR_HOST=1 but no FidelityFX dir: only the menu warning, host_fsr_serving stays false, still forced to 6. That's the safe fallback.
  • Series S with VICTORY_FSR_HOST=1 and the DLL loaded: the picker is left alone, so the title's FidelityFX goes to the host provider. An explicit VICTORY_UPSCALER still wins.
  • The frame gen call in the host branch (run.rs:200-205) isn't Series S only. Series X with VICTORY_FSR_HOST=1 and VICTORY_FIDELITYFX_FRAMEGEN=1 also gets frame gen now. That seems fine to me, since the depth/motion handoff sits in the shared dispatch path (crates/victory-hle/src/modules/fidelityfx.rs:721) and runs for both branches. Might be worth adding one line about it to the PR description.

I don't see a guard being dropped. b76f277 only wired frame gen into the VICTORY_FSR_4K branch and nothing in it explains why the host branch was left out. 3748508 already says in its comment that VICTORY_FSR_HOST=1 serves FidelityFX instead (run.rs:256), so the code just didn't match that comment before. The Series S output cap from #66 is enforced elsewhere and this doesn't touch it.

The env reads match what's already there. The new frame gen check is a copy of the one at run.rs:170, and VICTORY_FSR_HOST is still read the same way at run.rs:186 (trimmed, "1") and crates/victory-gpu/src/host/panel.rs:756 (trimmed and lowercased, "1"), so =0 means off in both places.

Two small nits, neither blocking. The frame gen block now exists twice (run.rs:170 and :200) and could be pulled into a small helper. docs/SETTINGS.md:27 could also mention that on Series S, VICTORY_FSR_HOST=1 replaces the default upscaler 6.

Couldn't test it in game here, so this is code reading plus the unit tests.

AI-assisted: yes

**@⁠Kal0s-design** on GitHub · 2026-12-04 07:36 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/384#issuecomment-7404868741) Read through this at 1230388 and built it natively on Windows (MSVC, not Wine). `cargo test -p victory --bins` passes 25/25, and clippy has nothing new in run.rs. What changes, as far as I can tell from the code: - Series S with `VICTORY_FSR_HOST` unset or `=0`: same as main. `host_fsr_serving` stays false and the `VICTORY_UPSCALER=6` default still applies (run.rs:258-263). - Series S with `VICTORY_FSR_HOST=1` but no FidelityFX dir: only the menu warning, `host_fsr_serving` stays false, still forced to 6. That's the safe fallback. - Series S with `VICTORY_FSR_HOST=1` and the DLL loaded: the picker is left alone, so the title's FidelityFX goes to the host provider. An explicit `VICTORY_UPSCALER` still wins. - The frame gen call in the host branch (run.rs:200-205) isn't Series S only. Series X with `VICTORY_FSR_HOST=1` and `VICTORY_FIDELITYFX_FRAMEGEN=1` also gets frame gen now. That seems fine to me, since the depth/motion handoff sits in the shared dispatch path (crates/victory-hle/src/modules/fidelityfx.rs:721) and runs for both branches. Might be worth adding one line about it to the PR description. I don't see a guard being dropped. b76f277 only wired frame gen into the `VICTORY_FSR_4K` branch and nothing in it explains why the host branch was left out. 3748508 already says in its comment that `VICTORY_FSR_HOST=1` serves FidelityFX instead (run.rs:256), so the code just didn't match that comment before. The Series S output cap from #66 is enforced elsewhere and this doesn't touch it. The env reads match what's already there. The new frame gen check is a copy of the one at run.rs:170, and `VICTORY_FSR_HOST` is still read the same way at run.rs:186 (trimmed, "1") and crates/victory-gpu/src/host/panel.rs:756 (trimmed and lowercased, "1"), so `=0` means off in both places. Two small nits, neither blocking. The frame gen block now exists twice (run.rs:170 and :200) and could be pulled into a small helper. docs/SETTINGS.md:27 could also mention that on Series S, `VICTORY_FSR_HOST=1` replaces the default upscaler 6. Couldn't test it in game here, so this is code reading plus the unit tests. AI-assisted: yes
Author
Owner

@⁠Luxuride on GitHub · 2026-12-04 12:04 UTC · original

The logic reads right and the guard is narrowly scoped, but this is a nine-line change that undoes a documented crash-class workaround for one console profile, so it should not be merged on reasoning alone — attach one Series S run with VICTORY_FSR_HOST=1 (and VICTORY_FIDELITYFX_FRAMEGEN=1): the log lines plus a screenshot of a non-black scene.

The comment you edit (run.rs:245-250) records that the Series S picker choosing the console FidelityFX left "the interface draws but the 3D scene stays black". If the title still picks 7 and the host dispatch fails, the black screen is back with no guard, so keep the forced 6 until a live provider is actually reported.

Two nits while you are there:

  • host_fsr_serving is a false friend: it is set when use_host_dir(dir) returns Ok (run.rs:199), which proves the DLL loaded, not that a provider exists or is serving. Call it host_fsr_loaded, or gate on fidelityfx::serving() (fidelityfx.rs:251).
  • The frame-generation block is duplicated verbatim (run.rs:200-205 vs run.rs:169-173) and both copies test only == "1", so the fourth ML mode will silently not work on this path. One helper, same accepted values in both places.

And one doc sentence: docs/SETTINGS.md:27 still describes VICTORY_FSR_HOST as only "FSR 4 for the title's own upscaling"; on Series S it now also suppresses the forced upscaler override.

**@⁠Luxuride** on GitHub · 2026-12-04 12:04 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/384#issuecomment-7410927188) The logic reads right and the guard is narrowly scoped, but this is a nine-line change that undoes a documented crash-class workaround for one console profile, so it should not be merged on reasoning alone — attach one Series S run with `VICTORY_FSR_HOST=1` (and `VICTORY_FIDELITYFX_FRAMEGEN=1`): the log lines plus a screenshot of a non-black scene. The comment you edit (`run.rs:245-250`) records that the Series S picker choosing the console FidelityFX left "the interface draws but the 3D scene stays black". If the title still picks 7 and the host dispatch fails, the black screen is back with no guard, so keep the forced 6 until a live provider is actually reported. Two nits while you are there: - `host_fsr_serving` is a false friend: it is set when `use_host_dir(dir)` returns `Ok` (`run.rs:199`), which proves the DLL loaded, not that a provider exists or is serving. Call it `host_fsr_loaded`, or gate on `fidelityfx::serving()` (`fidelityfx.rs:251`). - The frame-generation block is duplicated verbatim (`run.rs:200-205` vs `run.rs:169-173`) and both copies test only `== "1"`, so the fourth ML mode will silently not work on this path. One helper, same accepted values in both places. And one doc sentence: `docs/SETTINGS.md:27` still describes `VICTORY_FSR_HOST` as only "FSR 4 for the title's own upscaling"; on Series S it now also suppresses the forced upscaler override.
Author
Owner

@⁠MikeSouza1 on GitHub · 2026-12-04 17:08 UTC · original

Thanks @⁠Luxuride and @⁠Kal0s-design for the thorough review! Addressed all code/doc feedback in 3b84f58:

  • Exposed victory_hle::modules::fidelityfx::serving() as pub and gated the Series S VICTORY_UPSCALER=6 fallback on serving() instead of the raw VICTORY_FSR_HOST flag, so if the host DLL/provider is missing or fails to select, Series S still falls back to upscaler 6.
  • Extracted a shared maybe_use_frame_generation(dir) helper in apps/victory/src/run.rs (deduplicating the VICTORY_FSR_4K and VICTORY_FSR_HOST branches).
  • Updated docs/SETTINGS.md for VICTORY_FSR_HOST and VICTORY_FIDELITYFX_FRAMEGEN, updated the PR description to note Series X + VICTORY_FSR_HOST=1 also gains FrameGen, and expanded series_s_output_tests (PKG=victory ./build.sh check with 0 warnings, PKG=victory ./build.sh test -- series_s_output_tests 5 passed; 0 failed).

Series S verification run on 3b84f58 (CONSOLE=series-s VICTORY_FSR_HOST=1 VICTORY_FIDELITYFX_FRAMEGEN=1)

Relevant log lines from the run (RX 6750 XT 12 GB, RADV NAVI22, Fedora Linux):

2026-12-04T16:57:52.033576Z  INFO victory_hle::modules::fidelityfx: FidelityFX: selected PC upscaler folder=Z:\...\deps\fsr4 version="3.1.6"
frame gen      Z:\...\deps\fsr4\amd_fidelityfx_framegeneration_dx12.dll
console        Xbox Series S
2026-12-04T16:57:59.015181Z  INFO victory_gpu::framegen: FidelityFX frame generation: proxy swap chain provider="3.1.7"
2026-12-04T16:58:11.960317Z  INFO victory_hle::modules::fidelityfx: FidelityFX: upscaler context on the host provider="3.1.6" id=0xf5a5ca1e00c01006 render=[1280, 720] output=[1920, 1080] flags=0x29
2026-12-04T16:59:46.008514Z  INFO victory_hle::modules::fidelityfx: FidelityFX: first upscaling, host formats of its textures formats=[10, 19, 34, 67]
2026-12-04T16:59:46.016376Z  INFO victory_hle::modules::fidelityfx: FidelityFX 4 recorded the title's temporal dispatch render=[1280, 720] output=[1920, 1080] backing_extents=[Some((1280, 720)), Some((1280, 720)), Some((1280, 720)), None, None, None, Some((1920, 1080))] jitter=[-0.0, -0.0] motion_vector_scale=[1.0, 1.0]
2026-12-04T16:59:46.907127Z  INFO victory_gpu::framegen: FidelityFX frame generation: generator for the upscaled frames provider="3.1.6" screen=[1920, 1080] render=[1280, 720]
2026-12-04T16:59:46.911988Z  INFO victory_gpu::framegen: FidelityFX frame generation: first upscaled frame's depth and motion given to it frame=3799 render=[1280, 720] screen=[1920, 1080] rect=[0, 0, 1920, 1080]
2026-12-04T16:59:46.912156Z  INFO victory_gpu::framegen: FidelityFX frame generation: the interface plane is scaled to the frame plane=[3840, 2160] screen=[1920, 1080] rect=[0, 0, 1920, 1080]
2026-12-04T16:59:46.912219Z  INFO victory_gpu::framegen: FidelityFX frame generation: the interface plane is composed over every frame
2026-12-04T16:59:47.370219Z  INFO victory_gpu::framegen: FidelityFX frame generation: generated frames frame=3801 rendered=3 generated=3 presents=4

Screenshot of the live 3D scene from that run (VIctory 3b84f58 | 1280x720 -> 1920x1080 [FSR 3] | FG:ON):
Captura_de_tela_20261204_140128

**@⁠MikeSouza1** on GitHub · 2026-12-04 17:08 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/384#issuecomment-7418488665) Thanks @⁠Luxuride and @⁠Kal0s-design for the thorough review! Addressed all code/doc feedback in `3b84f58`: - Exposed `victory_hle::modules::fidelityfx::serving()` as `pub` and gated the Series S `VICTORY_UPSCALER=6` fallback on `serving()` instead of the raw `VICTORY_FSR_HOST` flag, so if the host DLL/provider is missing or fails to select, Series S still falls back to upscaler `6`. - Extracted a shared `maybe_use_frame_generation(dir)` helper in `apps/victory/src/run.rs` (deduplicating the `VICTORY_FSR_4K` and `VICTORY_FSR_HOST` branches). - Updated `docs/SETTINGS.md` for `VICTORY_FSR_HOST` and `VICTORY_FIDELITYFX_FRAMEGEN`, updated the PR description to note Series X + `VICTORY_FSR_HOST=1` also gains FrameGen, and expanded `series_s_output_tests` (`PKG=victory ./build.sh check` with 0 warnings, `PKG=victory ./build.sh test -- series_s_output_tests` `5 passed; 0 failed`). ### Series S verification run on `3b84f58` (`CONSOLE=series-s VICTORY_FSR_HOST=1 VICTORY_FIDELITYFX_FRAMEGEN=1`) Relevant log lines from the run (RX 6750 XT 12 GB, RADV NAVI22, Fedora Linux): ```text 2026-12-04T16:57:52.033576Z INFO victory_hle::modules::fidelityfx: FidelityFX: selected PC upscaler folder=Z:\...\deps\fsr4 version="3.1.6" frame gen Z:\...\deps\fsr4\amd_fidelityfx_framegeneration_dx12.dll console Xbox Series S 2026-12-04T16:57:59.015181Z INFO victory_gpu::framegen: FidelityFX frame generation: proxy swap chain provider="3.1.7" 2026-12-04T16:58:11.960317Z INFO victory_hle::modules::fidelityfx: FidelityFX: upscaler context on the host provider="3.1.6" id=0xf5a5ca1e00c01006 render=[1280, 720] output=[1920, 1080] flags=0x29 2026-12-04T16:59:46.008514Z INFO victory_hle::modules::fidelityfx: FidelityFX: first upscaling, host formats of its textures formats=[10, 19, 34, 67] 2026-12-04T16:59:46.016376Z INFO victory_hle::modules::fidelityfx: FidelityFX 4 recorded the title's temporal dispatch render=[1280, 720] output=[1920, 1080] backing_extents=[Some((1280, 720)), Some((1280, 720)), Some((1280, 720)), None, None, None, Some((1920, 1080))] jitter=[-0.0, -0.0] motion_vector_scale=[1.0, 1.0] 2026-12-04T16:59:46.907127Z INFO victory_gpu::framegen: FidelityFX frame generation: generator for the upscaled frames provider="3.1.6" screen=[1920, 1080] render=[1280, 720] 2026-12-04T16:59:46.911988Z INFO victory_gpu::framegen: FidelityFX frame generation: first upscaled frame's depth and motion given to it frame=3799 render=[1280, 720] screen=[1920, 1080] rect=[0, 0, 1920, 1080] 2026-12-04T16:59:46.912156Z INFO victory_gpu::framegen: FidelityFX frame generation: the interface plane is scaled to the frame plane=[3840, 2160] screen=[1920, 1080] rect=[0, 0, 1920, 1080] 2026-12-04T16:59:46.912219Z INFO victory_gpu::framegen: FidelityFX frame generation: the interface plane is composed over every frame 2026-12-04T16:59:47.370219Z INFO victory_gpu::framegen: FidelityFX frame generation: generated frames frame=3801 rendered=3 generated=3 presents=4 ``` Screenshot of the live 3D scene from that run (`VIctory 3b84f58 | 1280x720 -> 1920x1080 [FSR 3] | FG:ON`): <img width="2560" height="1440" alt="Captura_de_tela_20261204_140128" src="https://github.com/user-attachments/assets/a3eb830b-e3cf-41d6-80b0-3e3cee532951" />
# Conflicts:
#	apps/victory/src/run.rs
#	docs/SETTINGS.md
# Conflicts:
#	apps/victory/src/run.rs
#	docs/SETTINGS.md
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/384/head:github-bot/gh-384'
git switch 'github-bot/gh-384'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-384'
git switch 'github-bot/gh-384'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-384'
git switch 'github-bot/gh-384'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-384'
git switch 'main'
git merge --squash 'github-bot/gh-384'
git switch 'main'
git merge --ff-only 'github-bot/gh-384'
git switch 'main'
git merge 'github-bot/gh-384'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.