PLACED_RAW in resource.rs keeps every filler variant forever (synthetic load test: 1M variants = ~100 MB) #34
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/TaynanGT--Vice-Tay#34
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@welisonzika14-jpg on GitHub · 2026-11-26 15:45 UTC · original
Hi, I looked for other places that grow without a limit after #27, using a synthetic load test (no game files). I found one small one and no other.
What I tested (
#[ignore]tests, run with--ignored --nocapture, on mainfab5286, Windows 11, Rust 1.98.1, no GPU needed)descriptor::tests::placed_view_shapes_load: 1,000,000create_placed_srvcalls where only padding changes (resource words 1 and 13, SRV word 3, the unused union words 8 and 9).resource::tests::placed_filler_bookkeeping_load: 1,000,000texture_atcalls where only resource words 1 and 13 change.Long-lived tables in
victory-gputhat use a key taken from title bytesdescriptor.rsViews.shapes/shape_indexresource.rsPLACED_TEXTURESresource.rsPLACED_RAWresource.rsplaced_bytes_fromKNOWN(thread local)shadow.rsEXACTshadow.rsLOOSE,BUFFERStexture.rsSTAGING,THROUGH,HOST_WRITTEN,HOST_WRITTEN_ATforgetresource.rsSAID(pairs),texture.rsSAIDpipeline.rsSHADERS,pipeline/known.rs,library.rsUSED/SLOWNumbers (debug build, one run each)
PLACED_RAW, 1,000,000 asks at 100,000 addresses with different filler: +1,000,000 entries, private memory +102,196 KiB (about 100 bytes each). Without filler: +0.PLACED_RAWonly feeds thePLACED_TWINScounter, which is read in diagnostics builds. Today the insert and the scan run in every build, insidetexture_at, whilePLACED_TEXTURESis locked (resource.rsaround line 3065 onfab5286).Patch (below): the bookkeeping only runs with
--features diagnostics, and there it restarts at 16,384 entries. The ignored test then shows +0 entries (default build) and +576 entries, +536 KiB (diagnostics build).cargo test -p victory-gpu --lib --locked: 347 passed, 0 failed, 38 ignored.vt-load.patch
Limits
shadow.rs,texture.rs) were not exercised; they need the GPU host and real title memory.Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
@TaynanGT on GitHub · 2026-11-26 19:18 UTC · original
The C01 audit confirmed that
PLACED_RAWis still unbounded on main. #35 compiles the bookkeeping out of default builds and caps it at 16,384 variants in diagnostics. The independent synthetic result in the PR confirms bounded growth. I have queued CI for that revision.@TaynanGT on GitHub · 2026-11-26 19:29 UTC · original
The fix is on
mainin #35. Default builds no longer collect raw filler variants. Diagnostic builds retain at most 16,384 entries and start a new sample when the cap is reached. The default and diagnostics suites and Clippy passed.