[pr-fix][tools][dlss][NVIDIA] replay: record DLSS upscaling as Cmd::Upscale and evaluate it again on replay #699

Open
EcoPro wants to merge 1 commit from EcoPro:replay-dlss-upscale into Main
First-time contributor

Contributor role (optional)

  • Fluxer ID: 1577613076256002050

What it changes

  • The problem on main: a capture taken with DLSS on replays black. On the same save, darner replay scores 7.8 dB against the presented frame on main (mean RGB 0.4 out of 255).

DLSS runs inside Streamline, so the upscaled frame was never recorded and the replay had nothing to draw from. This PR records the upscaling as its own command, Cmd::Upscale (wire kind 37), together with its input textures, mode, preset and camera. darner replay then runs it again through Streamline. It finds NVIDIA's files the same way play does: from DARNER_STREAMLINE_DIR, or next to the executable. Captures made before this change still replay black, so they need to be taken again. wire::UPSCALE_OUTPUT keeps the capture_probe example building on its own, and record.rs checks at compile time that it matches streamline::OUTPUT. docs/replay.md describes the new command.

replay A/B: main black, this PR matches the game

Top row main, bottom row this PR. Left: the frame the game presented. Right: darner replay of that capture. Cropped from 2560×1440.

How it was tested

  • Tested revision: ece1ddf for the game, the capture and the replay. 5d11bfa is the same commit plus two if statements collapsed for clippy (record.rs:484, snap.rs:198).

  • Commands and results: both builds are on origin/Main 00bd68d. They used the same switches, the same 12/02 02:48 save, a capture taken once the world was loaded, and darner replay <capture> --loops 3.

  • Changes a default: no

  • A/B result: one capture per side, three replay loops each.

    A (main 00bd68d) B (this PR)
    PSNR, replay vs. presented frame 7.8 dB (all 3 loops), black 36.3 dB (all 3 loops)

    On B the replay reports "1 DLSS upscalings are evaluated again with Streamline". The three loops differ slightly from one another because DLSS carries history between frames.

  • Gates run on that revision. Every failure also happens on main 00bd68d, and none is in a file this PR touches:

    • cargo clippy --workspace --all-targets --locked -- -D warnings: fails on main's lints. These are darner-loader relocate.rs:269/277 (reproduced on main) and existing lints in memhook, pagebuf, host.rs, alias_rt, host/send.rs, host/upq.rs, texdiscard and tiles. The PR's own files have no clippy warnings.
    • The same with --all-features: the same result.
    • cargo test --workspace --locked: everything passes except xtask policy::tests::repository_passes_policy, which also fails on main.
    • cargo test -p darner-gpu --features diagnostics --locked: 1917 passed and 2 failed: compose::tests::bgrx_plane_selects_a_typed_view and shader_cache::tests::the_key_a_preload_list_is_made_under_follows_the_switches. Both fail the same way on main. The replay integration test passes; replay_big is ignored because it needs a capture rig.
    • cargo xtask policy: fails on main's crates/darner-gpu/d3d12ma/*.cpp/.h. This PR adds no files of those types.
  • Gameplay: RTX 5090 (driver 621.14), Series X profile, 2560×1440, DLSS DLAA, frame generation off, ray tracing off.

  • Shader wave sizes tested: 32 lanes.

  • Hardware dependence: NVIDIA only. The replay machine needs Streamline and DLSS available, the same as play.

  • Coverage gaps: one scene; DLAA only, not the other DLSS quality modes; ray tracing off; frame generation off; no AMD/Intel run, where the path doesn't apply; replay_big 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. The PR contains no binaries or game data; the screenshot is attached here only.
  • 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.
  • Related PRs: #641 (touches replay/play.rs), #595 (touches streamline.rs).
  • Replaces or overlaps: none found

🤖 Generated with Claude Code
image

## Contributor role (optional) - Fluxer ID: 1577613076256002050 ## What it changes - The problem on main: a capture taken with DLSS on replays black. On the same save, `darner replay` scores 7.8 dB against the presented frame on main (mean RGB 0.4 out of 255). DLSS runs inside Streamline, so the upscaled frame was never recorded and the replay had nothing to draw from. This PR records the upscaling as its own command, `Cmd::Upscale` (wire kind 37), together with its input textures, mode, preset and camera. `darner replay` then runs it again through Streamline. It finds NVIDIA's files the same way play does: from `DARNER_STREAMLINE_DIR`, or next to the executable. Captures made before this change still replay black, so they need to be taken again. `wire::UPSCALE_OUTPUT` keeps the `capture_probe` example building on its own, and `record.rs` checks at compile time that it matches `streamline::OUTPUT`. `docs/replay.md` describes the new command. ![replay A/B: main black, this PR matches the game](replay-dlss-ab.png) *Top row main, bottom row this PR. Left: the frame the game presented. Right: `darner replay` of that capture. Cropped from 2560×1440.* ## How it was tested - Tested revision: ece1ddf for the game, the capture and the replay. 5d11bfa is the same commit plus two `if` statements collapsed for clippy (`record.rs:484`, `snap.rs:198`). - Commands and results: both builds are on origin/Main 00bd68d. They used the same switches, the same 12/02 02:48 save, a capture taken once the world was loaded, and `darner replay <capture> --loops 3`. - Changes a default: no - A/B result: one capture per side, three replay loops each. | | A (main 00bd68d) | B (this PR) | |---|---|---| | PSNR, replay vs. presented frame | 7.8 dB (all 3 loops), black | 36.3 dB (all 3 loops) | On B the replay reports "1 DLSS upscalings are evaluated again with Streamline". The three loops differ slightly from one another because DLSS carries history between frames. - Gates run on that revision. Every failure also happens on main 00bd68d, and none is in a file this PR touches: - `cargo clippy --workspace --all-targets --locked -- -D warnings`: fails on main's lints. These are `darner-loader` `relocate.rs:269/277` (reproduced on main) and existing lints in `memhook`, `pagebuf`, `host.rs`, `alias_rt`, `host/send.rs`, `host/upq.rs`, `texdiscard` and `tiles`. The PR's own files have no clippy warnings. - The same with `--all-features`: the same result. - `cargo test --workspace --locked`: everything passes except `xtask` `policy::tests::repository_passes_policy`, which also fails on main. - `cargo test -p darner-gpu --features diagnostics --locked`: 1917 passed and 2 failed: `compose::tests::bgrx_plane_selects_a_typed_view` and `shader_cache::tests::the_key_a_preload_list_is_made_under_follows_the_switches`. Both fail the same way on main. The `replay` integration test passes; `replay_big` is ignored because it needs a capture rig. - `cargo xtask policy`: fails on main's `crates/darner-gpu/d3d12ma/*.cpp/.h`. This PR adds no files of those types. - Gameplay: RTX 5090 (driver 621.14), Series X profile, 2560×1440, DLSS DLAA, frame generation off, ray tracing off. - Shader wave sizes tested: 32 lanes. - Hardware dependence: NVIDIA only. The replay machine needs Streamline and DLSS available, the same as play. - Coverage gaps: one scene; DLAA only, not the other DLSS quality modes; ray tracing off; frame generation off; no AMD/Intel run, where the path doesn't apply; `replay_big` not run. ## Checklist - [x] 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`. The PR contains no binaries or game data; the screenshot is attached here only. - [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. - Related PRs: #641 (touches `replay/play.rs`), #595 (touches `streamline.rs`). - Replaces or overlaps: none found 🤖 Generated with [Claude Code](https://claude.com/claude-code) ![image](/attachments/a3b90849-63bd-4188-8d90-b955aafd9dfd)
image.png
1.2 MiB
Captures taken with DLSS replayed black where the upscaled frame should be:
the upscale ran inside Streamline and left nothing in the capture to draw
from. The upscaling is now recorded as its own command with its inputs, and
`darner replay` evaluates it again through Streamline, finding NVIDIA's files
the same way play does (DARNER_STREAMLINE_DIR, or next to the executable).
Captures made before this still replay black; take new ones.

Same save, DLSS DLAA 2560x1440, RTX 5090: a capture replays at 7.8 dB
against the presented frame on main and at 36.3 dB with this.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'replay-dlss-upscale:EcoPro-replay-dlss-upscale'
git switch 'EcoPro-replay-dlss-upscale'

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 'EcoPro-replay-dlss-upscale'
git switch 'EcoPro-replay-dlss-upscale'
git rebase 'Main'
git switch 'Main'
git merge --ff-only 'EcoPro-replay-dlss-upscale'
git switch 'EcoPro-replay-dlss-upscale'
git rebase 'Main'
git switch 'Main'
git merge --no-ff 'EcoPro-replay-dlss-upscale'
git switch 'Main'
git merge --squash 'EcoPro-replay-dlss-upscale'
git switch 'Main'
git merge --ff-only 'EcoPro-replay-dlss-upscale'
git switch 'Main'
git merge 'EcoPro-replay-dlss-upscale'
git push origin 'Main'
Sign in to join this conversation.
No reviewers
No milestone
No project
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
TrustNo1/Darner!699
No description provided.