Skip to content

GPU: scale the texture allocation floor to the VRAM budget - #51

Open
Lkxex wants to merge 1 commit into
DexNom:mainfrom
Lkxex:gpu/texture-floor-dexnom
Open

Lkxex wants to merge 1 commit into
DexNom:mainfrom
Lkxex:gpu/texture-floor-dexnom

Conversation

@Lkxex

@Lkxex Lkxex commented Nov 25, 2026

Copy link
Copy Markdown

A fixed 2 GiB floor for texture copies can allow allocations before checking GPU memory pressure. Cap that floor at one third of the adapter's reported local budget, up to 2 GiB. The existing VICTORY_TEXTURE_BUDGET_MB override still takes precedence.

This is Dathinel's change from fxceless/victory-fork#1122, cherry-picked with attribution. Dathinel reported a median frame time of 370 ms before and 160 ms after on a 4 GB RTX 3050 Laptop GPU in the Series S prologue. That measurement is from the source PR.

Validation on this port: Windows diagnostics cargo check with tests enabled and 11 synthetic budget scenarios, covering low and high budgets, the override, and unavailable budget information. In-game performance and texture quality remain unmeasured on this fork.

On a card whose whole budget is about 3.2 GB (4 GB of memory) the fixed
2 GiB floor put the card a gigabyte over its budget from the first world
frame. Cards with 6 GiB of budget or more keep the 2 GiB.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit a360025758c240435bc881fc1e55b7de63ebdb0d)
LZJ-Developer pushed a commit to LZJ-Developer/VIctory that referenced this pull request Nov 26, 2026
A refused XMemVirtualAlloc or XMemAllocDefault handed the title a null in
silence, and the title then writes at null plus an offset, which reads
like a title bug. In Marvisak#289 the faulting write is at 0x217800, the
request's length 0x2173a0 rounded up to 2 KiB, so the base it built on
was most likely such a null.

At the commit limit, XMemVirtualAlloc now writes the same crashes.log
report the physical-page commit writes since DexNom#51 (the shared part is
`commit_refused`); other refusals, and a host heap out of memory, are
warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 65062e1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants