texture pool: VICTORY_POOL_MOVE moves textures in use out of blocks being emptied (#21) #31
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/lobomfz--VIctory-xmem!31
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-31"
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?
@LOCKhart07 on GitHub · 2026-11-30 14:09 UTC · original
LOCKhart07:pool-move→main· +129 −1 · 2 files · 1 commits · closed without mergingFor #21.
The texture sweep already picks blocks to empty (
block_fates→Fate::WaitedOut) and stops placing new pieces in them (pool::drain). But it only lets go of idle host copies (take_idle/sole_idle). A block that still holds even one texture in use therefore never empties while the world streams. That's the "8 being emptied, 0 returned" in #21.VICTORY_POOL_MOVE=1(off by default) adds the missing mover:let_go_idle, it lets go of the host copies of textures the title fills whose piece lies in a waited-out block, up toVICTORY_POOL_MOVE_MBper second (128). It skips textures with a twin, ones the card wrote into, and ones not placed.want_level:unstage,grown, the old copy intoREPLACED. The slots that show the old copy keep showing it until the new one is filled, and then they're remade (levels_changed_after), so nothing shows blank.texture_slots_remapped(newdescriptor::host::moved), so the texture pass makes the copies again soon, in another block, from title memory.The idea and the shape are from crbns/victory-tapin's
drain_moves(r30–r35). This is a reimplementation on this tree's sweep, not their code. Their compaction also chooses blocks; here the existingblock_fateschoice is kept as it is.Measured (RX 9070 XT 16 GB,
cd811c1, 2560x1440, RT on, ~3 minutes of driving each; different routes, so treat fps as noise):VICTORY_POOL_MOVE=1Subjectively: noticeably less texture flicker while driving, though some remains.
Not solved by this:
move_outwalks the whole texture table each pass, cheap so far. I haven't measured it at 100k+ textures.Builds alone on
cd811c1(onlyresource.rsanddescriptor/host.rschange).🤖 Generated with Claude Code
@BlueCatsz on GitHub · 2026-12-01 16:03 UTC · original
Tested #31 (
VICTORY_POOL_MOVE=1) on CachyOS + RX 9070 XT 16 GB.26.3.1+ #44/#43mesa.patch), CachyOS (kernel7.3.6),proton-cachyos-slr+ RB-treewineserver, Series X (1706x960 -> 2560x1440, HW RT on, FG off).main37bb30f+ #44 + #47 + #67 + #43 + opt-inVICTORY_AMBIENT_RT), compared against a prior run on37bb30f + #44without #31.Observed Result
37bb30f + #44,VICTORY_AMBIENT_RT=0):texture blocks: 80 alive, 8 being emptied, 0 given back to the card since the start, 2 taken into use again for want of room elsewhere.VICTORY_POOL_MOVE=1):moved=15 mb=1 blocks=8 total=8368 total_mb=1066 given_back=37.texture blocks:72 alive, 6 being emptied, 37 given back to the card since the start, 5 taken into use again for want of room elsewhere.30–43 fpssteady state,0crashes,0device loss,0dropped draws).@LOCKhart07 on GitHub · 2026-12-03 17:33 UTC · original
Already cherrypicked to main
Pull request closed