Pool: empty texture blocks capped by the card's budget, behind VICTORY_SPARE_SCALE (#756) #1658

Manually merged
github merged 1 commit from github-bot/gh-1658 into main 2026-11-29 08:21:56 +00:00 AGit
Owner

@⁠xiepeixuan on GitHub · 2026-11-28 23:07 UTC · original
xiepeixuan:review/784-rebase → main · +89 −3 · 2 files · 1 commits · merged 2026-11-29 08:16 UTC

Refs #756

Replaces #784, closed by the owner for conflicts; rebased on d4b5d517.

What it changes

VICTORY_SPARE_SCALE is off by default. With VICTORY_SPARE_SCALE=1, the number of empty texture blocks is capped at min(limit, max(budget/32/BLOCK, ripe target, 8 staging blocks), 64). When normal retention is allowed, the default 12-block ripe target means up to 768 MiB in empty texture blocks on 8–24 GiB budgets instead of up to 4 GiB.

The cap is applied after main’s existing host-pressure choice, so pressure can still trim further. The ripe target and staging, upload, and shared pool retention are unchanged. texture_scaling_does_not_trim_more_staging_or_buffer_blocks exercises the shared allocation-time reclaim path: the texture pool trims to the scaled cap, while the staging and upload/shared ceilings do not change.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): None; unit tests only.
  • Before: Windows, plain main at d4b5d517: 21 passed, 0 failed, 2 ignored (baseline job).
  • After: Windows, 674be5e4: 23 passed, 0 failed, 2 ignored (fork job).
  • cargo test passed for the crates it touches: Yes — cargo test -p victory-gpu --lib pool.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #394 trims under host-memory pressure; #479 reclaims idle lists and fetch-buffer capacity under pressure; #1551 proposes a manually configured block limit. None caps empty texture blocks in proportion to the card’s DXGI budget.

AI-assisted (Codex). Not run in the game here. Needs a run on an 8-12 GB card with VICTORY_SPARE_SCALE=1 and =0.

**@⁠xiepeixuan** on GitHub · 2026-11-28 23:07 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1658) `xiepeixuan:review/784-rebase` → `main` · +89 −3 · 2 files · 1 commits · merged 2026-11-29 08:16 UTC Refs #756 Replaces #784, closed by the owner for conflicts; rebased on d4b5d517. ## What it changes `VICTORY_SPARE_SCALE` is off by default. With `VICTORY_SPARE_SCALE=1`, the number of empty texture blocks is capped at `min(limit, max(budget/32/BLOCK, ripe target, 8 staging blocks), 64)`. When normal retention is allowed, the default 12-block ripe target means up to **768 MiB** in empty texture blocks on 8–24 GiB budgets instead of up to **4 GiB**. The cap is applied after main’s existing host-pressure choice, so pressure can still trim further. The ripe target and staging, upload, and shared pool retention are unchanged. `texture_scaling_does_not_trim_more_staging_or_buffer_blocks` exercises the shared allocation-time reclaim path: the texture pool trims to the scaled cap, while the staging and upload/shared ceilings do not change. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): None; unit tests only. - Before: Windows, plain `main` at `d4b5d517`: **21 passed, 0 failed, 2 ignored** ([baseline job](https://github.com/xiepeixuan/VIctory-NVIDIA/actions/runs/46198215476/job/141144188060)). - After: Windows, `674be5e4`: **23 passed, 0 failed, 2 ignored** ([fork job](https://github.com/xiepeixuan/VIctory-NVIDIA/actions/runs/46198215476/job/141144188094)). - `cargo test` passed for the crates it touches: Yes — `cargo test -p victory-gpu --lib pool`. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #394 trims under host-memory pressure; #479 reclaims idle lists and fetch-buffer capacity under pressure; #1551 proposes a manually configured block limit. None caps empty texture blocks in proportion to the card’s DXGI budget. AI-assisted (Codex). Not run in the game here. Needs a run on an 8-12 GB card with VICTORY_SPARE_SCALE=1 and =0.
Reapply #784 after #394. Keep the existing host-pressure sweeps and staging, upload, shared, and ripe block retention.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 23:08:12 +00:00
github manually merged commit ae92a8ccf4 into main 2026-11-29 08:21:56 +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!1658
No description provided.