WIP: Opt-in isolated outdoor benchmark harness: pose checkpoints, hidden desktop, guarded runs, analysis #596

Draft
deama wants to merge 15 commits from deama/Darner:pr/3-benchmark-harness into Main
First-time contributor

Not run in the game on Darner. Ported from a local VIctory-NVIDIA branch (before the rename). The notes below describe that branch.

Contributor role (optional)

  • Fluxer ID:

What it changes

  • The problem on main: no repeatable way to compare two builds in the same outdoor spot without walking there by hand each run.

Two commits:

  • Restore isolated outdoor benchmarks on the rewritten renderer

  • Flush PCIe samples before owned benchmark teardown

  • DARNER_CHECKPOINT_DIR (off unless set): a pose checkpoint mailbox for the one verified Series build. It captures and restores the player's position, orientation and orbit camera through the title's own setters, and can hold the view still. Unknown builds fail closed. Normal play installs no hooks. These are pose checkpoints, not save states (docs/benchmark-checkpoints.md). All state files live outside the repository.

  • scripts/benchmark.ps1, benchmark-desktop.ps1 and checkpoint.ps1: guarded runs on a desktop that is never shown, with audio muted (DARNER_BENCH_BACKGROUND). They refuse to overlap a running Darner, use a watchdog, optionally collect PCIe samples, and write results outside the tree. analyze-benchmark.py and benchmark_validity.py summarise them.

  • Optional frame captures in plain builds via a frame-capture feature (DARNER_CAPTURE_FULL, _SPARSE, _TRIGGER) without per-draw diagnostic tracing.

  • The PCIe sampler flushes before an owned run is torn down.

How it was tested

  • Tested revision: 9ec57d410d
  • Commands and results: on 9ec57d410d (this branch's head), Windows 10 22H2 with its built-in Direct3D 12 (no Shader Model 6.6), Rust 1.98.1:
    • cargo clippy --workspace --all-targets --locked -- -D warnings: passed
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passed
    • cargo --config 'profile.test.package.darner-shader.opt-level=3' test --workspace --locked --no-fail-fast (the opt-level only speeds up darner-shader's exhaustive float tests): 66 failed, all of which fail on unmodified main (c8258f9556) on this PC too (darner-shader tests that need Shader Model 6.6).
    • darner-gpu's test process aborts at the first test that needs Shader Model 6.6, on main too, so its tests were run in batches that survive the abort and compared one by one with main (main: 1658 pass, 8 fail, 139 need Shader Model 6.6, 81 ignored): no test that passes on main fails here, none removed; 11 new tests: 11 pass.
    • cargo xtask policy: ok on the PR 8 head, which contains this branch.
    • Not run: tests that need Shader Model 6.6 or a GPU, and the strict-WARP tests behind the diagnostics/gpu-validation features. The script tests (scripts/test-benchmark-guard.ps1, scripts/test_analyze_benchmark.py) were not run on Darner.
  • Changes a default: no. Everything is opt-in.
  • A/B result: not applicable (no default changed). The switches were checked by the unit tests above only.
  • Gates run on that revision: see above.
  • Gameplay: not run on Darner.
  • Hardware dependence: the pose hook is tied to one known executable hash and refuses others.
  • Coverage gaps: checkpoint capture/restore, the hidden desktop and the scripts were not run against the game on Darner.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only). Not run in the game on Darner.
  • This PR contains one change based on main (the benchmark harness). It is stacked on the PR below.
  • The diff follows docs/asset-policy.md: no game data; scripts write outside the repository.
  • I recorded this PR's dependencies below.
    • Depends on #594 (stacked: this branch contains those commits; the new frame-capture feature is declared next to the gpu-validation feature that PR adds in the same Cargo.toml files)

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #550 (FSR activation in benchmark summaries, for the existing bench script), #235 (pipeline-key checkpoints, a different kind of checkpoint).
  • Replaces or overlaps: none found
**Not run in the game on Darner.** Ported from a local VIctory-NVIDIA branch (before the rename). The notes below describe that branch. ## Contributor role (optional) - Fluxer ID: ## What it changes - The problem on main: no repeatable way to compare two builds in the same outdoor spot without walking there by hand each run. Two commits: - Restore isolated outdoor benchmarks on the rewritten renderer - Flush PCIe samples before owned benchmark teardown - `DARNER_CHECKPOINT_DIR` (off unless set): a pose checkpoint mailbox for the one verified Series build. It captures and restores the player's position, orientation and orbit camera through the title's own setters, and can hold the view still. Unknown builds fail closed. Normal play installs no hooks. These are pose checkpoints, not save states (`docs/benchmark-checkpoints.md`). All state files live outside the repository. - `scripts/benchmark.ps1`, `benchmark-desktop.ps1` and `checkpoint.ps1`: guarded runs on a desktop that is never shown, with audio muted (`DARNER_BENCH_BACKGROUND`). They refuse to overlap a running Darner, use a watchdog, optionally collect PCIe samples, and write results outside the tree. `analyze-benchmark.py` and `benchmark_validity.py` summarise them. - Optional frame captures in plain builds via a `frame-capture` feature (`DARNER_CAPTURE_FULL`, `_SPARSE`, `_TRIGGER`) without per-draw diagnostic tracing. - The PCIe sampler flushes before an owned run is torn down. ## How it was tested - Tested revision: `9ec57d410d` - Commands and results: on `9ec57d410d` (this branch's head), Windows 10 22H2 with its built-in Direct3D 12 (no Shader Model 6.6), Rust 1.98.1: - `cargo clippy --workspace --all-targets --locked -- -D warnings`: passed - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: passed - `cargo --config 'profile.test.package.darner-shader.opt-level=3' test --workspace --locked --no-fail-fast` (the opt-level only speeds up darner-shader's exhaustive float tests): 66 failed, all of which fail on unmodified `main` (c8258f9556) on this PC too (darner-shader tests that need Shader Model 6.6). - darner-gpu's test process aborts at the first test that needs Shader Model 6.6, on `main` too, so its tests were run in batches that survive the abort and compared one by one with `main` (`main`: 1658 pass, 8 fail, 139 need Shader Model 6.6, 81 ignored): no test that passes on `main` fails here, none removed; 11 new tests: 11 pass. - `cargo xtask policy`: ok on the PR 8 head, which contains this branch. - Not run: tests that need Shader Model 6.6 or a GPU, and the strict-WARP tests behind the diagnostics/gpu-validation features. The script tests (`scripts/test-benchmark-guard.ps1`, `scripts/test_analyze_benchmark.py`) were not run on Darner. - Changes a default: no. Everything is opt-in. - A/B result: not applicable (no default changed). The switches were checked by the unit tests above only. - Gates run on that revision: see above. - Gameplay: not run on Darner. - Hardware dependence: the pose hook is tied to one known executable hash and refuses others. - Coverage gaps: checkpoint capture/restore, the hidden desktop and the scripts were not run against the game on Darner. ## Checklist - [ ] I ran this change in the game, or say below why it can't be (docs, tests only). **Not run in the game on Darner.** - [x] This PR contains one change based on `main` (the benchmark harness). It is stacked on the PR below. - [x] The diff follows `docs/asset-policy.md`: no game data; scripts write outside the repository. - [x] I recorded this PR's dependencies below. - Depends on #594 (stacked: this branch contains those commits; the new `frame-capture` feature is declared next to the `gpu-validation` feature that PR adds in the same Cargo.toml files) ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #550 (FSR activation in benchmark summaries, for the existing bench script), #235 (pipeline-key checkpoints, a different kind of checkpoint). - Replaces or overlaps: none found
Ported to Darner from VIctory-NVIDIA b1443849.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refuse unsupported strict/software requests, retain bounded validation history, and guard host queue submissions. Preserve removal reports in a dedicated module. Add software-only regressions and optional link-time Agility declarations for tests.

Ported to Darner from VIctory-NVIDIA 3f156266.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rebuild per-recording caches at both cut sites while retaining descriptor ownership. The current-renderer WARP regression read recycled 0xdeadbeef data before the fix and the expected constants after it; same-part and internal-pass reuse remain intact.

Ported to Darner from VIctory-NVIDIA 615e070f.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep current size classes and retention accounting while checking rounding and CPU-visible limits. Cap mapped-VRAM staging and avoid oversized spare reuse. Optional one-pass predictions outside the limit fall back to ordinary staging; six focused CPU checks pass.

Ported to Darner from VIctory-NVIDIA f7f0f1ec.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reconcile the legacy transition repair with the current memory wrappers and enhanced barriers. Strict WARP catches the previous invalid COPY_DEST-to-CBV use before submission. Constant, texture-source, cross-buffer and overlapping-copy regressions pass with legacy and enhanced barriers.

Ported to Darner from VIctory-NVIDIA 0e7a5c71.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Route relay fetches, card fetches and settling through the existing checked host wait. CPU regressions reject failed waits, incomplete fences and device-removal sentinels; a strict WARP copy/readback check still passes.

Ported to Darner from VIctory-NVIDIA bb4da85e.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The current compiled root signature omitted DATA_VOLATILE. A software regression checks that contract and reads both successive synthetic depth values through the same bound descriptor.

Ported to Darner from VIctory-NVIDIA 838504a0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep readonly depth plus shader-read states legal across views and avoid narrowing an already-compatible state. Preserve alias/read-watch observers and exact transitions for writes and COMMON. The WARP fixture goes from two tracked transitions to none; it and the CPU state checks pass. No game FPS result asserted.

Ported to Darner from VIctory-NVIDIA a04c61e1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first guarded rework run stopped on 1024 stored cache-miss warnings rather than a GPU error. Filter only nonfatal severities in strict storage while retaining bounded, persistent errors and corruption. Software tests cover 6144 nonfatal messages followed by both fatal severities, real overflow, repeated refusal and concurrent reporting.

Ported to Darner from VIctory-NVIDIA 651f2399.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ported to Darner from VIctory-NVIDIA 3c6511be.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ported to Darner from VIctory-NVIDIA fae572a0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ported to Darner from VIctory-NVIDIA eaee9c79.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ported to Darner from VIctory-NVIDIA af64880d.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reuse the previously verified pose implementation and background desktop/audio setup. Restore optional frame captures and their output policy, guarded process supervision, and benchmark analysis. Keep normal play opt-in and all artifacts outside source. Pose, capture, desktop-refusal, analyzer and CPU-only watchdog checks pass.

Ported to Darner from VIctory-NVIDIA 90df996f.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ported to Darner from VIctory-NVIDIA 0493d6cb.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
TrustNo1 changed title from WIP: [pr-diagnostics] Opt-in isolated outdoor benchmark harness: pose checkpoints, hidden desktop, guarded runs, analysis to WIP: Opt-in isolated outdoor benchmark harness: pose checkpoints, hidden desktop, guarded runs, analysis 2026-12-06 03:26:42 +00:00
This pull request has changes conflicting with the target branch.
  • crates/darner-game/src/lib.rs
  • crates/darner-gpu/src/gpu_owned.rs
  • crates/darner-gpu/src/host.rs
  • crates/darner-gpu/src/host/bus.rs
  • crates/darner-gpu/src/host/upq.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'pr/3-benchmark-harness:deama-pr/3-benchmark-harness'
git switch 'deama-pr/3-benchmark-harness'

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 'deama-pr/3-benchmark-harness'
git switch 'deama-pr/3-benchmark-harness'
git rebase 'Main'
git switch 'Main'
git merge --ff-only 'deama-pr/3-benchmark-harness'
git switch 'deama-pr/3-benchmark-harness'
git rebase 'Main'
git switch 'Main'
git merge --no-ff 'deama-pr/3-benchmark-harness'
git switch 'Main'
git merge --squash 'deama-pr/3-benchmark-harness'
git switch 'Main'
git merge --ff-only 'deama-pr/3-benchmark-harness'
git switch 'Main'
git merge 'deama-pr/3-benchmark-harness'
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!596
No description provided.