vkback residency: each memory line places and lets go its own textures #47
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/vktory6--VKtory!47
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-47"
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?
@Mhyster on GitHub · 2026-12-01 03:59 UTC · original
Mhyster:residency-own-lines→main· +67 −11 · 3 files · 1 commits · merged 2026-12-01 08:12 UTCWhat
The VRAM decision for a texture (
room_for_textures, whichtexture_placeuses for the card's line) now reads the card's line only, andlet_go_idleruns once per line over the textures in that line's memory (let_go_from;Life::gtttells them apart). Textures spilled to GTT come back to VRAM when the card is more than 7 % under its line (back_to_vram: idle ones let go, 64 MB every 30th present, made again in VRAM at their next use).Why
room_for_texturesaskedv < 0 && g < 0. GTT is mostly title memory, so whenever GTT stood over its line, every texture was refused, including the ones that would have gone into VRAM while the card was under its line. In a player session on a 16 GB card: GTT 13.3 of 15.4 GB with only 0.5 GB of it textures, 194k textures "refused past both lines", and the image arena holding 4.8 GB free in its blocks. A refused texture reads null: black or missing surfaces until there is room.let_go_idletookov.max(og)and let go VRAM textures for GTT's line. Freeing a VRAM texture gives no GTT back, so the sweep churned: 381,786 let go and 1,175,026 refills refused in that session.texture_place's doc already saysroom_for_textures"decides the VRAM line".Verification (rule 27)
Corrected 2026-12-01: "main" in this section is bb34500, not main:
2dd59dawith the open PRs #22 and #29 merged, just-another-dude84/VKtory@324542c cherry-picked and a local translator version bump. "This branch" in the table is bb34500 with this PR's first commit (9894da3). Theback_to_vrampair and the validation run compare bb34500 with 1da3463, which also has #48: their VRAM, spill and refusal numbers are this PR's, their fps may include #48's.RX 9070 XT 16 GB, Ryzen 5 9600X, Mesa 26.3.1. Own save loaded and left standing; 180 s sampled after a 120 s load, interleaved with main.
VKB_GTT_BUDGET_GB=10), mainThe first version without
back_to_vramleft spilled textures in GTT (spilled 45k/39k -> 148k/139k): the old sweep had brought them back by accident. With it, another standing spot of the same save, two interleaved pairs, no GTT pressure: fps 24.6/24.5 -> 25.0/24.9, VRAM 12.0/11.7 -> 11.7/11.8 GB, no refusals or spills on either side.Validation run (rule 30), house scene, 60 world s, errors only, two runs a side (layer 1.4.363): no new error. The union of distinct VUIDs is the same on both sides except
VkRenderingInfo-pNext-06079/06080, seen in one main run only.VUID-VkSparseMemoryBind-memory-02730shows on both sides and is not on the TASKS.md list: reported separately (#42).Learning:
docs/learnings/tex-letgo.md, "Each line its own memory".The fps numbers are from the house scene, which docs/tools.md now calls a smoke check only (its view switches on its own); the refusal counts and recording times are the measurement, the fps only shows nothing got worse.
🤖 Generated with Claude Code
VUID-VkSparseMemoryBind-memory-02730on main (not on the TASKS.md list) #42@vktory6 on GitHub · 2026-12-01 08:12 UTC · original
Merged, thanks! Asking for GTT room in the VRAM decision was a real bug, and your refusal counts show it clearly.
back_to_vramputs back on purpose what the old sweep did by accident. Check on the reference system (RX 9070 XT): tests pass, and the house-scene validation run shows no new error.