Texture store: switches for the most its queue and memory hold (unset as before) #404
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/404"
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 Belobug/VIctory-Belobug-AMD. Originally posted by Esteban-V on 2026-11-27T00:03:44Z.
The texture store (
VICTORY_TEXTURE_STORE, off by default) has two memory limits that cannot be changed, incrates/victory-gpu/src/texstore.rs.keptholds up toKEPT= 4 GiB of levels (texstore.rs:36) and nothing in it is ever let go. Jobs go through an unboundedmpsc::channel, and each new texture is copied whole (tiled.to_vec()inkeep(),texstore.rs:182) on the thread that read it, where it waits until the store's thread detiles and writes it. At world load many textures arrive at once (an audit estimate is about 24,000), so the bytes waiting have no limit. This adds two switches for those limits.VICTORY_TEXTURE_STORE_QUEUE_MB: the most bytes of copies waiting. A newQUEUEDcounter is checked withfetch_updateafter theseeninsert and before the copy. A texture over the limit is not copied, its digest is taken out ofseenso a later read offers it again, and a "not kept with the queue full" count goes up. A texture is always taken when the queue is empty, so one larger than the limit can still be stored.continue;keep()subtracts them too ifsendfails.VICTORY_TEXTURE_STORE_KEPT_MB: replacesKEPTinkept()andfind(). With0nothing is held, and every texture found is read from the folder on the recording thread that asks; the doc comment says so.admit) and the MB parser are pure functions, each with a test.Testing
windows-latest): Clippy, default tests and diagnostics tests pass (run).x86_64-pc-windows-msvcon a macOS host (cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings, default and--all-features).queue_limitandmb_readadded.Imported from Belobug/VIctory-Belobug-AMD. Originally posted by MamaLeVrai on 2026-11-27T01:23:05Z.
Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At
54a696e: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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.