Replay: report full restored-resource output hashes #3932

Open
github-bot wants to merge 1 commit from github-bot/gh-3932 into main AGit
Owner

@⁠john-9474 on GitHub · 2026-11-30 12:03 UTC · original
john-9474:codex/replay-output-hashes → main · +274 −4 · 5 files · 1 commits · open

An identical presented picture can conceal changed intermediate buffers, which makes picture-only replay comparisons insufficient when reviewing a skipped compute pass. Add opt-in victory replay --check-outputs: each loop reports a complete BLAKE3 digest for every restored buffer or texture subresource, with recorded resource/subresource IDs and covered byte counts. The text report counts distinct complete output sets; differences are diagnostic information, not automatic correctness failures.

The reader is allocated only when requested, and shared replay preparation covers both normal and interleaved --compare/alternate-shader paths. Empty coverage, incomplete readable coverage, and --no-restore are rejected. Texture layout padding is zero-initialised and included in the documented byte count. The readback copies restore texture states and run after the recorded GPU timestamps; memory pressure and clocks can still affect timings, so correctness and performance runs should remain separate.

The asset-free synthetic fixture adds a 260-byte hidden compute output that is not consumed by the presented image. It checks full-buffer/tail hashes, an independently constructed padded texture hash, repeatability, empty coverage, default-off reports, and same-picture/different-buffer detection. Interleaved comparisons cover both equal outputs and an omitted hidden dispatch. Pure tests cover the option guard and readable report metadata.

Validated on Windows with an NVIDIA adapter:

  • cargo test --locked --profile diag -p victory-gpu --features diagnostics --lib --test replay --no-run; a final repeat confirmed the source fingerprint after the comparison assertions were added.
  • a_frame_is_recorded_and_replayed --exact --nocapture --test-threads=1 passed in two fresh processes, with the D3D12 debug layer off and on. Each checked loop covered 12 resources/13 parts/258,708 copy-layout bytes; normal and interleaved comparisons checked exact repetition, and omitting the hidden dispatch preserved the picture while changing its buffer digest.
  • All 4 replay::play::tests:: pure tests passed.
  • cargo check --locked --profile diag -p victory --features diagnostics, staged asset policy (5 files), and git diff --cached --check passed.

The new output-readback stages had zero reported D3D12 errors. The existing fixture still reports earlier/frame errors 538/1003 and one-submission 527; those are not presented as new readback errors or as fixed here. This is focused replay validation, with no full-suite, gameplay or FPS claim. No capture files or title-derived reference data are included.

Overlap was checked against existing open/merged PRs for restored-output hashes and output checking. This does not include the selective placed-heap relocation/fixture correction in #3899, integer UAV-clear recording in #2751, or a new replay frontend.

**@⁠john-9474** on GitHub · 2026-11-30 12:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3932) `john-9474:codex/replay-output-hashes` → `main` · +274 −4 · 5 files · 1 commits · open An identical presented picture can conceal changed intermediate buffers, which makes picture-only replay comparisons insufficient when reviewing a skipped compute pass. Add opt-in `victory replay --check-outputs`: each loop reports a complete BLAKE3 digest for every restored buffer or texture subresource, with recorded resource/subresource IDs and covered byte counts. The text report counts distinct complete output sets; differences are diagnostic information, not automatic correctness failures. The reader is allocated only when requested, and shared replay preparation covers both normal and interleaved `--compare`/alternate-shader paths. Empty coverage, incomplete readable coverage, and `--no-restore` are rejected. Texture layout padding is zero-initialised and included in the documented byte count. The readback copies restore texture states and run after the recorded GPU timestamps; memory pressure and clocks can still affect timings, so correctness and performance runs should remain separate. The asset-free synthetic fixture adds a 260-byte hidden compute output that is not consumed by the presented image. It checks full-buffer/tail hashes, an independently constructed padded texture hash, repeatability, empty coverage, default-off reports, and same-picture/different-buffer detection. Interleaved comparisons cover both equal outputs and an omitted hidden dispatch. Pure tests cover the option guard and readable report metadata. Validated on Windows with an NVIDIA adapter: - `cargo test --locked --profile diag -p victory-gpu --features diagnostics --lib --test replay --no-run`; a final repeat confirmed the source fingerprint after the comparison assertions were added. - `a_frame_is_recorded_and_replayed --exact --nocapture --test-threads=1` passed in two fresh processes, with the D3D12 debug layer off and on. Each checked loop covered 12 resources/13 parts/258,708 copy-layout bytes; normal and interleaved comparisons checked exact repetition, and omitting the hidden dispatch preserved the picture while changing its buffer digest. - All 4 `replay::play::tests::` pure tests passed. - `cargo check --locked --profile diag -p victory --features diagnostics`, staged asset policy (5 files), and `git diff --cached --check` passed. The new output-readback stages had zero reported D3D12 errors. The existing fixture still reports earlier/frame errors 538/1003 and one-submission 527; those are not presented as new readback errors or as fixed here. This is focused replay validation, with no full-suite, gameplay or FPS claim. No capture files or title-derived reference data are included. Overlap was checked against existing open/merged PRs for restored-output hashes and output checking. This does not include the selective placed-heap relocation/fixture correction in #3899, integer UAV-clear recording in #2751, or a new replay frontend.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 12:07:53 +00:00
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/3932/head:github-bot/gh-3932'
git switch 'github-bot/gh-3932'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3932'
git switch 'github-bot/gh-3932'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3932'
git switch 'github-bot/gh-3932'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3932'
git switch 'main'
git merge --squash 'github-bot/gh-3932'
git switch 'main'
git merge --ff-only 'github-bot/gh-3932'
git switch 'main'
git merge 'github-bot/gh-3932'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
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
github/trustno1-coder--VIctory-NVIDIA!3932
No description provided.