Repository navigation
Conversation
The pool walk makes the smallest textures up front while currentAllocatedSize is under a twentieth of the working set. That counter counts each no-copy buffer in full, so in a game with many pools it is past the budget from the first load and nothing is made up front: those IDs read the dummy until a shader's read is noticed. With the switch set, the walk compares against the residency set instead. It is off by default. Checked: t_pool_chunks and t_cpu_tex. Ocarina of Time v131072 on an M6 Mac with 24 GB, same save and inputs, DM_POOL_BUDGET_MB=6000 against the default: IDs left out 3,274 to 698, 3,081 to 3,285 MB in the set, frame time p50 14.1 to 14.3 ms, no GPU errors. That run read the set's size at its last commit, on main 75c1a8c with other open PRs; this version reads it directly and has not been run in a game. Not tried on a smaller Mac or other games.
akshay4
force-pushed
the
pool-budget-residency
branch
from
November 7, 2026 07:13
490fbfa to
66cde28
Compare
Author
|
Rebased on main, where |
cfryerdev
pushed a commit
to cfryerdev/nxnative
that referenced
this pull request
Nov 8, 2026
…eedds#1498) The pool walk makes the smallest textures up front while currentAllocatedSize is under a twentieth of the working set, and that counter counts each no-copy buffer in full, so in Ocarina of Time it is over budget from the first load and nothing is made up front. The switch compares against the residency set instead. Off by default. Measured on Ocarina of Time v131072: IDs left out 3,274 -> 698, frame time p50 14.1 -> 14.3 ms.
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The pool walk makes the smallest textures up front while
currentAllocatedSizeis under a twentieth of the working set. That counter counts each no-copy buffer in full (50 over one 64 MB region add 3,200 MB, see #1482), so in Ocarina of Time it is over budget from the first load and nothing gets made up front. Those IDs read the dummy until a shader's read is noticed, which can show as textures filling in late.DM_POOL_BUDGET_MB=<MB>compares against the residency set instead. Off by default, so nothing changes without it.Entry added under the pool walk in
docs/reference/memory.md.Checked
check_t_pool_chunks,check_t_cpu_tex,test_docs.py,test_env_switches.py0400486024DEC000v131072, same save and inputs, about 2 minutes each:DM_POOL_BUDGET_MB=6000regress.pynot run: nothing changes unless the switch is set.Docs
docs/reference/memory.md,docs_symptoms.pyrun, row indocs/env_switches.tsv