GPU: keep the remap history for every view heap, coalesced and bounded (port of Kamiloj9/victory-dlss 2023d5c8b) #1333
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!1333
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1333/head"
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?
@CwWwWwW on GitHub · 2026-11-26 15:53 UTC · original
CwWwWwW:port/remap-history-queue→main· +125 −28 · 2 files · 1 commits · closed without mergingProblem
The ranges of title memory the runtime mapped, unmapped or wrote were kept in one unbounded
static REMAPPED: Mutex<Vec<(u64, u64)>>and the first texture pass took all of them withstd::mem::take. Two consequences:Found by comparing the other forks: Kamiloj9/victory-dlss commit
2023d5c8b(Kamil Ojdana), which adapts PastiiJay/klbf-lab commit74315e7. It is not in this fork,upstream/main, the #653 batch, or any open PR (checked by the fork comparison). This is that fix ported.Change
RemapQueue: sequence-numbered ranges, coalescing consecutive pages,REMAP_LIMIT = 1 << 15entries, the oldest evicted.HostHeap::remap_cursor: each heap takes the ranges recorded after its last pass;texture_slots_remappedis nowrefresh_remapped(&REMAPPED, frame).Nonefromsnapshotand rescans all its placed slots once, instead of silently missing the range.remapped()records and counts evictions; the metrics line says "evicted from history" rather than "dropped".texture_slots_page_writtenstill runs first and is unchanged; slots a draw read through a table still wait for their draw.Tests
remap_history_delivers_extended_ranges_and_detects_eviction: coalescing a page sequence, snapshots after a cursor, an evicted range returningNone, and the empty latest snapshot.remapped_memory_makes_its_texture_slots_dueextended to a second view heap: both heaps make their own slots due from the shared ranges, each cursor advances once, and an evicted history makes both rescan and still leave the draw-table-owned slot for its draw.cargo test -p victory-gpu --lib --locked: 218 passed, 0 failed, 6 ignored.cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean.Coordination
This touches
descriptor/host.rs, which open #1324 also changes (Heap::drop/dynamic slots, an independent area). Both are needed; whichever lands second should be rebased. It does not depend on #1324.(CI note: the
checkjob on main is currently red on the asset-policy violation; #1322 fixes that, after which this can be rebased.)Pull request closed