Stop the placed-view leak; fixes from other forks #27
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/TaynanGT--Vice-Tay!27
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-27"
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?
@TaynanGT on GitHub · 2026-11-26 12:28 UTC · original
TaynanGT:fix/placed-view-leak→main· +656 −68 · 13 files · 14 commits · merged 2026-11-26 12:32 UTCStops the placed-view memory leak and brings in fixes from other forks.
The leak
Placed views (device methods 0x230/0x238) are keyed by address plus a shape number. The title leaves padding words unwritten, so the same view kept arriving with different garbage in them and minted a new shape each time. After about 30 minutes the shape space (2^22) filled up and every further view became a permanent view-table entry: 34.9 million entries and 16.7 GB after 70 minutes, private memory past physical RAM, frame preparation doubled, fps fell from ~20 to ~8–10.
A diagnostic build counted distinct values per word over the first million shapes. The noisy ones were all padding:
Fixes:
f07e54a2zeroes resource-description words 1 and 13 before keying (same finding as avatarmanz PR #206).ce914907zeroes the union words each SRV/UAV dimension doesn't use, and SRV word 3; unknown dimensions keep every word.d3626d25caps view-table entries no resource releases at 1M (VICTORY_OWNERLESS_VIEWS, 0 keeps all), oldest first.40e9ea19keeps per-kind counts so the periodic memory line no longer walks the whole table (it took up to 49 ms at 30M entries).e7dee0fclogs the per-word counts at 1K/16K/128K/1M shapes (diagnostics builds only).Other fixes
31e8d23c,b883e5e0: dynamic descriptor slots go back to the pool when their flight lands (the pool of 2^18 ran dry under load and the picture turned white); the frame line reports slots taken.d15d8e7b: BC7 dictionary entry 0 reads all 32 indices.b7a99ac4(Senchsus, upstream #682):v_mul_legacy_f32treats denormal operands as zero.d8247162(PastiiJay): optional NaN guard on colour exports and typed stores (VICTORY_NAN_GUARD, part of the shader cache key).1bf62e10(beloooo): magenta left in the ambient probes is not treated as light.dbfb5a97(Flare, upstream #2031): heap samplers keep point mips when anisotropic.d8f70e3b,f1f52219: build and test follow-ups.Measured
RTX 4090, Ryzen 9 9950X3D, Series S profile, 30 minutes in the world, compared with the 70-minute run on main:
Over the same first 30 minutes the median went from 18.1 fps on main to 20.6 here, and this branch no longer degrades with time. Square blocks in clouds are still there.
Checks
ci-local.ps1: clippy with and without all features, workspace tests.🤖 Generated with Claude Code
@chatgpt-codex-connector[bot] on GitHub · 2026-11-26 12:28 UTC · original · edited 2026-11-26 12:32 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
f1f5221f1f5221ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-26 12:31 UTC · original · reviewed
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
f1f52219ecℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@ -11945,2 +11989,3 @@for x in vals {args.push(self.as_float(x));let f = self.as_float(x);args.push(self.nan_guard(f, false));@chatgpt-codex-connector[bot] on GitHub · 2026-11-26 12:31 UTC · original
With the default-enabled guard, a non-d16 typed buffer store through a UINT/SINT view corrupts valid integer values whose bits resemble infinity or a canonical NaN. For example, storing
0x7FC00000now writes zero, and0x7F800000becomes0x477FE000. This path also serves integer views—the existing d16 handling explicitly preserves integer bits through the float-typed handle—sostrict: falsedoes not make the transformation safe. Use the existinginteger_viewmetadata to bypass sanitization for integer formats rather than deciding from the stored bit pattern.Useful? React with 👍 / 👎.
github-bot referenced this pull request2026-11-26 18:37:33 +00:00
@ -11945,2 +11989,3 @@for x in vals {args.push(self.as_float(x));let f = self.as_float(x);args.push(self.nan_guard(f, false));@TaynanGT on GitHub · 2026-11-27 01:34 UTC · original
Confirmed on
cc9ed86. I opened draft #109 so typed buffer stores can keep UINT and SINT bits through the existing view-kind metadata. Float views still use the guard. The draft includes a synthetic readback test and advances the translation cache version so existing cached DXIL is replaced on use. The Windows workflow is pending.