GPU/HLE: cap default VICTORY_LATE_WAIT_LISTS on <= 6 GiB cards and replace global remap lock with RangeLock (Refs #431) #570
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/fxceless--victory-fork!570
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-570"
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?
@BE29ZZ on GitHub · 2026-11-25 02:18 UTC · original
BE29ZZ:fix-issue-431→main· +554 −59 · 6 files · 7 commits · openSummary
Addresses two of the dominant bottlenecks identified in #431 on 6 GB VRAM cards (e.g., RTX 2060 6 GB,
vram_budget_mb=5187):Tier 1 — Cap default
VICTORY_LATE_WAIT_LISTSto64on <= 6 GiB local VRAM budget (crates/victory-gpu/src/host.rs):Host::video_memory()lazily whenVICTORY_LATE_WAIT_LISTSis unset/invalid and defaults to64when the adapter's local DXGI budget is non-zero and<= 6 GiB(keeping256on 8 GB+ cards or when unavailable).VICTORY_LATE_WAIT_LISTSoverrides (without querying DXGI) and logsvram_budget_mbalongsidemoston startup.DYNAMIC = 1 << 18unchanged (raising it on NVIDIA's 1M view heap cap would cut into the title's ~720k slots) and preservesQUEUE_ORDER/card_merge_relayordering intact.Tier 2 — Replace the global title-memory remap
RwLock<()>with a range lock (watch.rs,lib.rs,texture.rs,draw.rs,xmem.rs):watch::MAPPING: RwLock<()>with an interval lock (RangeLock) over half-open virtual address ranges[start, end), preventing unrelated streaming remaps inXMemMapPhysicalPages/map_aliasfrom stalling texture refreshes on disjoint memory ("waiting for title memory to hold still").xmem::affected_rangeand handles placeholder coalescing (MEM_COALESCE_PLACEHOLDERS) soUnmapViewOfFile2view splits still serialize cleanly against readers on any page of an affected view.copy_mapped) hashing/detiling on the!committedandthrough_copy()paths inStaging::refresh_timed, and scopesState::rectanglesto its vertex slice.What Is Not Changed
QUEUE_ORDER):relay_card_backremains on the direct queue soShadow::card_merge_relaykeeps exact ordering againstcard_beforeuploads."title memory read"(WHY_READ/Step::Fill) settles: Left intact so CPU upload fills cannot observe stale bytes ahead of in-flight shader writes.Verification Status
Clippy— passedClippy, diagnostics build— passedTests— passed, including new unit tests:victory-gpu::host::late_tests::late_most_scales_with_vram_budget_and_honours_overridevictory-gpu::watch::mapping_tests::{disjoint_ranges_do_not_block_each_other, waiting_writer_blocks_overlapping_readers_without_blocking_disjoint, overlapping_writers_serialize_in_fifo_order_without_deadlock}victory-hle::modules::xmem::tests::{affected_range_expands_to_overlapping_views, a_range_read_in_place_never_meets_a_split_view_gap}vram_budget_mb,most=64) and whether"a draw whose descriptor table found no free slots is dropped"stays at zero without settingVICTORY_LATE_WAIT_LISTS=64."waiting for title memory to hold still (the runtime remapping it)"ms during world streaming (previously 75–500 ms), and stability (no access violations inStaging::refresh_now/Layout::detile).Refs #431
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.