Optional projected-density gate. Consulted only for a rung the byte
ceiling admits; its refusal shares this budget's declined set so the
loop retires the loader for the run (non-sticky ACROSS runs — the gate
is re-evaluated at every run start and re-kicked on zoom).
Private ReadonlyperPrivate ReadonlydeclinedReadonlybudgetPrivate ReadonlyreporterPrivate ReadonlydensityOptional projected-density gate. Consulted only for a rung the byte
ceiling admits; its refusal shares this budget's declined set so the
loop retires the loader for the run (non-sticky ACROSS runs — the gate
is re-evaluated at every run start and re-kicked on zoom).
Measured or optimistically reserved bytes across tracked loaders.
StaticforBuild one sized from the device heap, matching the eager admission gate.
initialResidencies is FIRST and REQUIRED, not an optional tail argument,
because two separate guarantees rest on it and both fail silently when it
is missing: resident bytes of already-complete loaders are forgotten (the
ceiling ratchets upward, #2430), and — since the fair-share allowance
divides headroom by the paths the budget currently knows — the first node
admitted is handed the entire scene's headroom and can spend the whole
ladder in one pass. Pass an empty iterable to opt out deliberately.
OptionalpoolOverrideBytes: numberOptionalfallbackPoolBytes: numberOptionalreporter: RefinementResidencyReporterOptionaldensityGate: RefinementDensityGate | nullTrue once path has been refused this run. Callers MUST fold this into
their anyHasMoreLODs / getLoaderProgress closures — see the module
docstring; omitting it spins the refinement loop at frame rate.
Record path's current footprint and return whether it may refine plus its
per-pass allowanceBytes. A refusal is sticky for the rest of the run:
re-offering the same loader every pass would re-measure, re-refuse and
re-log without making progress. An admission immediately reserves only its
estimated next rung. runProgressiveRefinement awaits loaders serially, so
the wrapper's measured record() replaces that estimate before the next
loader is admitted and the gap to the larger allowance is never observed.
Replace an admission estimate with the loader's measured post-pass footprint.
One run's residency accounting for sweep-registered progressive leaves, shared by all four geometry refinement phases. The map is seeded from every registered progressive loader, including completed loaders that the wrappers return from before admission, so a new view-triggered run cannot forget bytes already resident and ratchet the ceiling upward.