GPU/descriptor: refresh tiled texture slots for tabled views and stale first_shown #764
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!764
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-764"
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?
@AscilCH on GitHub · 2026-11-25 06:44 UTC · original
AscilCH:fix/gpu-descriptor-tabled-tiled-slots-remake→main· +289 −20 · 1 files · 1 commits · openProblem
Under levels-on-demand (
VICTORY_LEVELS_ON_DEMAND=1),make()shifts a tiled texture's host SRV to start atfirst_shown(), andOnDemand::uploaded()/card_wrote()records the texture's start address inRESHOWNforHostHeap::texture_views_remade(). Two gaps left tabled (and non-placed) tiled texture slots permanently stuck at unmappedMostDetailedMip = 0(black) or stale mips:HostHeap::note_buffer()excludestabled_latelyslots fromself.placed(Spans), soHostHeap::texture_views_remade()never found tabled slots when drainingRESHOWN.HostHeap::mirror()only rebuilt a slot whenmade[index] != key. Once a draw mirrored a tabled tiled slot before its first upload (first_shown() == None->MostDetailedMip = 0) or before finer mips arrived, every subsequent draw hitmade[index] == keyand skippedmake().Fix
HostHeap::tiled_shown(TiledSlots), storing theOnDemandhandle, optional placed start address (including tabled slots excluded fromself.placed), and thefirst_shownlevel baked into the slot, gated by a fasthas_tiled: AtomicBoolso non-tiled heaps incur no mutex overhead.tiled_shown.slots_at(start)inHostHeap::texture_views_remade().HostHeap::mirror(), whenmade[index] == keyandtiled_stale(index)is true (first_shown()changed since the slot was built), rebuild the host descriptor and updatetiled_shown.Verification
cargo test -p victory-gpu --locked -- descriptor::host::tests:20 passed; 0 failed(including pure unit testtiled_slots_tracks_tabled_starts_and_detects_first_shown_changes).VICTORY_LEVELS_ON_DEMAND=1 cargo test -p victory-gpu --locked -- descriptor::host::tests::tabled_tiled_slot_remakes_when_first_shown_changes:1 passed; 0 failed(exercising a real tiled placed texture on D3D12 hardware through bothtexture_views_remade()andmirror()).cargo clippy -p victory-gpu --all-targets --all-features --locked: 0 warnings indescriptor/host.rs(only pre-existing8dd30abwarnings indraw.rs:2377andindirect.rs:1322).cargo xtask policy:171 files ok.(AI-assisted; synthetic unit tests only, no game data.)
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.