VRAM accounting and eviction count the mapped tiles of levels-on-demand textures (port of LooperSalty/AnyXboxX#287) #468
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/468"
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 avatarmanz/VIctory-7900XTX. Originally posted by GiovanniFadanelli on 2026-11-27T14:00:44Z.
This is a port of Mauro Alvarez's LooperSalty/AnyXboxX#287 (commit
806d1419), cherry-picked through zocram4cc/victory-linux-perff9e8f84. The authorship is kept.What and why
Levels-on-demand host textures (
HostTexture::new_tiled) sethost.bytes = 0, because their VRAM lives incrate::tiles::Tiled. Several accounting and eviction paths incrates/victory-gpu/src/resource.rsstill readhost.bytesdirectly, so they see 0 bytes for every tiled texture. The budget then under-counts VRAM, and eviction never picks those textures. These paths now readcard_bytes(): the mapped tiles'given_bytes()for reserved textures, andhost.bytesotherwise. There is no switch; this is an accounting fix only. Onlyresource.rschanges (+76/−11).Testing (Windows 11, Ryzen 7 9800X3D, RX 9070 XT, Rust 1.98.1)
resource::tests::reserved_texture_copy_state_counts_mapped_tiles: passes.cargo test -p victory-gpu --all-features --locked --no-fail-fast -- --test-threads=1: 444 passed, 1 failed, 36 ignored. Unmodifiedmain(014d52de) gives 443 passed, 1 failed, with the same failing test:timeline::report::tests::real_waits_are_recorded_with_who_ended_them. It fails only inside the full run and passes on its own on both, so the failure predates this PR.cargo clippy --workspace --all-targets --all-features -- -D warningsstops at 4transmute used without annotationserrors invictory-loader's tests. These are the same on unmodifiedmain, and this PR does not touch that crate.card_bytes(), which this PR adds), and no in-game measurement of VRAM or eviction.🤖 Generated with Claude Code
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.