perf(gpu): coalesce direct barriers, skip no-wait join drains, and remove pipeline-name lock contention #415

Merged
Androtim merged 3 commits from upstream-pr/415 into main 2026-12-04 01:59:40 +00:00
Androtim commented 2026-12-04 00:55:23 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-04T00:55:23Z.


Summary

Ports verified GPL-3.0 CPU/GPU frame-time optimizations from \ReTerryDavis/ReVIctory\ and \lobomfz/VIctory-xmem, audited against MiniVI's existing 8 GB VRAM eviction, \STREAM_BOUND, and \PLACED_FILL_CARD\ paths:

Ported Changes

  1. Skip no-wait \JOIN_SEND\ GPU drains (\ReTerryDavis/ReVIctory, \GPL-3.0, commit \90eeea4a9ddd03dcb7a797b07094700e606efee):
    • Tracks whether a GPU-satisfied \Job::Value\ / \Job::Wait\ or cross-queue borrow separates joined submission parts in \crates/victory-gpu/src/queue/behind.rs.
    • Preserves full part boundaries for \atch.refresh_front*, while filtering \cuts\ (in both direct submit and \Handoff\ split-send paths in \crates/victory-gpu/src/host.rs) to only \waited_parts, eliminating redundant GPU joint barriers between consecutive parts on the same queue with no GPU wait between them.
  2. Coalesce direct resource barriers (\ReTerryDavis/ReVIctory, \GPL-3.0, commit \90eeea4a9ddd03dcb7a797b07094700e606efee):
    • Adds \crates/victory-gpu/src/host/rec.rs\ (\Rec\ wrapper around \ID3D12GraphicsCommandList\ with \Deref\ auto-flush, UAV barrier deduplication, and safe transition/round-trip folding; \VICTORY_JOIN_BARRIERS\ and \VICTORY_JOIN_BARRIERS_MORE\ enabled by default, =0\ disables).
    • Routes direct \HostList\ \ResourceBarrier\ calls in \host.rs\ and \list.rs\ through \Rec::barriers, with an explicit \self.list.flush()\ before \ID3D12GraphicsCommandList2::WriteBufferImmediate\ in \zero_card_budget\ so the \COMMON -> COPY_DEST\ transition is emitted before the immediate write.
  3. Remove pipeline-name lock contention (\lobomfz/VIctory-xmem, \GPL-3.0, commit \
<!-- greyfinch-sync:Androtim/MiniVI:issue:5637963300 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/415). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-04T00:55:23Z. --- ## Summary Ports verified GPL-3.0 CPU/GPU frame-time optimizations from \ReTerryDavis/ReVIctory\ and \lobomfz/VIctory-xmem\, audited against MiniVI's existing 8 GB VRAM eviction, \STREAM_BOUND\, and \PLACED_FILL_CARD\ paths: ### Ported Changes 1. **Skip no-wait \JOIN_SEND\ GPU drains** (\ReTerryDavis/ReVIctory\, \GPL-3.0\, commit \90eeea4a9ddd03dcb7a797b07094700e606efee\): - Tracks whether a GPU-satisfied \Job::Value\ / \Job::Wait\ or cross-queue borrow separates joined submission parts in \crates/victory-gpu/src/queue/behind.rs\. - Preserves full part boundaries for \atch.refresh_front*\, while filtering \cuts\ (in both direct submit and \Handoff\ split-send paths in \crates/victory-gpu/src/host.rs\) to only \waited_parts\, eliminating redundant GPU joint barriers between consecutive parts on the same queue with no GPU wait between them. 2. **Coalesce direct resource barriers** (\ReTerryDavis/ReVIctory\, \GPL-3.0\, commit \90eeea4a9ddd03dcb7a797b07094700e606efee\): - Adds \crates/victory-gpu/src/host/rec.rs\ (\Rec\ wrapper around \ID3D12GraphicsCommandList\ with \Deref\ auto-flush, UAV barrier deduplication, and safe transition/round-trip folding; \VICTORY_JOIN_BARRIERS\ and \VICTORY_JOIN_BARRIERS_MORE\ enabled by default, \=0\ disables). - Routes direct \HostList\ \ResourceBarrier\ calls in \host.rs\ and \list.rs\ through \Rec::barriers\, with an explicit \self.list.flush()\ before \ID3D12GraphicsCommandList2::WriteBufferImmediate\ in \zero_card_budget\ so the \COMMON -> COPY_DEST\ transition is emitted before the immediate write. 3. **Remove pipeline-name lock contention** (\lobomfz/VIctory-xmem\, \GPL-3.0\, commit \
Androtim commented 2026-12-04 01:01:54 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-04T01:01:54Z.


Triage (c27416dd, CI queued):

  • Clean, 100% title-neutral 3-part CPU/GPU perf port (+782/-40, 6 files, zero opt-in toggles — VICTORY_JOIN_BARRIERS & VICTORY_JOIN_BARRIERS_MORE are default-on =0 kill-switches): no-wait JOIN_SEND drain skip (queue/behind.rs, host.rs), Rec direct barrier coalescing (host/rec.rs), and exact-name pipeline-library lock (name_gate.rs from lobomfz/VIctory-xmem #335).
  • Holding auto-merge for green CI + Gate 2 Audit (#282) (specifically checking Rec::barriers auto-flush before every raw command-list call / WriteBufferImmediate / UAV hazard, waited_parts boundary soundness, and name_gate panic/unwind cleanup) + Gate 3 plain---release 1440p/4K A/B + --features diagnostics visual check.
  • Overlap note: touches crates/victory-gpu/src/host.rs (shared with #413 & #414) — merge sequentially.
<!-- greyfinch-sync:Androtim/MiniVI:comment:7397406314 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/415#issuecomment-7397406314). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-04T01:01:54Z. --- Triage (`c27416dd`, CI queued): - Clean, 100% title-neutral 3-part CPU/GPU perf port (`+782/-40`, 6 files, **zero opt-in toggles** — `VICTORY_JOIN_BARRIERS` & `VICTORY_JOIN_BARRIERS_MORE` are default-on `=0` kill-switches): no-wait `JOIN_SEND` drain skip (`queue/behind.rs`, `host.rs`), `Rec` direct barrier coalescing (`host/rec.rs`), and exact-name pipeline-library lock (`name_gate.rs` from `lobomfz/VIctory-xmem` `#335`). - Holding auto-merge for green CI + **Gate 2 Audit (`#282`)** (specifically checking `Rec::barriers` auto-flush before every raw command-list call / `WriteBufferImmediate` / UAV hazard, `waited_parts` boundary soundness, and `name_gate` panic/unwind cleanup) + **Gate 3 plain-`--release` 1440p/4K A/B + `--features diagnostics` visual check**. - *Overlap note:* touches `crates/victory-gpu/src/host.rs` (shared with `#413` & `#414`) — merge sequentially.
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
Androtim/MiniVI!415
No description provided.