descriptor: placed views ignore padding words (views leak, confetti on faces) #58
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/trustno1-coder--VIctory-NVIDIA!58
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-58"
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?
@regiumlepidi on GitHub · 2026-11-27 15:27 UTC · original
regiumlepidi:pr-t1-views→main· +231 −4 · 2 files · 4 commits · merged 2026-11-27 20:07 UTCWhat this fixes
The title sometimes leaves words 1 and 13 of the 56-byte resource description unwritten when it creates placed views (device methods 0x230/0x238). Those two words are padding, but the view table keys on the whole description, so the same view arrives with different bytes and becomes a new entry every time. Nothing ever releases those entries.
On my machine, at 1440p on the Series X profile:
With these commits, on the same build and settings:
I can't give a clean fps number yet: the two sessions ended in different scenes (about 7,500 draws against 4,300), and frame time here follows draw count.
The commits
views_at_new_addresses_add_no_entriesbuilt its resource description with non-zero padding words, which commit 1 now zeroes on purpose. The test now keeps words 1 and 13 at zero.The first three come from JMAN730/project-flamingo (b1e0cd1d, merged there through PR #620) by way of Vice-Tay's fork (f07e54a, d3626d2, ce91490). I left out a fourth commit from that fork (18bc367, which keys the index by hash) because it conflicted here and I didn't want to resolve it blind.
Tests
cargo test -p victory-gpu --lib descriptorpasses on this branch.Setup
RTX 5070 Ti 16 GB, driver 617.42, Ryzen 7 9800X3D, 48 GB, Windows 11. Series X profile, 2560x1440, DLSS Quality. My own dump:
<game dir>. No game files are attached or quoted.This change and its testing were done with an AI assistant (Claude Code), and I checked the results on my machine.
🤖 Generated with Claude Code
@CuteBooty on GitHub · 2026-11-27 16:03 UTC · original
Independent confirmation from different hardware, in case it helps the review. I had arrived at the same cause separately and was about to open a PR for it when I saw this one, so I'm adding the numbers here instead.
Important: these numbers are from my own local patch of the same idea, not from this branch. Mine zeroes resource words 1 and 13, word 3 of SRV descriptions and word 9 of buffer views before the placed-view shape is looked up. It has no cap on ownerless entries. I have not built or run this PR's code.
Setup: RTX 3070 8 GB (driver 621.24), Ryzen 5 3600, 32 GB, Windows 11. Series S profile, 1920x1080, no DLSS, built from source. Ordinary open-world play from a story save, driving and flying.
1010e023+ diagnostics, 30 min)d12eb1b2+ the patch, 37 min)What a per-word counter showed here before the fix: buffer views fill the table, not texture views, and the words carrying full-range garbage were resource words 1 and 13 and description words 3 (SRV) and 9. Zeroing the first element as well merged nothing further, so the padding is the whole story on this title. That matches what this PR's commits 1 and 3 zero.
No new picture fault in the 37 minutes with the padding zeroed. One session each, on different routes and different base commits, so read the memory row as indicative only; the shape counts are the solid part. Private memory still rose about 2 GB in the last six minutes of the second session with the shape table small, so there is some other grower that this does not address; I have not found its cause.
Not tested here: this PR's ownerless cap, Series X, AMD or Intel cards.
Measurements and this note were prepared with an AI assistant (Claude Code); the runs were played on my machine.
@Dukestar69 on GitHub · 2026-11-27 16:32 UTC · original · approved these changes
LGTM — verified on Windows (RTX 5090):
VICTORY_OWNERLESS_VIEWS, default 1M) cleanly prevents unbounded table growth while keeping resource-backed views intactcargo test -p victory-gpu --lib descriptor::passed (61/61, includingownerless_entries_are_capped,placed_views_ignore_unused_view_words, andplaced_views_share_resources_across_description_padding)cargo xtask policypassed (279 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@JohnTitor2003 on GitHub · 2026-11-27 16:47 UTC · original
Independent confirmation on a 32 GB PC, plus the fourth commit resolved.
Setup: RTX 5080 16 GB (driver 617.42), Ryzen 9 7950X, 32 GB RAM, Windows 11. Built from source at
d12eb1b2. Series X profile, 2560x1440, DLSS Quality, frame generation off, the launcher's defaults. My own dump; no game files attached.What I ran: not this branch as it stands, but the same three Vice-Tay commits (d3626d2, f07e54a, ce91490) cherry-picked onto
d12eb1b2, plus the fourth one this PR left out (18bc367, the shape index keyed by the shape's hash) and Vice-Tay's test update (f1f5221).Result (private bytes of the process, sampled every 2 s with typeperf):
d12eb1b2)On a 32 GB PC this is the difference between about 15 playable minutes and a whole session.
The fourth commit. 18bc367 conflicts here in one hunk only, at the end of
Views::shape: main hasself.shape_index.insert(shape, at), the commit hasinsert(key, at)followed byknown_shapeand a diagnostics-onlylog_shape_words. Taking the incoming side resolves it; nothing else needed changing. With itcargo test -p victory-gpu --lib descriptorpasses (61 tests), and the 20-minute run above includes it. I can open it as a follow-up pull request on top of this one if that is useful.Two
indirect::testsfail on my machine on unmodified main as well as with these commits (host_list_budget_starts_empty_at_each_submission,warp_batch_charges_every_execution); they are unrelated to this change.The credit for the fix is Vice-Tay's and project-flamingo's, as the description says; what I'm adding is a measurement on 32 GB and the conflict resolution.
Tested and written with an AI assistant (Claude Code); the runs were on my machine.