perf(gpu): avoid full texture pool scans on first-upload admission #4454
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4454"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by v8816 on 2026-11-30T20:34:16Z.
Problem
When the card is at or over budget, first-upload admission computes the largest free range across both texture pools for each candidate. The earlier budget guards can settle some decisions without that scan. The remaining candidates only need to know whether a single reusable range fits.
Change
Defer the range lookup until it can affect admission, and stop at the first fitting range. Keep the existing budget limits and decision counters. A new test covers fragmented ranges, the cooldown before returned pieces become reusable, and coalescing after reclaim. The admission tests also verify that guard decisions skip the lookup.
Validation
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tikD1337 on 2026-11-30T20:51:10Z.
Tested headlessly on
origin/main(e1251c31, Windows 11, no game run):origin/main.cargo test -p victory-gpu --lib -- pool::tests: 31 passed, 0 failed, 3 ignored (1166 filtered).cargo test -p victory-gpu --lib -- first_upload: 10 passed, 0 failed (1190 filtered), no new warnings.(AI-assisted build/unit-test check; game runtime not launched.)
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:41:29Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed