[pr-feature] Limit speculative texture heaps under low local budget (opt-in) #5

Closed
Tristan1019-user wants to merge 1 commit from upstream-pr/5 into main
Tristan1019-user commented 2026-11-29 16:38:06 +00:00 (Migrated from github.com)

Imported from cocainebunnylaboratories/cblvictoryvi. Originally posted by Tristan1019-user on 2026-11-29T16:38:06Z.


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.

<!-- greyfinch-sync:cocainebunnylaboratories/cblvictoryvi:issue:5552796222 --> Imported from [cocainebunnylaboratories/cblvictoryvi](https://github.com/cocainebunnylaboratories/cblvictoryvi/pull/5). Originally posted by [Tristan1019-user](https://github.com/Tristan1019-user) on 2026-11-29T16:38:06Z. --- ## 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.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
cocainebunnylaboratories/cblvictoryvi!5
No description provided.