gpu(pool,resource): gate new texture blocks under the VRAM line with 8 GiB scaling #48
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!48
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/48/head"
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?
@Androtim on GitHub · 2026-11-28 13:57 UTC · original
Androtim:feat/iter62-texture-pool-vram-gate→main· +726 −63 · 6 files · 1 commits · closed without mergingSummary
Ports
fxceless/victory-fork@2eade68("The card stays under its memory budget: no new texture block past the texture line") with MiniVI's8 GiBVRAM scaling andTold::Heldwake-up adaptations so new 64 MiB texture blocks stay within the GPU's memory line without stalling texture streaming on constrained 8 GiB budgets:pool.rs: AddVICTORY_POOL_GATE(1default),VICTORY_POOL_FULLEST(0default inplay.rs),Pool::no_fit/Block::no_fitfast-skip cache,waiting/waitsthread-local gate,BLOCKScounters,fill()diagnostics,freed/freed_since()rested-piece wake tracking, and 2 unit tests.resource.rs: Addblock_room/block_fits,weighed/blocks_full,by_address_room(budget, used, len, pct)/by_address_fits,targets_to_come/targets_to_come_bytes(settling withtargets_room_kepton<= 9 GiBcards while keeping fullmost - targetson>= 12 GiBcards),!crate::pool::waits()guards inhostedandhost_texture_as, 9-termroom_terms, and 3 unit tests.draw.rs: AddHEAP_TEXTURES_NO_PLACEcounters, holdno_placeslots underTold::Held(frame + most)capped at 1024 refusals/pass, and wake held slots when room returns orpool::freed_since()reports freed pool space.host.rs: Log the 9-term texture-queue room breakdown andtexture blocks:telemetry inMeter.shadow.rs: Passpctfrommemory_card_budgetintocrate::resource::by_address_room.Rig Specs Tested On
32.0.16.2124Run Settings & Profile
release&diagnosticsrelease builds @0a46bbe(CARGO_TARGET_DIR=D:\victory-build\minivi,RUSTFLAGS="-C link-self-contained=yes")series-s—720poff(ambient_specular_active=true)DLSS qualityoffVICTORY_*Overrides:D:\victory-build\verify-tools\verify-world.ps1(matchingapps/victory/src/play.rsSETTINGS+VICTORY_POOL_FULLEST=0,VICTORY_D3D12_DRED=light,VICTORY_CARD_ACCOUNTING=1,VICTORY_CAPTURE_WORLD=1)max_draws=11295,world_windows=15), 75 seconds in-world capture (D:\victory-data\verify-runs\pr48-texture-pool-vram-gate-v3)Measurements & Verification
11.0 fpsmedian (9.7 fpsmean,0.7 fpsmin,90.8 msmedian frame time;+2.10 fpsvsbaseline-main8.9 fps)5681 MBmedian /5707 MBpeak VRAM against6606 MBmin DXGI budget (0 MBover budget;-157 MBpeak vsbaseline-main5864 MB;46pool blocks =2944 MB,231–241 MBfree in blocks,room_false=13.3%); texture queue47355uploaded,3790final waiting (-3331vsbaseline-main7121),2426no_placelooks19/24lit, median luma104.11(+0.91vsbaseline-main103.2), edge energy7.2(+0.09vs7.11),0.0%near-black / magenta / cyan (inspectedframe-6889.png&frame-7827.png)0crashes,0no_host_textureerrors,mapped()rate37.44 ms/world_sec(38400calls,3470.6 ms, max11.0 ms), all11/11verify-worldgates PASScargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy(294 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask(6 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings(0warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings(0warnings)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib -- --test-threads=1(453 passed; 0 failed; 36 ignored)cargo +1.98.1-x86_64-pc-windows-gnu build -p victory --release+objdump -p(0non-system MinGW DLLs) &--features diagnostics --release@Androtim on GitHub · 2026-11-28 18:48 UTC · original
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
PR #48 cleanly ports texture-pool VRAM gating with 8 GiB budget scaling and
Told::Heldwake-up handling acrosspool.rs,resource.rs,draw.rs,host.rs,shadow.rs, andplay.rs. CI is passing and unit test coverage is solid.Verified Changes
crates/victory-gpu/src/pool.rs: AddsVICTORY_POOL_GATE(default on) andVICTORY_POOL_FULLEST(default on inpool.rs, explicitly set to0inapps/victory/src/play.rs),Pool::no_fit/Block::no_fitfast-skip caching (reset onadd()andreclaim()), thread-localwaiting()/waits()signaling,freed_since()rested-piece wake tracking,BLOCKScounters, andfill()diagnostics.block.roomaccounting stays consistent withRanges::takeandRanges::give.crates/victory-gpu/src/resource.rs&crates/victory-gpu/src/shadow.rs: Addsblock_room()/block_fits(),weighed()/blocks_full(),targets_to_come()/targets_to_come_bytes()(settling viatargets_room_kepton<= 9 GiBbudgets while retainingmost - targetson>= 12 GiBbudgets), andby_address_room()(wired intoshadow::by_address). Guardshosted()andhost_texture_as()withcrate::pool::waits()so deferred textures do not fall back to committed allocations or get permanently markedrefused.crates/victory-gpu/src/draw.rs&crates/victory-gpu/src/host.rs: Holds deferredno_placeslots inState::heap_texturesunderTold::Held(frame + most)(capped at 1024 refusals/pass), wakes held slots when room returns orpool::freed_since()reports freed pool space, and logs the 9-termroom_termsandtexture blocks:breakdown inMeter.Minor Non-Blocking Observations
pool::may_grow()cachesblock_room()for 100 ms (now() / 100 + 1); during a burst of texture allocations within a single 100 ms window, multiple 64 MiB blocks could be allocated before the cache refreshes.resource::block_fits()usesused + kept + POOL_BLOCK <= linerather thansaturating_add(unlikeby_address_fits()), though realistic VRAM values will not overflowu64.Next Step
Logic and unit tests look sound; because this changes VRAM budget gating, texture pool allocation, and
play.rsdefaults, a local real-GPU smoke test is warranted before merging.Generated with Antigravity CLI (
agy).@Androtim on GitHub · 2026-11-28 21:18 UTC · original
Closing as superseded duplicate of merged PR #2.
Pull request closed