[pr-feature] Cap speculative texture heaps under local budget pressure (opt-in) #50

Closed
github-bot wants to merge 1 commit from gh-pr/50/head into gh-pr/50/base
Owner

@⁠Tristan1019-user on GitHub · 2026-11-29 16:43 UTC · original
Tristan1019-user:codex/headroom-spares → main · +57 −2 · 1 files · 1 commits · closed without merging

What it changes

Opt-in VICTORY_HEADROOM_SPARES=1: limit speculative empty texture heaps when the local DXGI process budget is getting tight. Below or at 2,560 MiB headroom, keep at most two existing empty texture heaps and at most one ahead. Exit the mode above 3,072 MiB so a brief crossing does not repeatedly drain and refill the pool. An unavailable budget does not fabricate a recovery. Required allocations, live pieces, retirement order, staging, texture resolution and the default behavior are unchanged.

How it was tested

The pool unit tests include a budget hysteresis check and a retirement/required-allocation check. The latter keeps a live and a resting piece while sweeping empty heaps, then makes a full-size demand allocation and verifies neither occupied range is reused. This is a controlled allocator test, not evidence that gameplay FPS improved or that the same number of heaps will be empty in a real scene. This policy cannot recover space trapped inside partially occupied heaps.

**@⁠Tristan1019-user** on GitHub · 2026-11-29 16:43 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/50) `Tristan1019-user:codex/headroom-spares` → `main` · +57 −2 · 1 files · 1 commits · closed without merging ## What it changes Opt-in `VICTORY_HEADROOM_SPARES=1`: limit speculative empty texture heaps when the local DXGI process budget is getting tight. Below or at 2,560 MiB headroom, keep at most two existing empty texture heaps and at most one ahead. Exit the mode above 3,072 MiB so a brief crossing does not repeatedly drain and refill the pool. An unavailable budget does not fabricate a recovery. Required allocations, live pieces, retirement order, staging, texture resolution and the default behavior are unchanged. ## How it was tested The pool unit tests include a budget hysteresis check and a retirement/required-allocation check. The latter keeps a live and a resting piece while sweeping empty heaps, then makes a full-size demand allocation and verifies neither occupied range is reused. This is a controlled allocator test, not evidence that gameplay FPS improved or that the same number of heaps will be empty in a real scene. This policy cannot recover space trapped inside partially occupied heaps.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 02:23:46 +00:00
github-bot closed this pull request 2026-11-30 02:23:46 +00:00
Author
Owner

@⁠readmet3xt-lab on GitHub · 2026-11-30 02:01 UTC · original

Not taken: it is off by default, and the PR itself says it shows no gameplay gain. With #54's best-fit holes and the reclaim tick now in main, empty texture heaps are returned without it. If a run on an 8 GB card shows fewer black textures or fewer refused allocations with VICTORY_HEADROOM_SPARES=1 than without (two logs, same place), please reopen with them. Thanks.

**@⁠readmet3xt-lab** on GitHub · 2026-11-30 02:01 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/50#issuecomment-7266635835) Not taken: it is off by default, and the PR itself says it shows no gameplay gain. With #54's best-fit holes and the reclaim tick now in main, empty texture heaps are returned without it. If a run on an 8 GB card shows fewer black textures or fewer refused allocations with `VICTORY_HEADROOM_SPARES=1` than without (two logs, same place), please reopen with them. Thanks.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.