feat(gpu/resource): align slot eviction to queue byte line and keep 512 MiB headroom #265
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!265
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/265/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-30 22:01 UTC · original
Androtim:feat/iter258-gpu-8gb-vram-keep-free-and-evict-alignment→main· +229 −31 · 1 files · 1 commits · closed without mergingSummary
slot_evict()withroom()incrates/victory-gpu/src/resource.rsby counting reserved bytes for buffer copies and render targets viaqueue_use(VICTORY_SLOT_EVICT_KEPT=0restores raw count) and bounding eviction start/stop thresholds by the texture queue's exactroom_line(budget)byte line viaslot_plan_for_queue.VICTORY_TEXTURE_KEEP_FREE_MB(default 512 MiB,0disables) dynamic headroom cap viadynamic_texture_capso unmanaged host texture growth stops before pushing 8 GB GPUs past DXGI budget or starving DLSS/Frame Generation and render targets.VICTORY_TEXTURE_SOFT_MBand tighten idle sweeps viasoft_keepagainst either the explicit soft budget or the dynamic headroom cap.soft_keepsweep tightening.Verification
xtask policy: passed (315 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu resource:: -- --test-threads=1: passed (37 passed, 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings: passed (0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --features diagnostics --all-targets -- -D warnings: passed (0 warnings)@Androtim on GitHub · 2026-11-30 22:04 UTC · original · edited 2026-11-30 23:03 UTC
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
Changes are well-scoped to
crates/victory-gpu/src/resource.rs, CI is passing, and the new unit tests coverdynamic_texture_cap_for,soft_keep,counted_use,slot_plan, andslot_plan_for_queue.What looks good
slot_evict,queue_use,slot_plan_for_queue): Countingcrate::shadow::card_room_kept() + targets_room_kept(budget)lesscrate::pool::texture_room()and capping the start threshold atroom_line(budget) - 1(with a 6% stop gap) alignsslot_evict()withroom()'s refusal line. Raising the per-pass cap to768 MiBwhenused > budgetis a reasonable safeguard against runaway over-budget usage.keep_free_bytes,dynamic_texture_cap_for,soft_keep): PreservingVICTORY_TEXTURE_KEEP_FREE_MB(default512 MiB,0disables) viabudget - keep - (used - host_textures)saturates cleanly and integrates into bothroom()andlet_go_idle()(with explicitVICTORY_TEXTURE_SOFT_MBtaking precedence over the dynamic cap inlet_go_idle()).Notes & minor nits
texture_floor_bytes: Inroom(),dynamic_texture_cap(memory)is checked beforeif filled < floor { return true; }. When non-texture allocations plus textures are already within 512 MiB of DXGI budget, this intentionally prevents the floor from pushing VRAM over budget, but because it is enabled by default it should be smoke-tested on a real GPU (especially 8 GB cards) to verify it does not cause premature texture refusal or sweep thrashing.room()readsHOST_TEXTURES[1]insidedynamic_texture_cap(memory)and reads it a second time immediately afterward.counted_useuses+ keptwhereasweighed_bytesusessaturating_add(kept).queue_usematches the base formula inweighed_bytes, without theVICTORY_ROOM_REAL/blocks_fullfloor used byweighed().Verdict
needs-gpu-test— logic and unit tests look solid and CI is passing, but because this changes default VRAM budgeting, texture admission (room()), idle sweeping (let_go_idle()), andslot_evict()thresholds, a local real-GPU smoke test is warranted before merging.Generated with Antigravity CLI (
agy).@Androtim on GitHub · 2026-12-01 01:31 UTC · original
Maintainer triage (strict merge gate): holding under
triage: needs gpu test.Before merging any performance or VRAM PR, we require isolated plain
--release(no--features diagnostics) A/B measurements against currentmain(d79b943) showing:median fps(must not regress)preparing msandcopyback ms(must not increase)VRAM max/ over-budget MB andfinal_waitingtextures (must not increase)untranslatedshaders (must not increase) and0crashes / DRED(Combined-stack
--features diagnosticsnumbers alone cannot pass the perf/VRAM gate because diagnostics instrumentation distorts frame timings and combines unrelated changes.)@Androtim on GitHub · 2026-12-01 16:14 UTC · original
Closing as superseded to keep the PR queue focused on core engine bottlenecks: #281 already brought 1440p VRAM under budget (over = 0 MB) with dynamic headroom-reactive spares, and deep audit #282 confirmed the remaining 4K #149 eviction dead-end is in descriptor/host.rs ( abled_lately) and placed-texture
eferences == 1 rather than slot_evict byte thresholds. The real #149 dynamic reclaim fix should land directly against current main.
Pull request closed