Repository navigation
Conversation
MystifiedSky
added a commit
to MystifiedSky/VIctory-NVIDIA-Improved
that referenced
this pull request
Nov 28, 2026
…1-coder#1343) Reserve the requesting allocation before trimming at a zero cap and release detached staging blocks outside the pool lock. Preserve texture limits and allocation-failure backoff. Upstream-PR: trustno1-coder#1343 Upstream-Commit: b43cd7a
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.
The budget sweep allows one idle staging block under host pressure and zero under critical commit pressure. When returned ranges finish resting between sweeps, the next allocation reloads the texture spare limit. It can keep empty 64 MiB upload buffers beyond the staging budget until a later sweep gets the mutex.
Publish the staging limit before trying the pool lock. Each pool reads its own limit when allocating. With a zero limit, reserve a reusable range for the current request before dropping the other empty blocks. Texture allocations retain their existing trim order and ripe-block selection.
Measured on an RTX 5070
A synthetic fixture on Proton Experimental and NVIDIA 620.73.04 filled four 64 MiB D3D12 upload buffers through the production pool. It returned seven of the eight half-blocks, supplied the critical spare limit while they were resting, then advanced the allocator clock to the existing rest deadline and requested the other half of the still-live block. The growth callback refused new allocations.
These bytes count D3D12 resources still owned by the pool. The fixture supplies the pressure state directly. Physical runs used a 1 GiB high watermark, 2 GiB hard cap and zero swap. The allocator regression failed on the base with two unexpected idle blocks. All 11 pool tests passed on the proposed source, including whole-block reuse at zero budget, recovery, delayed return and ripe texture selection. Reproduce the submitted regressions with
cargo test --locked -p victory-gpu --lib pool::tests:: -- --test-threads=1on Windows.The duplicate check included the host texture sweep, the optional texture spare scaling, driver calls outside the pool lock, and reusable texture-budget accounting. Those changes address different paths. #394 · #784 · #816 · #1214
The diagnostic-feature cross-check and staged asset policy passed locally. Upstream Windows CI stopped at the same Clippy findings on the PR and its base, in
victory-shader/src/emit/mod.rs:2768andvictory-gpu/src/shadow.rs:1708. PR check · Base check