Memory switches: idle times for staging and windows, and the most a read buffer keeps #374
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!374
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-374"
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?
@Esteban-V on GitHub · 2026-11-26 22:50 UTC · original
Esteban-V:perf/idle-cache-knobs→a-publier· +89 −3 · 2 files · 1 commits · openWith 12 GiB or more free, staging buffers (system memory the size of each texture) and loose windows are kept for five minutes after their last use (
ram_idle_ms, called fromcrates/victory-gpu/src/texture.rs:521andshadow.rs:3009), and each thread's texture read buffer stays at the size of the largest texture it ever read. This adds three switches, unset by default, to shorten those.VICTORY_STAGING_IDLE_MS: replaces the computed idle time intexture::let_go_idle, never below 2 s.VICTORY_WINDOW_IDLE_MS: the same for windows inshadow::let_go_idle. The existing RAM bands (VICTORY_WINDOW_BUDGET_MB) still shorten it under pressure.VICTORY_READ_KEEP_MB: a read buffer over this is freed after the read; the next read makes it again.references,retire,IDLE_FRAMES); only the duration does. Env vars are read once, outside the sweep closures.To A/B:
VICTORY_STAGING_IDLE_MS=10000 VICTORY_WINDOW_IDLE_MS=10000 VICTORY_READ_KEEP_MB=32with the memory line.Already merged in DoubleGhosty/cool_fox (cf3f615).
Testing
windows-latest): Clippy, default tests and diagnostics tests pass (run). The first attempt hithost::refresh_tests::unchanged_ranges_are_known, a write-watch timing test in a file this PR does not touch; the re-run passed.x86_64-pc-windows-msvcon a macOS host (cargo clippy --workspace --all-targets -- -D warnings, default features and--all-features).an_idle_override_is_two_seconds_or_moreanda_read_buffer_over_the_most_is_let_goadded.@MamaLeVrai on GitHub · 2026-11-27 00:22 UTC · original
Tested on an RX 6950 XT 16 GB (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release, at
7ae8a2f:cargo test --release -p victory-gpu --lib398 passed, 0 failed, 34 ignored.AI-assisted (Claude Code); no game data.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.