fix(vk): capture the HUD-less picture for FSR frame generation at native resolution #1691

Merged
HumanBean merged 2 commits from futondestroyer/Longshot:fix-fsr-fg-native-hud into main 2026-11-19 01:39:39 +00:00
Member

Type: fix · Risk: low · Tested on: Windows 11, RTX 4070, NVIDIA 621.01 · Needs: Windows, RX 9070 XT with FSR 4 native AA

TL;DR

The HUD could smear at 100% render resolution with FSR 3.1 frame generation because the game renders the picture at its final size and Longshot missed the opportunity to copy it before the HUD was drawn. The fix lets the known full-size gameplay pass supply that copy. A game-free test reproduces the missing copy on main. In a local native-resolution run, the HUD was marked on 0 of 600 presents with RC8 and 600 of 600 with the patch. The reporter’s AMD configuration still needs a visual check.

Breakdown

  • Who it helps: Players using FSR 3.1 frame generation at 100% render resolution.
  • What was wrong: The HUD capture required a wider output even when it knew the game was drawing its full-size picture.
  • What changes: The known full-size gameplay pass can supply the picture used to keep the HUD still.
  • What does not change: The FSR settings, motion-vector handoff, interpolation shaders, and the existing checks for inferred passes.
  • How it was checked: The native capture fixture fails on main and passes on the branch. A local Windows gameplay run restored HUD marks on 600 of 600 presents.
  • What is still open: A visual comparison of generated frames and the exact RX 9070 XT configuration.
  • Risk: Low. The additional capture is limited to a known gameplay dispatch with equal input and output dimensions.

Why

FSR 3.1 frame generation interpolates a copy of the game world before the HUD is drawn and restores the current HUD afterward. Without that copy it uses the presented image and can drag the HUD with the scene. The 100% render-resolution path could miss the copy. See #1565 and the related FSR HUD fixes #1464, #1487 and #1538.

How to reproduce

Seen on: Windows 11 build 26200, Radeon RX 9070 XT, AMD driver 26.10.1, reported in #1565.

Settings and switches: FSR 4 at native render resolution, Frame generation 2×, Frame generation by FSR 3.1 FG, 1920×1080.

Steps: Play in Hyrule Field with the HUD visible. Pan the camera across a high-contrast background. Check that the FPS counter identifies FSR 3.1 FG, then inspect the minimap and button labels during camera movement.

Expected: HUD elements stay attached to the screen as the world moves.

Actual: The reporter sees smearing around the HUD. The source regression fixture independently shows that the known full-size dispatch returns no pre-HUD image on main.

What changed

  • The normal dispatch path in gpu/vk/vk_draw.cpp accepts the selected output mip at equal width and height when gameplay_network() recognizes the dispatch. Inferred dispatches still require a wider output.
  • tests/test_fsr3fi_hud_capture.py compiles the actual capture selector from source. It tests the known native pass, inferred equal-sized dispatches, unequal height, smaller output, mip size, existing scaled capture, unrelated formats, and disabling FSR frame generation.

Measurements

Verdict: Native gameplay capture is restored in the game-free test and confirmed by gameplay counters. The local gameplay run measured HUD marking and FSR generation counts. Performance and the visual outcome on the reporter’s AMD configuration remain open.

Metric Before: main @ 83b161e3 After: this PR @ 478e556f
Known 1920×1080 input and output No picture selected Picture selected
Inferred 1920×1080 input and output Rejected by width guard Rejected by width guard
Before: The known 100% gameplay dispatch did not supply a pre-HUD picture
After: PASS: FSR 3.1 HUD capture selects the native gameplay picture and keeps its other guards

Gameplay hardware and scene: Windows 11, GeForce RTX 4070, NVIDIA 621.01, Kokiri Forest. 1920×1080, DLAA at native render resolution, pre-bloom DLAA forced off, FSR 3.1 FG 2×.

Gameplay baseline: Pinned RC8 host and renderer at 2f1c0c9c. The patch run used the same RC8 host and ABI-34 renderer built from the fix; the renderer is based on newer main. The independent game-free fixture above compares exact main and the patch.

600-present log window Stock RC8 Patched renderer, same RC8 host
FSR 3.1 generated a set 600 600, then 599
Shared temporal motion used 600 600 in the first window
HUD marked 0 600, then 600

Flags and settings

None.

Testing

Tested: In Kokiri Forest, native DLAA and FSR 3.1 FG 2× were active with both renderers. HUD markings rose from 0/600 on stock RC8 to 600/600 in both observed patched windows. The fixture passed with Windows llvm-mingw on the patch and failed for the expected reason with the fixture alone on main. The Windows NGX renderer built and linked. The HUD-less color and normal upscale fallback fixtures passed. The existing PsychoV35 FSR FG fixture fails to compile on both this branch and main because its stubs lack present, VK_NULL_HANDLE and hudless.

Not tested: Visual inspection of matched generated frames, Radeon gameplay, performance impact, Linux, the wider game-free suite, and GLSL recompilation. The HUD-less color check verified the existing SPIR-V header’s source hash.

Must be tested:

  • Windows with RX 9070 XT and FSR 4 native AA, FSR 3.1 FG 2×. Pan the camera in Hyrule Field and verify that the minimap and prompts stay fixed. Check that the same 600-present log window shows FSR 3.1 actually making frames and the HUD being marked. Repeat with built-in FG as the visual control. Use Test Farm for the counters and a player for the visual check.

Risks

What could break: The added native-resolution copy uses GPU time and memory bandwidth in this mode. If the wrong play image were selected, FSR could misclassify some pixels as HUD. The fix requires a recognized gameplay key, compatible color formats and exact dimensions.

Turning it off: Revert this commit.

Compatibility: No setting, save, shader cache format or renderer API change.

Issues

See #1565.

Checklist

Everyone

  • One topic.
  • Conventional Commit title.
  • Why explains the reason and links the issue.
  • Tested on my own PC in the game, as Testing describes.
  • Measurements includes a verdict with baseline and patch.
  • Runtime impact measured.
  • Testing names what was checked and what must still be checked.
  • Based on current main at the time of preparation.
  • Full game-free suite complete and baseline failures identified.
  • No game files, dumps, build output or generated files.
  • No third-party changes.
  • Uses the repository license.

When it applies

  • AI assistance recorded with Assisted-by:.
  • Same-scene visual comparison.
  • Game-free regression fails on main and passes here.
**Type:** fix · **Risk:** low · **Tested on:** Windows 11, RTX 4070, NVIDIA 621.01 · **Needs:** Windows, RX 9070 XT with FSR 4 native AA ## TL;DR The HUD could smear at 100% render resolution with FSR 3.1 frame generation because the game renders the picture at its final size and Longshot missed the opportunity to copy it before the HUD was drawn. The fix lets the known full-size gameplay pass supply that copy. A game-free test reproduces the missing copy on main. In a local native-resolution run, the HUD was marked on 0 of 600 presents with RC8 and 600 of 600 with the patch. The reporter’s AMD configuration still needs a visual check. ## Breakdown - **Who it helps:** Players using FSR 3.1 frame generation at 100% render resolution. - **What was wrong:** The HUD capture required a wider output even when it knew the game was drawing its full-size picture. - **What changes:** The known full-size gameplay pass can supply the picture used to keep the HUD still. - **What does not change:** The FSR settings, motion-vector handoff, interpolation shaders, and the existing checks for inferred passes. - **How it was checked:** The native capture fixture fails on main and passes on the branch. A local Windows gameplay run restored HUD marks on 600 of 600 presents. - **What is still open:** A visual comparison of generated frames and the exact RX 9070 XT configuration. - **Risk:** Low. The additional capture is limited to a known gameplay dispatch with equal input and output dimensions. ## Why FSR 3.1 frame generation interpolates a copy of the game world before the HUD is drawn and restores the current HUD afterward. Without that copy it uses the presented image and can drag the HUD with the scene. The 100% render-resolution path could miss the copy. See #1565 and the related FSR HUD fixes #1464, #1487 and #1538. ## How to reproduce **Seen on:** Windows 11 build 26200, Radeon RX 9070 XT, AMD driver 26.10.1, reported in #1565. **Settings and switches:** FSR 4 at native render resolution, Frame generation 2×, Frame generation by FSR 3.1 FG, 1920×1080. **Steps:** Play in Hyrule Field with the HUD visible. Pan the camera across a high-contrast background. Check that the FPS counter identifies FSR 3.1 FG, then inspect the minimap and button labels during camera movement. **Expected:** HUD elements stay attached to the screen as the world moves. **Actual:** The reporter sees smearing around the HUD. The source regression fixture independently shows that the known full-size dispatch returns no pre-HUD image on main. ## What changed - The normal dispatch path in `gpu/vk/vk_draw.cpp` accepts the selected output mip at equal width and height when `gameplay_network()` recognizes the dispatch. Inferred dispatches still require a wider output. - `tests/test_fsr3fi_hud_capture.py` compiles the actual capture selector from source. It tests the known native pass, inferred equal-sized dispatches, unequal height, smaller output, mip size, existing scaled capture, unrelated formats, and disabling FSR frame generation. ## Measurements **Verdict:** Native gameplay capture is restored in the game-free test and confirmed by gameplay counters. The local gameplay run measured HUD marking and FSR generation counts. Performance and the visual outcome on the reporter’s AMD configuration remain open. | Metric | Before: main @ 83b161e3 | After: this PR @ 478e556f | |---|---|---| | Known 1920×1080 input and output | No picture selected | Picture selected | | Inferred 1920×1080 input and output | Rejected by width guard | Rejected by width guard | ``` Before: The known 100% gameplay dispatch did not supply a pre-HUD picture After: PASS: FSR 3.1 HUD capture selects the native gameplay picture and keeps its other guards ``` **Gameplay hardware and scene:** Windows 11, GeForce RTX 4070, NVIDIA 621.01, Kokiri Forest. 1920×1080, DLAA at native render resolution, pre-bloom DLAA forced off, FSR 3.1 FG 2×. **Gameplay baseline:** Pinned RC8 host and renderer at `2f1c0c9c`. The patch run used the same RC8 host and ABI-34 renderer built from the fix; the renderer is based on newer main. The independent game-free fixture above compares exact main and the patch. | 600-present log window | Stock RC8 | Patched renderer, same RC8 host | |---|---:|---:| | FSR 3.1 generated a set | 600 | 600, then 599 | | Shared temporal motion used | 600 | 600 in the first window | | HUD marked | 0 | 600, then 600 | ### Flags and settings None. ## Testing **Tested:** In Kokiri Forest, native DLAA and FSR 3.1 FG 2× were active with both renderers. HUD markings rose from 0/600 on stock RC8 to 600/600 in both observed patched windows. The fixture passed with Windows llvm-mingw on the patch and failed for the expected reason with the fixture alone on main. The Windows NGX renderer built and linked. The HUD-less color and normal upscale fallback fixtures passed. The existing PsychoV35 FSR FG fixture fails to compile on both this branch and main because its stubs lack `present`, `VK_NULL_HANDLE` and `hudless`. **Not tested:** Visual inspection of matched generated frames, Radeon gameplay, performance impact, Linux, the wider game-free suite, and GLSL recompilation. The HUD-less color check verified the existing SPIR-V header’s source hash. **Must be tested:** - Windows with RX 9070 XT and FSR 4 native AA, FSR 3.1 FG 2×. Pan the camera in Hyrule Field and verify that the minimap and prompts stay fixed. Check that the same 600-present log window shows FSR 3.1 actually making frames and the HUD being marked. Repeat with built-in FG as the visual control. Use Test Farm for the counters and a player for the visual check. ## Risks **What could break:** The added native-resolution copy uses GPU time and memory bandwidth in this mode. If the wrong play image were selected, FSR could misclassify some pixels as HUD. The fix requires a recognized gameplay key, compatible color formats and exact dimensions. **Turning it off:** Revert this commit. **Compatibility:** No setting, save, shader cache format or renderer API change. ## Issues See #1565. ## Checklist ### Everyone - [x] One topic. - [x] Conventional Commit title. - [x] Why explains the reason and links the issue. - [x] Tested on my own PC in the game, as Testing describes. - [x] Measurements includes a verdict with baseline and patch. - [ ] Runtime impact measured. - [x] Testing names what was checked and what must still be checked. - [x] Based on current main at the time of preparation. - [ ] Full game-free suite complete and baseline failures identified. - [x] No game files, dumps, build output or generated files. - [x] No third-party changes. - [x] Uses the repository license. ### When it applies - [x] AI assistance recorded with `Assisted-by:`. - [ ] Same-scene visual comparison. - [x] Game-free regression fails on main and passes here.
Assisted-by: OpenAI Codex
fix(vk): capture the HUD-less picture for FSR frame generation at native resolution
Some checks reported errors
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 11s
CI / Workflow lint (actionlint) (pull_request) Successful in 12s
Third-party parts / As their notes say (pull_request) Successful in 13s
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Failing after 3s
beanstalk/approval approved by llun (reviewed)
beanstalk/any 0/1 pass, 1 error
478e556fe8
Assisted-by: OpenAI Codex
Author
Member

Tested in game: Windows 11, RTX 4070, NVIDIA 621.01, Kokiri Forest at 1920x1080 with native DLAA and FSR 3.1 FG at 2x. Stock RC8 host and renderer marked the HUD on 0 of 600 presents with 600 actual FSR-generated presents. On the same API-34 host, the patched 478e556f renderer marked the HUD on 600 of 600 presents while FSR made all 600. The exact RX 9070 XT visual check and performance measurement are pending.

Tested in game: Windows 11, RTX 4070, NVIDIA 621.01, Kokiri Forest at 1920x1080 with native DLAA and FSR 3.1 FG at 2x. Stock RC8 host and renderer marked the HUD on 0 of 600 presents with 600 actual FSR-generated presents. On the same API-34 host, the patched 478e556f renderer marked the HUD on 600 of 600 presents while FSR made all 600. The exact RX 9070 XT visual check and performance measurement are pending.
Member

@Beanstalk

@Beanstalk
Member

Beanstalk test farm

Commit 478e556 · tier reviewed · approved by llun · dashboard

What will be tested · AI plan (gpt-6.1-terra)

Compare 2× frame-generation modes during camera movement in Hyrule Field, using no upscaling as a native-resolution control. The run takes about 12 minutes and checks screenshots, frame times and VRAM; crashes or significant regressions fail. FSR 4 Native AA and generated-frame HUD counters cannot be verified by this plan.

  • Where: any (any PC, 1-2 reports).
  • Matrix: 2 cells, each on main and the PR: frame_generation_by 0 or 1.
  • field-hud-pan: from the repository's save kokiri-start (settings dlss=6, fps_counter=1, frame_generation=2), then teleport to Hyrule Field, move the stick, take the picture hud-after-pan to compare with main, measure field for 20 s (after 5 s warm-up); 1 run on each side for each of 2 cells (1 game start a run).
  • Measured: crashes, frame times, stutters and hitches, VRAM use.
  • The PR fails if: it crashes; or a picture differs from main by more than 10%; or peak VRAM is more than 10% above main; or frame time (p99) is more than 15% above main.
  • Time: about 12 min of game runs per tester (2 game starts), plus the two builds.

Done (started 01:37 UTC, last report 01:38 UTC). Comment @Beanstalk to run it again.

Target Reports Crash Frame p99 (ms) vs main VRAM peak (MB) vs main Result
any · 1: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3050 Ti Laptop GPU, 621.24.0 1/1 1 none — — error
Scenario · matrix cell Target Frame p99 (ms) vs main Result
field-hud-pan · frame_generation_by=0 any — not judged
field-hud-pan · frame_generation_by=1 any — not judged

Measurements · any

Verdict: could not be judged on any (1/1 report).

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3050 Ti Laptop GPU, 621.24.0 AMD Ryzen 7 5800H with Radeon Graphics, 16 GB RAM
Scene: field-hud-pan, from the repository's save kokiri-start (dlss=6, fps_counter=1, frame_generation=2); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); field-hud-pan: 1 game start a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Nothing was measured: no metric came back.

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (peak VRAM) Helps / doesn't help / untested
frame_generation_by menu setting 0, 1 main's default the PR's default field-hud-pan, the PR at 0 → at 1: not measured untested
Markdown for the PR description
## Measurements

**Verdict:** could not be judged on any (1/1 report).

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3050 Ti Laptop GPU, 621.24.0` `AMD Ryzen 7 5800H with Radeon Graphics, 16 GB RAM`  
Scene: field-hud-pan, from the repository's save kokiri-start (dlss=6, fps_counter=1, frame_generation=2); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); field-hud-pan: 1 game start a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 1 report  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

Nothing was measured: no metric came back.

### Flags and settings

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (peak VRAM) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `frame_generation_by` | menu setting | `0`, `1` | main's default | the PR's default | field-hud-pan, the PR at 0 → at 1: not measured | untested |
<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `478e556` · tier **reviewed** · approved by llun · [dashboard](https://beanstalk.magicbean.dev/prs/1691) **What will be tested** · AI plan (`gpt-6.1-terra`) Compare 2× frame-generation modes during camera movement in Hyrule Field, using no upscaling as a native-resolution control. The run takes about 12 minutes and checks screenshots, frame times and VRAM; crashes or significant regressions fail. FSR 4 Native AA and generated-frame HUD counters cannot be verified by this plan. - **Where:** any (any PC, 1-2 reports). - **Matrix:** 2 cells, each on main and the PR: frame_generation_by `0` or `1`. - **field-hud-pan:** from the repository's save `kokiri-start` (settings dlss=6, fps_counter=1, frame_generation=2), then teleport to Hyrule Field, move the stick, take the picture hud-after-pan to compare with main, measure field for 20 s (after 5 s warm-up); 1 run on each side for each of 2 cells (1 game start a run). - **Measured:** crashes, frame times, stutters and hitches, VRAM use. - **The PR fails if:** it crashes; or a picture differs from main by more than 10%; or peak VRAM is more than 10% above main; or frame time (p99) is more than 15% above main. - **Time:** about 12 min of game runs per tester (2 game starts), plus the two builds. Done (started 01:37 UTC, last report 01:38 UTC). Comment `@Beanstalk` to run it again. | Target | Reports | Crash | Frame p99 (ms) vs main | VRAM peak (MB) vs main | Result | | --- | --- | --- | --- | --- | --- | | any · 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3050 Ti Laptop GPU, 621.24.0` | 1/1 [1](https://beanstalk.magicbean.dev/reports/rp_e9111d0348a11de3) | none | — | — | error | | Scenario · matrix cell | Target | Frame p99 (ms) vs main | Result | | --- | --- | --- | --- | | field-hud-pan · `frame_generation_by=0` | any | — | not judged | | field-hud-pan · `frame_generation_by=1` | any | — | not judged | #### Measurements · any **Verdict:** could not be judged on any (1/1 report). Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3050 Ti Laptop GPU, 621.24.0` `AMD Ryzen 7 5800H with Radeon Graphics, 16 GB RAM` Scene: field-hud-pan, from the repository's save kokiri-start (dlss=6, fps_counter=1, frame_generation=2); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); field-hud-pan: 1 game start a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (peak VRAM) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `frame_generation_by` | menu setting | `0`, `1` | main's default | the PR's default | field-hud-pan, the PR at 0 → at 1: not measured | untested | <details><summary>Markdown for the PR description</summary> ```markdown ## Measurements **Verdict:** could not be judged on any (1/1 report). Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3050 Ti Laptop GPU, 621.24.0` `AMD Ryzen 7 5800H with Radeon Graphics, 16 GB RAM` Scene: field-hud-pan, from the repository's save kokiri-start (dlss=6, fps_counter=1, frame_generation=2); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); field-hud-pan: 1 game start a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (peak VRAM) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `frame_generation_by` | menu setting | `0`, `1` | main's default | the PR's default | field-hud-pan, the PR at 0 → at 1: not measured | untested | ``` </details>
HumanBean changed title from WIP: fix(vk): capture the HUD-less picture for FSR frame generation at native resolution to fix(vk): capture the HUD-less picture for FSR frame generation at native resolution 2026-11-19 01:39:30 +00:00
HumanBean deleted branch fix-fsr-fg-native-hud 2026-11-19 01:39:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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
MagicBeanDev/Longshot!1691
No description provided.