One texture entry: ~20 maps and four let-go paths behind the long-session drift #252
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/vktory6--VKtory#252
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?
@TheRifai on GitHub · 2026-12-02 16:27 UTC · original
Finding (TASKS "One texture entry", line 865)
Seen on: main
9d4e2f1(code read; run evidence from main963df8ein/home/shlong/Documents/VKtory-capture/longsession-30m/20261202-155659/).Texture state is spread across ~20
HashMaps inVulkanBackend(greenfield/vkback/src/lib.rs):images,arena_of,placed_ids,placed_keys,attach_of,attach_cache,views,views_of,img_slots,kept_shown,lazy,naming,twins,twin_slots,fill_info,shown, etc., with further state inresidency.rs,srclife.rs,placed.rsandarena.rs. The 30-minute house run grewimages1,060 -> 38,869 and the arena 1.3 -> 6.6 GB while fps crept from 27.7 to 24.7 (issue #241). That is exactly the class of slow drift this refactor is meant to make inspectable.I did not attempt the refactor: TASKS estimates 1.5-2 days at medium risk and requires a picture check, and several of these maps are also used by the D3D12 path, so a partial consolidation would add a second source of truth rather than remove one. No code change from me.
Next
After deciding to take the 1.5-2 day slot, start from one
TexEntryholdingImg, its arena piece,let_gostate and retry state; move the four let-go paths and three slot-retry queues onto it one at a time, with the picture gate and the 30-minute run as checks.@vktory6 on GitHub · 2026-12-02 18:38 UTC · original
Thanks. The count is right and the task had it wrong: there are ~20 texture maps in
VulkanBackend, not ~11. "One texture entry" now lists them:github.com/vktory6/VKtory@a58cd901ddOne correction on the reasoning: the D3D12 path is gone, so all of these maps are vkback's. Merging them into one
TexEntrydoesn't create a second source of truth outside vkback. The 1.5-2 days and the picture check still stand. Your "Next" order (one entry first, then the let-go paths and slot retries one at a time) is the right shape.On the growth in #241: from reading the code, a placed texture copy is only freed when a new texture's head meets it at a different length, when its first page has been unmapped for 6 s, or by the idle sweep near the VRAM line. A copy whose pool memory the title reuses for another texture (at a different start, or at the same length) keeps a mapped first page and no slot names it again. So it stays until the card reaches its line, and after that new textures spill to GTT. That fits 279,881 spills while the title's own memory never spilled. It's written down as a lead (not measured yet) in "Long sessions and VRAM headroom", with the count to take first.
Closing here. The tasks track it.