Fix resource-state and binding errors in the replay fixture #5

Merged
gomeaw merged 2 commits from upstream-pr/5 into main 2026-11-26 08:17:50 +00:00
gomeaw commented 2026-11-25 23:04:51 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by gomeaw on 2026-11-25T23:04:51Z.


Summary

Refs #3. The Direct3D 12 debug errors 538 and 1003 reproduce on WARP as well as on the reported RTX 3080 Ti. Both come from the synthetic frame commands that the recorder captures.

  • Transition the shared buffer from shader resource to copy destination before copying the compute result into it.
  • Declare the clamp's root SRV data volatile. The same argument buffer can return to a writable state while still bound to the clamp.
  • Check debug-layer errors separately for the source frame and for each replay whose output must match.

Verification

The baseline run reproduced IDs 538 and 1003 during unchanged replay. The patched Windows WARP run removed both errors and passed the byte-for-byte image and buffer comparisons.

An independent Windows run on an RX 6950 XT reproduced 11 reports of ID 538 and 22 of ID 1003 on 0a43566. Both groups disappeared on 631aadc with the same picture hash. Cross-vendor replay report

The --one-submit experiment still reports ID 527. Combining submissions removes the implicit resource-state decay at their original boundaries. The test still reports that mismatch and allows it only for that experiment. This PR is scoped to the synthetic frame, with all inputs generated in code.

AI-assisted with Codex.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6615561557 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/5). Originally posted by [gomeaw](https://github.com/gomeaw) on 2026-11-25T23:04:51Z. --- ## Summary Refs #3. The Direct3D 12 debug errors 538 and 1003 reproduce on WARP as well as on the reported RTX 3080 Ti. Both come from the synthetic frame commands that the recorder captures. - Transition the shared buffer from shader resource to copy destination before copying the compute result into it. - Declare the clamp's root SRV data volatile. The same argument buffer can return to a writable state while still bound to the clamp. - Check debug-layer errors separately for the source frame and for each replay whose output must match. ## Verification The [baseline run](https://github.com/gomeaw/VIctory-7900XTX/actions/runs/45716748778/job/139564641905) reproduced IDs 538 and 1003 during unchanged replay. The [patched Windows WARP run](https://github.com/gomeaw/VIctory-7900XTX/actions/runs/45717939018/job/139568703643) removed both errors and passed the byte-for-byte image and buffer comparisons. An independent Windows run on an RX 6950 XT reproduced 11 reports of ID 538 and 22 of ID 1003 on `0a43566`. Both groups disappeared on `631aadc` with the same picture hash. [Cross-vendor replay report](https://github.com/avatarmanz/VIctory-7900XTX/issues/3#issuecomment-7178054078) The `--one-submit` experiment still reports ID 527. Combining submissions removes the implicit resource-state decay at their original boundaries. The test still reports that mismatch and allows it only for that experiment. This PR is scoped to the synthetic frame, with all inputs generated in code. AI-assisted with Codex.
Adika713 commented 2026-11-25 23:47:24 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by Adika713 on 2026-11-25T23:47:24Z.


Verified PR #5 at head 631aadc on this host: AMD Radeon RX 6950 XT (RDNA2), Ryzen 5 3600, 32 GB RAM, Windows 11, rustc/cargo 1.98.1.

Command:

$env:VICTORY_TEST_D3D_DEBUG='1'
cargo test --locked --release -p victory-gpu --features diagnostics --test replay -- --test-threads=1 --nocapture
  • base 0a43566: 1 passed, 0 failed; debug notes 11 × ID 538, 22 × ID 1003, 3 × ID 527 (one-submission variant)
  • PR #5 631aadc: 1 passed, 0 failed; only 3 × ID 527 remains, and it is still printed in the one-submission variant. No ID 538 or ID 1003 notes.

The replay picture prefix is 497b4592b929fe7d before and after, with byte-identical pictures in every variant. The remaining 527 is not hidden: the test still reports it and only exempts that one note from the assertion in the one-submission experiment.

The synthetic replay test uses no game files. No game data was posted or committed.

AI-assisted: OpenCode, model Big Pickle.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7178053318 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/5#issuecomment-7178053318). Originally posted by [Adika713](https://github.com/Adika713) on 2026-11-25T23:47:24Z. --- Verified PR #5 at head `631aadc` on this host: AMD Radeon RX 6950 XT (RDNA2), Ryzen 5 3600, 32 GB RAM, Windows 11, rustc/cargo 1.98.1. Command: ```powershell $env:VICTORY_TEST_D3D_DEBUG='1' cargo test --locked --release -p victory-gpu --features diagnostics --test replay -- --test-threads=1 --nocapture ``` - base `0a43566`: 1 passed, 0 failed; debug notes `11 × ID 538`, `22 × ID 1003`, `3 × ID 527` (one-submission variant) - PR #5 `631aadc`: 1 passed, 0 failed; only `3 × ID 527` remains, and it is still printed in the one-submission variant. No ID 538 or ID 1003 notes. The replay picture prefix is `497b4592b929fe7d` before and after, with byte-identical pictures in every variant. The remaining 527 is not hidden: the test still reports it and only exempts that one note from the assertion in the one-submission experiment. The synthetic replay test uses no game files. No game data was posted or committed. AI-assisted: OpenCode, model Big Pickle.
spook40 commented 2026-11-26 00:02:53 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by spook40 on 2026-11-26T00:02:53Z.


Tested PR #5 on an NVIDIA GeForce RTX 3060 Ti (8 GB VRAM) (pr-5 branch):

  • Replay test: cargo test --locked -p victory-gpu --features diagnostics replay -- --nocapture passed (a_frame_is_recorded_and_replayed matched BLAKE3 4aaec8b6026567d0 with 0 left as the card wrote them in this run).
  • Big replay fixture: cargo test --locked -p victory-gpu --features diagnostics --test replay_big -- --nocapture showed a_frame_of_a_titles_size as ignored as expected (0 passed; 0 failed; 1 ignored).

AI-assisted with Gemini.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7178337129 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/5#issuecomment-7178337129). Originally posted by [spook40](https://github.com/spook40) on 2026-11-26T00:02:53Z. --- Tested PR #5 on an NVIDIA GeForce RTX 3060 Ti (8 GB VRAM) (`pr-5` branch): * **Replay test:** `cargo test --locked -p victory-gpu --features diagnostics replay -- --nocapture` passed (`a_frame_is_recorded_and_replayed` matched BLAKE3 `4aaec8b6026567d0` with `0 left as the card wrote them in this run`). * **Big replay fixture:** `cargo test --locked -p victory-gpu --features diagnostics --test replay_big -- --nocapture` showed `a_frame_of_a_titles_size` as ignored as expected (`0 passed; 0 failed; 1 ignored`). AI-assisted with Gemini.
avatarmanz commented 2026-11-26 07:54:58 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by avatarmanz on 2026-11-26T07:54:58Z.


Merged into main in the next push (tests pass); thanks.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7185975209 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/5#issuecomment-7185975209). Originally posted by [avatarmanz](https://github.com/avatarmanz) on 2026-11-26T07:54:58Z. --- Merged into main in the next push (tests pass); thanks.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
avatarmanz/VIctory-7900XTX!5
No description provided.