play: default readback pool and NaN scrub, add 8 GiB VRAM tier and RT caps #74
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/74"
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 Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T03:32:54Z.
Summary
Addresses 8 GiB VRAM texture starvation, unpooled readback churn (
54.1 sallocation overhead in015834playtest logs), and Series X 1440p / RT out-of-budget stalls when launching viavictory play(including F1 menu restarts):crates/victory-gpu/src/streamline.rs):adapter_vram_mb() -> Option<u64>backed by DXGIGetDesc1().DedicatedVideoMemory >> 20(re-exported viavictory_hle::streamline).apps/victory/src/play.rs):VICTORY_READBACK_POOL=1(VICTORY_READBACK_POOL_MB=64) andVICTORY_NAN_SCRUB=1inSETTINGS, plusVICTORY_NO_WATCHDOG=1by default (overridable via F1 menu /--set).VICTORY_LEVELS_ON_DEMAND=0(preservingVICTORY_HELD_LEVELS=1in the unified pool; enabling tiledLEVELS_ON_DEMAND=1allocated1,088–1,152 MBof un-reclaimed 64 MiB tiled heaps and increased Series S peak VRAM by+969 MB).<= 9216 MiBdedicated VRAM (LOW_VRAM_THRESHOLD_MB), applies bounded headroom guards:VICTORY_CARD_WINDOWS_MB=256,VICTORY_CARD_ROOM_FOR_TARGETS_MB=512,VICTORY_DSTORAGE_STAGING_MB=64, andVICTORY_CARD_BUFFERS_MB=1024(512when RT is enabled, avoiding the194.9 ms/sMakeResidentthrash observed when capping Series X card buffers to512 MB).VICTORY_TEXTURE_MIP_DROP=1(VICTORY_TEXTURE_MIP_DROP_MIN_SIZE=1024) when running Series X (!series_s) or RT, leaving Series S non-RT on 100% native mips.VICTORY_BVH_BUILDERis set (VICTORY_RT_MEMORY_MB=768on<= 9216 MiB,1024above, plusVICTORY_BVH_FAULTS_ALL=8192).VICTORY_SLOT_EVICT_PERCENT=79/LOW=75whenVICTORY_TEXTURE_ROOM_PERCENT <= 80(FG active) so eviction stays aligned with the texture room line.--setoverrides.Local Verification
cargo +1.98.1-x86_64-pc-windows-gnu xtask policy: passed (301 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask:6/6passedcargo +1.98.1-x86_64-pc-windows-gnu test -p victory:29/29unit tests + integration tests passedcargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings:0warningscargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings:0warnings--releasebuild (53.8s,objdump -pWindows system DLLs only) and--features diagnostics --releasebuild (1m19s): both succeededLive 75s GPU Verification (
--features diagnostics, RTX 4060 Ti 8 GB)pr74-series-s-final, 10/11 gates PASS):12.0 fps(83.5 ms,+3.10 fpsvs8.9baseline), GPU0.9 ms, copyback12.7 ms,0crashesmapped()rate5.81 ms/s(1073.6 mstotal, longest16.8 ms)40649uploaded,final_waiting=1787(vs7121baseline)used_max=6182 MBvsbudget_min=6668 MB(over=0 MB,room_false=8.3%; A/B VRAM gate+318 MBvs5864 MBbaseline due to1024 MBcard buffer headroom +64 MBreadback pool under6668 MBDXGI budget)luma=104.4,near_black=0.0%,edge_energy=7.3,magenta=0.0%pr74-sx-mipdrop1024-cb1024):9.95 fps(100.25 ms,+1.05 fpsvs8.9Series S baseline),0crashesmapped()rate28.42 ms/s(longest15.5 ms, vs194.86 ms/swhenCARD_BUFFERS_MB=512)used_max=6497 MBvsbudget_min=6797 MB(over=0 MB,room_false=91.7%under full1024 MBcard buffers)luma=104.72,near_black=0.01%,edge_energy=8.13,magenta=0.0%Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T04:15:59Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
Code, logic, and unit tests look clean and CI is passing. Because this PR changes
victory playlauncher defaults, adds DXGI dedicated VRAM detection, and introduces 8 GiB VRAM / RT memory caps, a local real-GPU smoke test is recommended before merging.Verified Changes
crates/victory-gpu/src/streamline.rs: Refactorsdefault_adapter()throughdefault_adapter_desc()and exportsadapter_vram_mb() -> Option<u64>usingGetDesc1().DedicatedVideoMemory >> 20on the selected hardware adapter (withEnumAdapters1(0)fallback). Safe and consistent with existing DXGI queries.apps/victory/src/play.rs:VICTORY_READBACK_POOL=1,VICTORY_READBACK_POOL_MB=64, andVICTORY_NAN_SCRUB=1toSETTINGS, plusVICTORY_NO_WATCHDOG=1insettings_with_vram()(all applied before saved F1 menu and--setoverrides).victory_hle::streamline::adapter_vram_mb()inprepare()and applies 8 GiB headroom guards whenvram_mb <= LOW_VRAM_THRESHOLD_MB(9216MiB):VICTORY_CARD_BUFFERS_MB(1024, or512with RT),VICTORY_CARD_WINDOWS_MB=256,VICTORY_CARD_ROOM_FOR_TARGETS_MB=512,VICTORY_DSTORAGE_STAGING_MB=64, andVICTORY_TEXTURE_MIP_DROP=1(MIN_SIZE=1024) on Series X (!series_s) or RT.VICTORY_BVH_BUILDERfrom--set(taking precedence over saved menu entries) and applies RT caps (VICTORY_RT_MEMORY_MB=768on low VRAM /1024otherwise,VICTORY_BVH_FAULTS_ALL=8192).VICTORY_SLOT_EVICT_PERCENT=79/VICTORY_SLOT_EVICT_LOW_PERCENT=75whenVICTORY_TEXTURE_ROOM_PERCENT <= 80(framegen active).--setoverrides.Notes for Testing / Follow-up
> 9216MiB) with RT enabled,else if rt_onalso capsVICTORY_CARD_BUFFERS_MB=512; worth confirming this does not cause unnecessaryMakeResidentchurn on 12–24 GiB cards (though it remains overridable via--set).VICTORY_NO_WATCHDOG=1is set unconditionally insettings_with_vram()rather than inSETTINGS; functionally equivalent since it precedes menu/--setoverrides, just slightly split from the other universal defaults.VICTORY_READBACK_POOL=1/64 MiB(harmlessly redundant if both land).Generated with Antigravity CLI (
agy).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T06:58:24Z.
Completed live 75s Series S and Series X 1440p GPU verification on
2e378b5(RTX 4060 Ti 8 GiB):pr74-series-s-final): reached 3D world (15windows, max12644draws),12.0 fps(83.5 ms, vs8.9 fpsbaseline,+3.1 fps), max VRAM6182 MB/6668 MBbudget (over=0 MB), waiting1787(vs7121),mapped()5.81 ms/s,crashes=0,no_host_texture_errors=0,untranslated=1, 24 captured frames (luma=104.4,edge_energy=7.3,0.0%near-black/magenta; visually inspectedframe-8619.pngandframe-8771.png).pr74-sx-mipdrop1024-cb1024): reached 3D world (14windows, max12827draws),9.95 fps(100.25 ms), max VRAM6497 MB/6797 MBbudget (over=0 MB), waiting8156,mapped()28.42 ms/s,crashes=0,no_host_texture_errors=0,untranslated=1.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T16:41:15Z.
Automated RTX 4060 Ti 8 GB hardware verification PASSED (
playtest/wave4-no141vsorigin/main17a2f09— 5/5 A/B gates PASS):cargo test(RTX 4060 Ti):victory39 passed, 0 failed;victory-gpu552 passed, 0 failed (37 ignored).scripts/verify-world.ps1, DLSS Quality + golden autosave):11.9 fps(84.15 ms) vs11.2 fps(88.9 ms) baseline (+0.70 fps, min improved7.0vs4.6, preparing43.2 msvs45.1 ms)5641 MBvs5760 MB(-119 MB,0 MBover budget)final_waiting=5924vs5753(PASS)mapped_rate=8.69 ms/svs14.96 ms/s(-42%)frame-3923.png,frame-3955.png), luma66.54, edge energy2.1, magenta0.0%.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T17:07:06Z.
Follow-up from RTX 4060 Ti 8 GB interactive playtest with DLSS FG 2x (
mainde028c0):5524–5690 MBused out of6460–6628 MBDXGI budget (85.5%–85.8%) exceedsVICTORY_TEXTURE_ROOM_PERCENT=80, causingroom()to starve new textures (no room for new ones so_far=92500-> black/missing or delayed textures). Tracked in https://github.com/Androtim/MiniVI/issues/149.