D3D12.X: a title allocator takes a free spare another one put aside #2725
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2725
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2725"
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?
@veyn-sudo on GitHub · 2026-11-26 08:58 UTC · original
veyn-sudo:pr/share-spare-allocators→main· +44 −3 · 1 files · 1 commits · openWhen the title resets a command allocator while lists still hold recordings on its PC allocator,
alloc_poolputs that one aside and goes on with another: one this title allocator put aside earlier that is free again, or a new one. A title that resets many allocators so makes a PC allocator for almost every one of them and keeps it, although others lie free. This lets a title allocator take a free spare of the same list type that another one put aside.Part of #2688 (workstream 6: memory that grows in the world). Related: #2138 drops free spares beyond two per title allocator, and #2707 resets idle ones so their memory comes back. Both deal with spares already made; this makes fewer of them. #2707 also changes
title_reset_in, so whichever merges second needs a rebase.What is in it
crates/xcl/src/hle/d3d12x/alloc_pool.rs:title_reset_inlooks for a free spare of the same type among the other title allocators' when it has none of its own, and takes it over (it then goes with this title allocator'sforget). Never another title allocator's own allocator: that one goes with the title's Release. Test:a_free_spare_another_title_allocator_put_aside_is_taken(also: not one in use, not one of another type).Tested
cargo test --workspace --no-fail-fast -- --test-threads=4onad9172c0: 1436 passed, 0 failed, 47 ignored; 25SKIPPEDlines (21 no wave64, 3 f16 forms refused, 1 no heap windows).main+ #1453 + other open PRs,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1), with a temporary count of the spares: before, at 162 s, 315 title allocators had 327 PC allocators made, 287 of them free, and the process's non-local video memory grew 1.3 → 3.0 GB in 40 s. With this, 282 made at 191 s (flat after 160 s), non-local memory flat at about 2.6 GB from 160 s on, and the run went from 169 s to 194 s before the memory guard stopped it.Regression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_01WStEFektfHt5AEbK6Wupac
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.