Replace overlapping shadow windows with shared memory backing and page-copy deduplication #2
Labels
No labels
accessibility
area: compatibility
area: docs
area: hygiene
area: infra
area: memory
area: ray-tracing
area: rendering
area: shaders
area: submission
area: textures
bug
ci
dependencies
difficulty: advanced systems
difficulty: intermediate
documentation
duplicate
enhancement
experimental
good first issue
help wanted
invalid
known issue
performance
priority: P0
priority: P1
priority: P2
proposal
question
rendering
research
testing
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/VictoryX-dev--VictoryX#2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original
Problem
Title GPU accesses outside named buffers are currently backed by independent 4 MiB address windows keyed by request address and length. Because overlapping requests create separate host copies over the same console pages, VictoryX both wastes substantial memory and copies the same dirty pages multiple times per frame.
Known Evidence
468of1,105) are copied again by a second overlapping window.21,133of1,588,022recorded lists in a diagnostic session were re-executed without reset, keeping root-view window holds alive longer.memcensus.rs) proved ~10 GB of that private commit is GPU-local memory charged 1:1 to private bytes, while host RAM-side private memory is ~9.8–11.5 GB (of which windows' cells account for ~3.6–4.9 GB).VICTORY_WINDOW_WITHIN=1: reuses a longer live window in the same 4 MiB cell. Saved ~0.6–1.1 GB private bytes when tested alongsideVICTORY_WINDOWS_ORDERED=1, but has not been validated standalone.Approaches That Did Not Work
VICTORY_WINDOW_KB=256(kept off): Shrinking windows from 4 MiB to 256 KiB multiplied the window count by ~2.5× while saving only ~250–330 MB and worsening frame pacing (7.1% of frames > 33.3 ms).VICTORY_CARD_ALL=1(kept off): Redundant withVICTORY_CARD_BUFFERS_MIN_KB=64.VICTORY_WINDOWS_ORDERED=1(kept off): Added ~0.5 GB private bytes and +2.5 ms P99 without resolving geometry corruption.Relevant Source Modules
runtime/crates/victory-gpu/src/shadow.rsruntime/crates/victory-gpu/src/host.rsruntime/crates/victory-gpu/src/watch.rsruntime/crates/victory-gpu/src/land.rsruntime/crates/victory-gpu/src/window_holds.rsruntime/crates/victory-gpu/src/membreak.rsruntime/crates/victory-gpu/src/memcensus.rsruntime/crates/victory-gpu/src/residency.rsExpected Contribution
land.rs) and write-combined rules (wc.rs),VICTORY_WINDOW_WITHIN=1standalone as a near-term mitigation with synthetic aliasing fixtures and release-package measurements.Acceptance Criteria
VICTORY_XFER=1confirms a substantial drop in duplicate stale-page refreshes per frame andmemory splitconfirms lower host RAM-side window memory.VICTORY_*switch until validated in matched gameplay checkpoints.