Repository navigation
Closed
Conversation
Every texture ever sampled stays in STAGING, and each one kept a Vec the size of its title memory (Last::read) for the rest of the run, though it is only needed while the texture is detiled. On a long world run that adds up to gigabytes on top of the title's own commit, and when the host runs out of commit a failed allocation aborts the process: no crashes.log entry, no message beyond "memory allocation of N bytes failed". The buffer is now one per thread (READ), reused for every texture, and it is reserved with try_reserve_exact: if that fails the upload is skipped with a one-time warning, and the texture still asks to be detiled next time. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
|
Closing as a duplicate of #215, which makes the same change in |
BastienRodz
added a commit
to BastienRodz/VIctory
that referenced
this pull request
Nov 27, 2026
…lent playback endpoint Ported from pragyaangaur/VIctory-macOS (GPL-3.0): Marvisak#495 (c37dc6eac6) and the audio half of Marvisak#405 (3587d54480). DirectStorage (Marvisak#495, adapted to our scheduler): - A queue that submits itself still holds reads into physical pages for the title's Submit, but no longer forever: a "dstorage hold" thread starts them once they have waited VICTORY_DSTORAGE_HOLD_MS (2000 by default, also when empty or not a number; 0 holds nothing). Their page lists are read as they are then, with the existing late-list re-reads. - A title polling a pending status entry for as long (the same VICTORY_DSTORAGE_HOLD_MS) while reads are held starts them too, but only queues held since before it began to poll, or held for the hold and behind the polled entry: a queue held meanwhile may still have its page table being written. The poll path takes the scheduler lock with try_lock and never starts workers. - Such a late start starts only what was held, in order; commands enqueued since wait for a Submit as before. - Unlike upstream, the workers are woken after either release (upstream left released reads waiting for an unrelated notify), the poll clock restarts after a 250 ms pause, and the release logs are rate-limited. Upstream's own stuck-queue watchdog is left out: the periodic VICTORY_DSTORAGE_SUMMARY line already shows held/oldest. The catch_unwind guard, the summary and release_ref are kept as they were. Audio (Marvisak#405): - audio::silent serves CoCreateInstance (ole32 and api-ms-win-core-com-l1-*). An MMDeviceEnumerator whose host has no active render endpoint, or any with VICTORY_SILENT_AUDIO=1, is wrapped: render flow shows one silent device whose ISpatialAudioClient takes 48 kHz float objects and signals the title's event every 10 ms; capture and everything else go to the host. - Over upstream: the activation PROPVARIANT must be a VT_BLOB with data before its blob is read, the stream signals its own duplicate of the title's event (closed after the clock's thread ends; activation fails with E_HANDLE if it is not a handle), so a title closing its handle first never has another object signalled, a failed clock-thread spawn is logged, and the tests free GetId's string. - windows gains Win32_UI_Shell_PropertiesSystem (a feature: Cargo.lock is unchanged) and windows-core is no longer optional (already locked). Tests: hold expiry, a late Submit after the hold, poll release with pause reset, a queue held just before the poll's end left held while an older one starts, the polled entry's queue, a late start leaving newer commands, the poll wait following the hold (up to u64::MAX ms), zero hold, HOLD_MS parsing, and an end-to-end page read that is never submitted; for audio, routing, the blob parsing and refusals, client to stream activation with ticks, ticks after the title closes its event, a non-handle event, and the device id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This pull request was closed.
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.
Every texture the title samples through a watched pool stays in
STAGINGfor the rest of the run, and each one kept aVecthe size of its title memory (Last::read). That buffer is only needed while the texture is detiled, so on a long world run it adds gigabytes of commit on top of the title's own, and when Windows runs out of commit a failed allocation aborts the process: nocrashes.logentry, onlymemory allocation of N bytes failed.What I saw
RTX 3070 Ti, 31 GB RAM, the world loaded (black, minimap only), diagnostics build with the host debug layer. Two aborts, in different places and at different sizes:
System commit was about 52 GB of a 48 to 54 GB limit for the whole run (a growing pagefile), with the process at about 21 GB private. Neither abort left anything in
crashes.log.Fix
The buffer is one per thread (
READ), reused for every texture, and reserved withtry_reserve_exact. If the reservation fails the upload is skipped with a one-time warning, and the texture still asks to be detiled next time (askedis only updated after the reservation succeeds). No behaviour change otherwise.Verified
On the machine above, with this change the abort did not come back over several later runs (one of 20+ minutes with the process flat at about 21 to 22 GB private). I also raised the pagefile to 32 GB at the same time, so I cannot separate the two effects from those runs. I did not test the
try_reserve_exactfailure branch under real memory pressure.Not in this PR
The
STAGINGmap itself is still never cleared, so the upload buffers stay for the run. That is a separate question and I left it alone.🤖 Generated with Claude Code