Check VRAM before allocating first streamed textures #3406
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3406"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Kitrae on 2026-11-29T22:51:29Z.
Refs #3374
What it changes
The background pass can admit a first texture upload based on its title footprint and free space in the pool. If placement finds no usable range, the allocator can then request a 64 MiB heap even for a small texture.
VICTORY_FIRST_UPLOAD_VRAM_GUARD=0to compare the previous behavior with the same build.How it was tested
cargo test -p victory-gpu --lib --locked -- --test-threads=1reported 917 passed, 1 failed and 60 ignored. Upstream716a0c99reported 914 passed, 1 failed and 60 ignored. Both failed the same shader-cache check forVICTORY_SCALAR_SPLITS.Checked for overlap
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tyr0nsur on 2026-11-30T06:26:43Z.
I tested
446f0a5on a Windows RTX 4060 8 GiB, merged locally onto41adb55. A test-only input set the guard's headroom. The textures, heaps, residency calls, and DXGI measurements used real D3D12. All 12 first-upload tests passed.VICTORY_RIPE_BLOCKS=12(the pool default when unset). Pool size and DXGI local usage both rose by exactly 64 MiB. WithVICTORY_RIPE_BLOCKS=0, the same take added zero bytes. Both shipped launchers set0, and the two v2026.11.29.05 captures from this RTX 4060 used0as well. The extra ahead block therefore does not explain their VRAM growth. PR #2038 also suppresses ahead growth after over-budget pressure is detected while retaining the preference for ripe blocks.Could the growth callback distinguish a required block from an ahead block so the latter can have a separate headroom threshold? The existing rationale for ripe blocks makes a matched gameplay run worth doing before changing the default. This allocator test leaves FPS and in-game texture latency open. Review assisted by Claude Opus 5.5.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:52:31Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed