[pr-fix][frame-generation][rendering] Keep Darner overlays out of generated frames #344

Open
MuoM1ng wants to merge 1 commit from MuoM1ng/Darner:codex/darner-framegen-overlays into main
First-time contributor

Contributor role (optional)

What it changes

On v2026.12.03.02, Darner draws its F1 menu, FPS pill, stats panel and notices onto the present buffer after the title's separate UI plane has been composed. Code inspection shows that this UI plane cannot describe Darner's own draws to frame generation.

This ports the behaviour from VIctory-NVIDIA #4899. F1 holds frame generation while open by default. For passive overlays, DLSS uses the existing HUD-less colour comparison and clears the title-only alpha tag for that present. FidelityFX chooses the same clean colour input. When an overlay is drawn and no suitable input is available, the present holds frame generation. The title's existing HUD-less capture keeps precedence on single-plane presents. The change adds no full-frame copy.

Set DARNER_FRAMEGEN_IN_MENU=1 to allow generation in F1 when the HUD-less input is available. Set DARNER_OVERLAY_NO_FRAMEGEN=1 to hold generation when a Darner overlay is drawn.

How it was tested

  • Revision 9cc5e49 on v2026.12.03.02 and main f3840d7.
  • Windows check passed with cargo check --offline --locked --profile diag -p darner --features diagnostics. cargo xtask policy checked 555 files.
  • In the integration checkout, which includes both ports and existing local changes, the filtered cargo test --offline --locked --profile diag -p darner-gpu --features diagnostics --lib run passed 79 tests with 3 ignored benchmarks. The filters covered pools, texture sampling and eviction, and frame generation.
  • The matching test binary's second run covered the menu, panel, overlay shader, packed present, and shadow windows. It passed 98 tests with 3 ignored benchmarks.
  • The GPU policy test covers the F1 override, passive overlays and the missing HUD-less input fallback.
  • The F1 default changes for both DLSS and FidelityFX frame generation. Live gameplay and vendor-specific visual quality have not been measured.
  • Full workspace gates were not run.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • #328 changes F1 click handling. #168 and #283 change backend setup and Reflex markers. #259 describes the related 4K FSR case where the title HUD also lacks clean colour.
  • No equivalent open PR found.
## Contributor role (optional) ## What it changes On v2026.12.03.02, Darner draws its F1 menu, FPS pill, stats panel and notices onto the present buffer after the title's separate UI plane has been composed. Code inspection shows that this UI plane cannot describe Darner's own draws to frame generation. This ports the behaviour from VIctory-NVIDIA `#4899`. F1 holds frame generation while open by default. For passive overlays, DLSS uses the existing HUD-less colour comparison and clears the title-only alpha tag for that present. FidelityFX chooses the same clean colour input. When an overlay is drawn and no suitable input is available, the present holds frame generation. The title's existing HUD-less capture keeps precedence on single-plane presents. The change adds no full-frame copy. Set `DARNER_FRAMEGEN_IN_MENU=1` to allow generation in F1 when the HUD-less input is available. Set `DARNER_OVERLAY_NO_FRAMEGEN=1` to hold generation when a Darner overlay is drawn. ## How it was tested - Revision `9cc5e49` on `v2026.12.03.02` and main `f3840d7`. - Windows check passed with `cargo check --offline --locked --profile diag -p darner --features diagnostics`. `cargo xtask policy` checked 555 files. - In the integration checkout, which includes both ports and existing local changes, the filtered `cargo test --offline --locked --profile diag -p darner-gpu --features diagnostics --lib` run passed 79 tests with 3 ignored benchmarks. The filters covered pools, texture sampling and eviction, and frame generation. - The matching test binary's second run covered the menu, panel, overlay shader, packed present, and shadow windows. It passed 98 tests with 3 ignored benchmarks. - The GPU policy test covers the F1 override, passive overlays and the missing HUD-less input fallback. - The F1 default changes for both DLSS and FidelityFX frame generation. Live gameplay and vendor-specific visual quality have not been measured. - Full workspace gates were not run. ## Checklist - [ ] I ran this change in the game, or say below why it can't be (docs, tests only). - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - #328 changes F1 click handling. #168 and #283 change backend setup and Reflex markers. #259 describes the related 4K FSR case where the title HUD also lacks clean colour. - No equivalent open PR found.
First-time contributor

Independent Windows build, gate, and code-read review of 82a6d2a01029 (full head 82a6d2a0102952d082b06abf26fef8e7e70f4fb7), based on main f3840d73d3504c30218debfbc8795b9225447317. Not run in-game.

Environment

  • Windows 11 Pro 26H2 (build 26300.10075), Intel Core i9-14900K, NVIDIA RTX A2000 12GB (driver 621.47), Rust 1.98.1 (x86_64-pc-windows-msvc), MSVC 19.44.35230.

Measured results

  • Gate 1 (cargo clippy --workspace --all-targets --locked -- -D warnings): PASS.
  • Gate 2 (cargo clippy --workspace --all-targets --all-features --locked -- -D warnings): PASS.
  • cargo xtask policy: PASS (asset policy: 555 files ok).
  • cargo test --locked -p darner-gpu --lib framegen_holds_for_the_menu_or_when_ui_can_only_be_interpolated: PASS (1 passed; 0 failed; 0 ignored).
  • cargo test --locked -p darner-gpu --lib streamline::: PASS (63 passed; 0 failed; 0 ignored).
  • cargo test --locked -p darner-gpu --lib menu::: PASS (50 passed; 0 failed; 2 ignored).
  • Full workspace test gate (cargo test --workspace --locked) and gameplay were not run in this review.

Code-read audit

  • Host::present accumulates draw success from the panel, notices, advisor, and menu, and marks a source usable as the whole base only when it was copied without composition or sharpening (crates/darner-gpu/src/host.rs:20470-20484). The changed draw methods return false for skipped/failed overlays and only report a draw after recording a nonempty copy (host/panel.rs:1388-1468, 1509-1544, 1840-1878; host/menu.rs:3828-3965).
  • Planes::overlay_base requires both a drawn overlay and a whole, eligible source. The menu and overlay pause switches are read through the existing asked_for! helper, and the predicate distinguishes an open F1 menu from passive overlays with a clean input (crates/darner-gpu/src/streamline.rs:3091-3128).
  • DLSS tags the clean scene as HUD-less, suppresses the title UI tag when Darner UI is present, and explicitly clears absent UI tags; frame generation continues only when the present has a clean input and the configured UI policy permits it (streamline.rs:3233-3290). FSR applies the same whole-source and size checks, gates generation on the same UI policy, and filters queued inputs while held so release cannot use stale frame snapshots (crates/darner-gpu/src/streamline/fsr.rs:799-850).

CHANGES NEEDED: The default F1 behavior changes for DLSS and FSR frame generation, but the PR description says live gameplay/vendor-specific visual quality was not measured. CONTRIBUTING.md:46-50 requires an A/B result for a default behavior change on affected cards. Please add that evidence before merge. No code-path defect was identified in this static audit; runtime frame-generation output remains unverified.

AI-assisted: yes (GitHub Copilot, Auto mode).

Independent Windows build, gate, and code-read review of `82a6d2a01029` (full head `82a6d2a0102952d082b06abf26fef8e7e70f4fb7`), based on `main` `f3840d73d3504c30218debfbc8795b9225447317`. Not run in-game. ### Environment - Windows 11 Pro 26H2 (build 26300.10075), Intel Core i9-14900K, NVIDIA RTX A2000 12GB (driver 621.47), Rust 1.98.1 (`x86_64-pc-windows-msvc`), MSVC 19.44.35230. ### Measured results - Gate 1 (`cargo clippy --workspace --all-targets --locked -- -D warnings`): **PASS**. - Gate 2 (`cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`): **PASS**. - `cargo xtask policy`: **PASS** (`asset policy: 555 files ok`). - `cargo test --locked -p darner-gpu --lib framegen_holds_for_the_menu_or_when_ui_can_only_be_interpolated`: **PASS** (`1 passed; 0 failed; 0 ignored`). - `cargo test --locked -p darner-gpu --lib streamline::`: **PASS** (`63 passed; 0 failed; 0 ignored`). - `cargo test --locked -p darner-gpu --lib menu::`: **PASS** (`50 passed; 0 failed; 2 ignored`). - Full workspace test gate (`cargo test --workspace --locked`) and gameplay were not run in this review. ### Code-read audit - `Host::present` accumulates draw success from the panel, notices, advisor, and menu, and marks a source usable as the whole base only when it was copied without composition or sharpening (`crates/darner-gpu/src/host.rs:20470-20484`). The changed draw methods return false for skipped/failed overlays and only report a draw after recording a nonempty copy (`host/panel.rs:1388-1468, 1509-1544, 1840-1878; host/menu.rs:3828-3965`). - `Planes::overlay_base` requires both a drawn overlay and a whole, eligible source. The menu and overlay pause switches are read through the existing `asked_for!` helper, and the predicate distinguishes an open F1 menu from passive overlays with a clean input (`crates/darner-gpu/src/streamline.rs:3091-3128`). - DLSS tags the clean scene as HUD-less, suppresses the title UI tag when Darner UI is present, and explicitly clears absent UI tags; frame generation continues only when the present has a clean input and the configured UI policy permits it (`streamline.rs:3233-3290`). FSR applies the same whole-source and size checks, gates generation on the same UI policy, and filters queued inputs while held so release cannot use stale frame snapshots (`crates/darner-gpu/src/streamline/fsr.rs:799-850`). **CHANGES NEEDED:** The default F1 behavior changes for DLSS and FSR frame generation, but the PR description says live gameplay/vendor-specific visual quality was not measured. `CONTRIBUTING.md:46-50` requires an A/B result for a default behavior change on affected cards. Please add that evidence before merge. No code-path defect was identified in this static audit; runtime frame-generation output remains unverified. AI-assisted: yes (GitHub Copilot, Auto mode).
Contributor

Code review only (read the diff at 82a6d2a), nothing built or run. The earlier review covers the gates and the draw-return audit. I agree there and found no code defect. Two things that widen the default change:

  • The FPS pill is on by default (DARNER_FPS_LINE, on unless 0), and Menu::draw now reports it as drawn. So overlay_drawn is true on almost every gameplay frame, not only with F1 open. On two-plane SDR presents, that means the title's UI colour-and-alpha tag is no longer passed at all, and DLSS-FG has to find the title's own HUD by colour difference. That may trade pill ghosting for HUD-edge artefacts (#259, #212). A DLSS-FG A/B in gameplay, default against DARNER_FPS_LINE=0 (which gives main's tagging), would show which is better.
  • DARNER_FRAMEGEN_HUDLESS=0 plus the default pill now holds frame generation on single-plane presents: overlay_base() needs hudless_wanted(), so has_hudless is false and ui_holds_framegen(true, false) holds. A once! log line when the UI hold triggers, and a note in the README, would save someone a confusing "FG stopped working" report.
  • Checked and fine: base_copied_whole is only true where CopyResource copied the texture 1:1, so tagging it with the back-buffer size is valid. The base texture is back in its own state before both frame-generation paths read it.
  • Overlaps: #175 (HUD position) edits the same panel draw functions. #168 and #144 edit fsr.rs near here.

Reviewed with Claude Code (AI-assisted); findings checked by a human before posting.

Code review only (read the diff at `82a6d2a`), nothing built or run. The earlier review covers the gates and the draw-return audit. I agree there and found no code defect. Two things that widen the default change: - **The FPS pill is on by default** (`DARNER_FPS_LINE`, on unless `0`), and `Menu::draw` now reports it as drawn. So `overlay_drawn` is true on almost every gameplay frame, not only with F1 open. On two-plane SDR presents, that means the title's UI colour-and-alpha tag is no longer passed at all, and DLSS-FG has to find the title's own HUD by colour difference. That may trade pill ghosting for HUD-edge artefacts (#259, #212). A DLSS-FG A/B in gameplay, default against `DARNER_FPS_LINE=0` (which gives `main`'s tagging), would show which is better. - **`DARNER_FRAMEGEN_HUDLESS=0` plus the default pill now holds frame generation** on single-plane presents: `overlay_base()` needs `hudless_wanted()`, so `has_hudless` is false and `ui_holds_framegen(true, false)` holds. A `once!` log line when the UI hold triggers, and a note in the README, would save someone a confusing "FG stopped working" report. - Checked and fine: `base_copied_whole` is only true where `CopyResource` copied the texture 1:1, so tagging it with the back-buffer size is valid. The base texture is back in its own state before both frame-generation paths read it. - Overlaps: #175 (HUD position) edits the same panel draw functions. #168 and #144 edit `fsr.rs` near here. Reviewed with Claude Code (AI-assisted); findings checked by a human before posting.
First-time contributor

The missing-HUD-less case can explain an unexpected FG hold with the default FPS pill. 254404a records one message for that reason in the shared DLSS and FidelityFX policy, and documents it under DARNER_FRAMEGEN_HUDLESS. The existing menu and explicit-overlay holds take priority and don't produce the missing-input message.

The extracted policy test matched the exact old hold result for all 32 input combinations. The updated reason test, scoped GPU Clippy, asset policy and diff check passed. The gameplay comparison of title HUD edges with the pill on and off remains open.

If you cherry-pick or rebase this commit, please keep the Git author. If you fold it into another commit, please add this trailer.

Co-authored-by: andrewpozdnakov7-jpg <[email protected]>

The missing-HUD-less case can explain an unexpected FG hold with the default FPS pill. [254404a](https://git.gtahub.st/andrewpozdnakov7-jpg/Darner/commit/254404a3646909ecaf378d25469c86040c62019e) records one message for that reason in the shared DLSS and FidelityFX policy, and documents it under `DARNER_FRAMEGEN_HUDLESS`. The existing menu and explicit-overlay holds take priority and don't produce the missing-input message. The extracted policy test matched the exact old hold result for all 32 input combinations. The updated reason test, scoped GPU Clippy, asset policy and diff check passed. The gameplay comparison of title HUD edges with the pill on and off remains open. If you cherry-pick or rebase this commit, please keep the Git author. If you fold it into another commit, please add this trailer. `Co-authored-by: andrewpozdnakov7-jpg <296776509+[email protected]>`
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 'codex/darner-framegen-overlays:MuoM1ng-codex/darner-framegen-overlays'
git switch 'MuoM1ng-codex/darner-framegen-overlays'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'MuoM1ng-codex/darner-framegen-overlays'
git switch 'MuoM1ng-codex/darner-framegen-overlays'
git rebase 'main'
git switch 'main'
git merge --ff-only 'MuoM1ng-codex/darner-framegen-overlays'
git switch 'MuoM1ng-codex/darner-framegen-overlays'
git rebase 'main'
git switch 'main'
git merge --no-ff 'MuoM1ng-codex/darner-framegen-overlays'
git switch 'main'
git merge --squash 'MuoM1ng-codex/darner-framegen-overlays'
git switch 'main'
git merge --ff-only 'MuoM1ng-codex/darner-framegen-overlays'
git switch 'main'
git merge 'MuoM1ng-codex/darner-framegen-overlays'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
4 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
TrustNo1/Darner!344
No description provided.