queue, host: exclude skipped PageRange runs in land_before_remap #3277
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3277
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Maverick0351a on GitHub · 2026-11-29 21:15 UTC · original
Maverick0351a:fix/copy-page-mappings-skip-ranges→main· +46 −4 · 2 files · 1 commits · merged 2026-11-30 14:12 UTCProblem
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).@cloph-dsp on GitHub · 2026-11-29 23:08 UTC · original
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).