gpu/shadow: opt-in ReBAR GPU_UPLOAD heap with VRAM guard & WC streaming (3/4 of #51) #58
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/PastiiJay--klbf-lab!58
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-58"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Vladimir-Human on GitHub · 2026-11-26 00:43 UTC · original
Vladimir-Human:perf/split-rebar-upload→beta· +1116 −71 · 1 files · 1 commits · openSplit 3/4 of #51 cleanly on top of
beta(independent of #56, #57, and Part 4 Lazy Copy-Back).Summary of Changes (
crates/victory-gpu/src/shadow.rs)mod rebar(VICTORY_REBAR=1|2, default OFF): allocates host shadow buffers/windows inD3D12_HEAP_TYPE_GPU_UPLOADafter querying live adapter support and checking VRAM budget (1for windows only,2for windows + buffers, keepingVICTORY_CARD_BUFFERSVRAM copies preferred when carded).CARD_BYTES/WINDOW_CARD_BYTESifshared_bufferstaging allocation fails.VMOVNTDQAWC streaming helpers +_mm_sfence()ordering: addscopy_from_wc,slices_equal_wc,merge_gpu_into_title_runs,wc_sfence(), and TLSSCRATCH_WCso reads from write-combined ReBAR mappings avoid slow uncached byte reads while keeping sequential WC writes ordered.copy_jobs_wc/find_pieces_wc) and single-threadeddifferingto avoid thrashing PCIe read queues.rebar_tests::{rebar_wc_write_read_compare_roundtrip, simd_wc_and_gpu_merge_helpers_match_scalar_oracles}and#[ignore] bench_rebar(plusrebar::tests::rebar_decisions_and_concurrent_headroom_hold).Verification (
VICTORY_D3D12_DEBUG=1)cargo test -p victory-gpu-> passedcargo test -p victory-gpu --all-features-> passedcargo run -p xtask -- policy --staged->asset policy: 1 files ok(shadow.rs= 224,768 B)Related: #51, #56, #57
@HandshakeHackin on GitHub · 2026-11-26 02:58 UTC · original
On hosted native Windows I forced the diagnostics software adapter and
VICTORY_REBAR=2atd29505a. WARP reported GPU-upload heap support, allocated and mapped the 256 KiB buffer, and completed the write/read/compare round trip, including detecting the altered byte. The verification wrapper required an initialized device and an explicit support or fallback marker, since the original live test can return early. This verifies buffer contents on WARP. The physical RX 9070 XT run is still needed for PCIe behavior and timings. Windows test and resultView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.