GPU: distinguish live texture allocations from the title-memory index #3400
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
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
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
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/Marvisak--VIctory!3400
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3400"
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?
@AlanQiang0418 on GitHub · 2026-11-26 22:22 UTC · original
AlanQiang0418:codex/texture-census-scope→main· +8 −5 · 2 files · 1 commits · openCloses #3334. Coordination claim.
A depth twin contributes to the live host texture total. So does an old allocation that a command list still holds after another texture replaces it at the same address. The detailed report visits only current entries in the title-memory index.
The frame report now labels both populations and prints the indexed subtotal alongside the six existing categories. It sums their byte counts before rounding to MB, using the same traversal that supplies the breakdown.
Validation
cargo test --locked -p victory-gpu --features diagnostics --lib resource::tests -- --test-threads=1passed all 18 tests.cargo clippy --locked -p victory-gpu --all-targets --all-features -- -D warningspassed.live host textures: 4 (17 MB, 4 MB of them used by lists)andhost textures in the title-memory index: 8 MB. Releasing the command list reduced only the live total. After releasing every texture, both totals reached zero.AI-assisted with OpenAI Codex.
@Dukestar69 on GitHub · 2026-11-26 22:28 UTC · original · approved these changes
LGTM — verified on RTX 5090 (Windows / D3D12) against
origin/main(63bcca4).cargo test -p victory-gpu --lib resource:: -- --test-threads=1: 18 passed, 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@Jackster on GitHub · 2026-11-26 23:02 UTC · original
Windows 11,
63bcca4+ this PR, Radeon RX 7900 XTX:cargo test -p victory-gpu --lib: 231 passed / 0 failed / 1 ignored — same count as unpatched63bcca4.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.No test is added; this is compile/regression coverage for the memory-report split between live texture allocations and the title-memory index. Synthetic only. AI-assisted.
@fuzeofficlal on GitHub · 2026-11-26 23:02 UTC · original · approved these changes
Reviewed
4f077f2amerged ontomain(63bcca43) — clear and accurate diagnostic distinction between liveHostTextureallocations (texture_counts) and theMEMORYtitle-memory index (texture_census).Verification
cargo xtask policy: 191 files ok;cargo clippy --locked -p victory-gpu --all-targets -- -D warnings(both default and--features diagnostics): 0 warnings.resource::tests::passed on both a discrete NVIDIA RTX 5090 and WARP with--features diagnosticsandVICTORY_D3D12_DEBUG=1.VICTORY_D3D12_DEBUG=1) confirming the exact behavior documented incrates/victory-gpu/src/resource.rs:942and logged incrates/victory-gpu/src/host.rs:3087, 3118:MEMORY-indexed texture while a caller still holds the previousArc<HostTexture>reportslive_delta = 131072vsindexed_delta = 65536.HostTexture::newadds65536to live bytes while leavingtexture_census()unchanged.LGTM.
@andrewpozdnakov7-jpg on GitHub · 2026-11-27 11:24 UTC · original
I checked the actual frame log on
4f077f2and on main63bcca4with the same synthetic test on Windows/WARP 1.0.22. Four live textures accounted for 1,835,008 bytes, with two indexed textures accounting for 524,288 bytes. Main printed the old labels and no indexed subtotal. This PR printedlive host textures: 4 (2 MB, …)andhost textures in the title-memory index: 1 MB. The two indexed buckets each round to 0 MB individually, so the test also checks that the subtotal is rounded after the bytes are summed. All counts returned to baseline after release.The optional test-only commit is directly on
4f077f2. It fails on main at the frame-log assertion and passes with this PR. Runtexture_frame_report_distinguishes_live_and_indexed_byteswith--features diagnosticsand-- --ignored --test-threads=1; it runs alone because the counters are process-wide. The 18 existing resource tests passed on both revisions. Strict all-features/all-targets GPU Clippy and the asset policy passed on the test branch.If you take the commit, please retain the Git author. If folding it in, please add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.AI-assisted with Codex. Synthetic textures only.
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.