gpu: make texture pool block size configurable #1966
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1966"
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 tharun-37 on 2026-11-29T04:36:18Z.
Addresses part of #1576 (pool block size configurability).
Adds \VICTORY_POOL_BLOCK_MB\ environment variable (16, 32, 64, 128, 256 MiB) to configure the texture pool block size. Default remains 64 MiB. The block size is read once at startup and cached.
The 64 MiB default works well for larger VRAM cards, but on 8 GB cards it causes internal fragmentation (hundreds of MiB to >2 GiB trapped in partially-filled 64 MiB heaps). Users can now set \VICTORY_POOL_BLOCK_MB=16\ or \32\ to reduce fragmentation on smaller VRAM cards.
Tests use \TEST_BLOCK\ constant (64 MiB) and \set_test_block_size()\ helper to ensure deterministic test behavior regardless of environment.
Validation: \cargo test -p victory-gpu --locked\ (589 tests pass); \cargo check --workspace --locked; \cargo xtask policy\ (pre-existing lower.rs size violation unrelated to this change).
AI-assisted (OpenCode).
Pull request closed