Credit the texture budget only for reusable pool ranges #1436

Manually merged
github merged 1 commit from github-bot/gh-1436 into gh-pr/1436/base 2026-11-29 00:28:04 +00:00 AGit
Owner

@⁠ghptc on GitHub · 2026-11-28 19:51 UTC · original
ghptc:fix/texture-pool-budget-credit-current → main · +59 −5 · 1 files · 1 commits · merged 2026-11-29 00:24 UTC

Texture budget credit

This replaces #1214 on current main (923e38cc), as requested after the original branch conflicted. The current budget calculation subtracts live COM-owned bytes from retained block capacity. Final release removes bytes from HELD immediately. The allocator returns the range after its 2,500 ms rest, so the budget can credit space that placement still cannot reuse. A failed placement can also leave a resting reservation without creating a live COM owner. Maintainer request on #1214

Track reusable bytes under the pool lock that protects the free ranges. Successful cuts debit the range, block insertion credits its capacity, reclaim credits matured ranges, and trimming debits the removed block. This covers current main's block creation outside the pool lock, make-ahead path, and ripe or oldest-block cuts. The live-resource telemetry remains separate.

Evidence

  • A synthetic baseline check on 923e38cc reproduced the old budget credit of 64 MiB with only 48 MiB in free ranges. The independent free-range census measured the difference.
  • The replacement keeps the original release, delayed reuse and trim regression. A second regression exercises a rejected placement through the shared allocator and measures 48 MiB reusable while the reservation rests and 64 MiB after it matures. Existing coverage for allocation outside the pool lock, make-ahead failure and oldest-block selection also checks the reusable-byte invariant.
  • The Windows-target release library ran 12 focused allocator tests under Wine with hardware devices hidden. All 12 passed.
  • An independent reviewer also reported that the original #1214 regression passed on native Windows 11 build 26300 with MSVC, Rust 1.98.1 and an RTX 5060 Ti. That result covers the original submission. Independent Windows validation

Run the retained regression from a Windows shell.

cargo test --release --locked -p victory-gpu --lib -- --exact pool::tests::budget_room_tracks_free_ranges_through_release_reuse_and_trim
**@⁠ghptc** on GitHub · 2026-11-28 19:51 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1436) `ghptc:fix/texture-pool-budget-credit-current` → `main` · +59 −5 · 1 files · 1 commits · merged 2026-11-29 00:24 UTC ## Texture budget credit This replaces #1214 on current `main` (`923e38cc`), as requested after the original branch conflicted. The current budget calculation subtracts live COM-owned bytes from retained block capacity. Final release removes bytes from `HELD` immediately. The allocator returns the range after its 2,500 ms rest, so the budget can credit space that placement still cannot reuse. A failed placement can also leave a resting reservation without creating a live COM owner. [Maintainer request on #1214](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/1214) Track reusable bytes under the pool lock that protects the free ranges. Successful cuts debit the range, block insertion credits its capacity, reclaim credits matured ranges, and trimming debits the removed block. This covers current main's block creation outside the pool lock, make-ahead path, and ripe or oldest-block cuts. The live-resource telemetry remains separate. ## Evidence - A synthetic baseline check on `923e38cc` reproduced the old budget credit of 64 MiB with only 48 MiB in free ranges. The independent free-range census measured the difference. - The replacement keeps the original release, delayed reuse and trim regression. A second regression exercises a rejected placement through the shared allocator and measures 48 MiB reusable while the reservation rests and 64 MiB after it matures. Existing coverage for allocation outside the pool lock, make-ahead failure and oldest-block selection also checks the reusable-byte invariant. - The Windows-target release library ran 12 focused allocator tests under Wine with hardware devices hidden. All 12 passed. - An independent reviewer also reported that the original #1214 regression passed on native Windows 11 build 26300 with MSVC, Rust 1.98.1 and an RTX 5060 Ti. That result covers the original submission. [Independent Windows validation](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/1214) Run the retained regression from a Windows shell. ```sh cargo test --release --locked -p victory-gpu --lib -- --exact pool::tests::budget_room_tracks_free_ranges_through_release_reuse_and_trim ```
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 19:54:52 +00:00
github-bot referenced this pull request from a commit 2026-11-29 00:27:22 +00:00
github-bot changed target branch from main to gh-pr/1436/base 2026-11-29 00:27:52 +00:00
github manually merged commit 7fb6676674 into gh-pr/1436/base 2026-11-29 00:27:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1436
No description provided.