queue, host: exclude skipped PageRange runs in land_before_remap #3277
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3277"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Maverick0351a on 2026-11-29T21:15:18Z.
Problem
In
copy_page_mappings(crates/victory-gpu/src/queue.rs:1723-1731), eachPageBatchstarts atb.destinationand containsPageRangeentries wherer.kind == 3meansleft as they are(D3D12_TILE_RANGE_FLAG_SKIP, which simply advancesat += lenwithout changing page mappings).Previously:
copy_page_mappingssummedu64::from(r.count) * PAGEacross all ranges in the batch (includingr.kind == 3skip ranges) and calledcrate::host::land_before_remap(b.destination, len)over the entire span fromb.destination. When the title skipped across a tiled heap fromb.destinationto remap a single streamed texture tile,[b.destination, b.destination + len)spanned the entire skipped prefix of the heap and falsely overlapped unrelated UAVs inline.written.land_before_remap(crates/victory-gpu/src/host.rs:5533and5543),pendingcheckedline.settling || touches(&line.written, from, to). Becauserelay_landkeeps the write ranges of flights currently being landed insideline.writtenuntilrelay_landfinishes and clearswrittenandsettlingunder the same lock (host.rs:8101),touches(&line.written, from, to)already covers flights currently being landed. Checkingline.settling ||causedland_before_remapto block whenever the relay thread was landing any flight (~29 ms/frame) even whentouches(&line.written, from, to)wasfalse.In dense streaming scenes (such as the Leonida Keys mangrove channel and island compound at 6,444-8,073 draws/frame), this caused 0.8-1.1 synchronous GPU pipeline drains per frame costing 11.3-12.4 ms/frame (
settled for: a synchronous submission or present 1.2 (pages remapped under flights' writes 1.1)).Fix
remapped_spans(destination, ranges)incrates/victory-gpu/src/queue.rsto coalesce adjacentr.kind <= 2ranges and skipr.kind == 3untouched ranges before callingland_before_remap.touches(&line.written, from, to)directly inland_before_remap(crates/victory-gpu/src/host.rs:5533, 5543).Verification
remapped_spans_skips_untouched_ranges_and_joins_adjacent_onesincrates/victory-gpu/src/queue.rs.settled for: a synchronous submission or present(pages remapped under flights' writes) dropped from 11.3-12.4 ms/frame (0.8-1.1 settles/frame) to 0.0 ms/frame (0.0 settles/frame).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cloph-dsp on 2026-11-29T23:08:39Z.
Independent local verification (Windows, Rust 1.100.0/MSVC, synthetic inputs only, no game data):
d34d2dee5e670f28a8019d793892bd543bbb17c3, base/parentf72cec7714aa6d6e274b761fb6fa40bfcf44243b.cargo test --locked -p victory-gpu --lib -- queue::tests::remapped_spans_skips_untouched_ranges_and_joins_adjacent_ones --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 975 filtered, exit 0 (pre-existing warnings in the victory-gpu lib test build).git grep -Ffor the test name on the base returned no match (test is new on this PR);git diff --check f72cec7 HEADclean (2 files, +46/-4).CARGO_TARGET_DIR(never shared) withCARGO_BUILD_JOBS=2.AI-assisted (Hy4 flash).