Skip to content

Replay: report full restored-resource output hashes - #3932

Open
john-9474 wants to merge 1 commit into
trustno1-coder:mainfrom
john-9474:codex/replay-output-hashes
Open

john-9474 wants to merge 1 commit into
trustno1-coder:mainfrom
john-9474:codex/replay-output-hashes

Conversation

@john-9474

Copy link
Copy Markdown
Contributor

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-actions github-actions Bot added the pr-diagnostics Pull request: adds logging, counters or tools label Nov 30, 2026
@github-actions github-actions Bot changed the title [pr-diagnostics] Replay: report full restored-resource output hashes Replay: report full restored-resource output hashes Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-diagnostics Pull request: adds logging, counters or tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant