gpu: scope card-compare and card-steps prelude UAV barriers to touched buffers #2606

Manually merged
github merged 1 commit from github-bot/gh-2606 into main 2026-11-30 14:16:31 +00:00 AGit
Owner

@⁠nidea1 on GitHub · 2026-11-29 14:54 UTC · original
nidea1:perf/scoped-card-check-and-steps-uav-barriers → main · +313 −28 · 2 files · 1 commits · merged 2026-11-30 14:12 UTC

Summary

Replaces the remaining host-emitted global (NULL) UAV barriers in Host::check (card-side shader-write compare prelude) and card_steps::record (GPU-side buffer fill/copy replay) with deduplicated per-resource UAV barriers covering only the touched buffers:

  • crates/victory-gpu/src/host.rs:
    • Adds COM-safe borrowed-pointer uav_barrier() and scoped_uav_barriers() helpers (using ManuallyDrop / transmute_copy without touching COM refcounts).
    • Replaces the global NULL UAV barrier before CARD_COMPARE in Host::check (~325 passes/frame) with scoped UAV barriers over {r.shadow.buffer, before, shared.differs.0} (deduplicated by raw pointer).
  • crates/victory-gpu/src/host/card_steps.rs:
    • Replaces the global NULL UAV barrier at level == 0 in record() (5,900+ fills/frame) with deduplicated scoped UAV barriers covering every buffer touched across all 0..levels passes.

Verification

  • cargo test -p victory-gpu --lib -- card_steps host::batch:: host::tests::: 119 passed, 0 failed (including new real-GPU RTX 3060 Ti tests exercising heavy 256-group x 64-thread compute UAV writes into 1-ECL CARD_COMPARE and 2-ECL multilevel card_steps with 0 D3D12 debug errors).
  • cargo clippy -p victory-gpu --tests: 0 warnings in touched lines.
  • cargo xtask policy --staged: passed.
  • Live VICTORY_BARRIER_STATS=1 on RTX 3060 Ti: shifts ~820–1,650 barriers/frame from global UAV to per-resource UAV, leaving host-emitted global UAV barriers near zero while title UAV waits remain intact.
**@⁠nidea1** on GitHub · 2026-11-29 14:54 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2606) `nidea1:perf/scoped-card-check-and-steps-uav-barriers` → `main` · +313 −28 · 2 files · 1 commits · merged 2026-11-30 14:12 UTC ## Summary Replaces the remaining host-emitted global (`NULL`) UAV barriers in `Host::check` (card-side shader-write compare prelude) and `card_steps::record` (GPU-side buffer fill/copy replay) with deduplicated per-resource UAV barriers covering only the touched buffers: - **`crates/victory-gpu/src/host.rs`**: - Adds COM-safe borrowed-pointer `uav_barrier()` and `scoped_uav_barriers()` helpers (using `ManuallyDrop` / `transmute_copy` without touching COM refcounts). - Replaces the global `NULL` UAV barrier before `CARD_COMPARE` in `Host::check` (~325 passes/frame) with scoped UAV barriers over `{r.shadow.buffer, before, shared.differs.0}` (deduplicated by raw pointer). - **`crates/victory-gpu/src/host/card_steps.rs`**: - Replaces the global `NULL` UAV barrier at `level == 0` in `record()` (5,900+ fills/frame) with deduplicated scoped UAV barriers covering every buffer touched across all `0..levels` passes. ## Verification - `cargo test -p victory-gpu --lib -- card_steps host::batch:: host::tests::`: 119 passed, 0 failed (including new real-GPU RTX 3060 Ti tests exercising heavy 256-group x 64-thread compute UAV writes into 1-ECL `CARD_COMPARE` and 2-ECL multilevel `card_steps` with 0 D3D12 debug errors). - `cargo clippy -p victory-gpu --tests`: 0 warnings in touched lines. - `cargo xtask policy --staged`: passed. - Live `VICTORY_BARRIER_STATS=1` on RTX 3060 Ti: shifts ~820–1,650 barriers/frame from `global UAV` to `per-resource UAV`, leaving host-emitted global UAV barriers near zero while title UAV waits remain intact.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 14:56:21 +00:00
github manually merged commit 3db5045806 into main 2026-11-30 14:16:31 +00:00
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!2606
No description provided.