Replay: preserve batch ordering after unbatched indirect compute #644

Open
ANDREANIADS wants to merge 1 commit from upstream-pr/644 into a-publier
ANDREANIADS commented 2026-11-27 16:01:15 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by ANDREANIADS on 2026-11-27T16:01:15Z.


An indirect compute execution whose argument buffer is not rewritten by batch_clamps currently falls through without setting written or dirty. A later clamp can then be added to an earlier batch, ahead of the compute work that produces its inputs, even across a global UAV barrier.

Treat that execution like a direct dispatch for write tracking, while preserving the command unchanged. This is already reproducible on a-publier@4eb6cfd; it addresses the ordering concern raised in #629 without depending on that PR or duplicating its plain/batched classification change.

The new synthetic command-list regression checks 16 combinations: compute/graphics producer, with/without a global wait, dispatch/mesh-dispatch arguments, and normal/careful mode. It verifies batch counts, command preservation and the placement of the second batch after the producer and wait where required. Graphics controls retain their existing batching.

Validation on Windows with the pinned Rust 1.98.1 MSVC toolchain and unchanged Cargo.lock:

  • Base plus regression only: 6 edit tests passed, the new test failed (1 batch instead of 2).
  • With the fix: cargo test --locked -p victory-gpu --features diagnostics --lib replay:: -- --nocapture: 26 passed, 0 failed, 0 ignored.
  • Applied #629 at df14958 alongside this fix: no patch conflict; the same replay suite passed 28 tests, including both PRs' regressions.
  • cargo clippy --locked -p victory-gpu --features diagnostics --tests -- -D warnings: clean.
  • cargo xtask policy: 271 files OK; git diff --check: clean.

These are command-list/unit tests; no new hardware replay, game-performance or ray-tracing result is claimed. No game data was used.

Implemented and tested with Codex.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:issue:5529568866 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/644). Originally posted by [ANDREANIADS](https://github.com/ANDREANIADS) on 2026-11-27T16:01:15Z. --- An indirect compute execution whose argument buffer is not rewritten by `batch_clamps` currently falls through without setting `written` or `dirty`. A later clamp can then be added to an earlier batch, ahead of the compute work that produces its inputs, even across a global UAV barrier. Treat that execution like a direct dispatch for write tracking, while preserving the command unchanged. This is already reproducible on `a-publier@4eb6cfd`; it addresses the ordering concern raised in #629 without depending on that PR or duplicating its plain/batched classification change. The new synthetic command-list regression checks 16 combinations: compute/graphics producer, with/without a global wait, dispatch/mesh-dispatch arguments, and normal/careful mode. It verifies batch counts, command preservation and the placement of the second batch after the producer and wait where required. Graphics controls retain their existing batching. Validation on Windows with the pinned Rust 1.98.1 MSVC toolchain and unchanged Cargo.lock: - Base plus regression only: 6 edit tests passed, the new test failed (1 batch instead of 2). - With the fix: `cargo test --locked -p victory-gpu --features diagnostics --lib replay:: -- --nocapture`: 26 passed, 0 failed, 0 ignored. - Applied #629 at `df14958` alongside this fix: no patch conflict; the same replay suite passed 28 tests, including both PRs' regressions. - `cargo clippy --locked -p victory-gpu --features diagnostics --tests -- -D warnings`: clean. - `cargo xtask policy`: 271 files OK; `git diff --check`: clean. These are command-list/unit tests; no new hardware replay, game-performance or ray-tracing result is claimed. No game data was used. Implemented and tested with Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/644:upstream-pr/644'
git switch 'upstream-pr/644'

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 'a-publier'
git merge --no-ff 'upstream-pr/644'
git switch 'upstream-pr/644'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'upstream-pr/644'
git switch 'upstream-pr/644'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'upstream-pr/644'
git switch 'a-publier'
git merge --squash 'upstream-pr/644'
git switch 'a-publier'
git merge --ff-only 'upstream-pr/644'
git switch 'a-publier'
git merge 'upstream-pr/644'
git push origin 'a-publier'
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
Belobug/VIctory-Belobug-AMD!644
No description provided.