Repository navigation
Conversation
Pool readback leases and submission scratch, retire completed staging without a timed quarantine, and reserve actual texture heap growth. Preserve ordinary held mip levels with tiled resources enabled, release empty blocks outside pool locks, and index occupied descriptor owners. Add regression coverage and document ownership, pressure, and validation limits. Keep memory deferrals retryable in both rendering and diagnostics.
|
I tested a small follow-up on top of 46fe6f8 to let the CPU texture-read pool give memory back after a burst. The current cap is 63.75 MiB across eight classes, and idle buffers stay cached after streaming subsides. The follow-up ages each slot from its return to the pool. The existing host sweep releases slots idle for 10 seconds, or 2 seconds under host memory pressure. A hot slot can still be reused and a checked-out buffer remains owned by its reader. Frees happen outside the bin mutex. In three fresh-process A/B runs on Windows, I touched two buffers in every size class and advanced the test clock to the pressure sweep. Idle pool bytes stayed at 63.75 MiB on this PR head and fell to 0 with the follow-up. Windows private commit fell by about 62.9 MiB from the filled state in each patched run. This is an isolated CPU-memory measurement. In-game frame time and VRAM still need separate measurements. The diagnostic build passed 17 texture tests on the RTX 4060 and 17 under WARP, plus 21 related residency, spare-cache and readback tests. The new regression exercises a cold slot alongside a warm slot in the same bin, a sweep while a lease is active, and a sweep whose timestamp predates a return. The tested, cherry-pickable commit is tyr0nsur@28ea2fd. |
Cached placed-texture identities and per-worker read buffers can retain their high-water marks indefinitely. This gives texture identities explicit owners through GPU use, collects unused metadata, bounds idle CPU read storage, and fixes a swap-chain buffer being released while a preceding Present still uses it.
Stacked on #3828; merge that dependency first. The new commit is
46fe6f81330507adbd9e9008c82114c1521490a1, on top ofde352e668a3c62ce68d3706909c769ba1676ffac. Upstream main was refreshed before publication and remains41adb55167fa778fcaa5dc36fa18a1fa8dacd657. Until #3828 lands, GitHub's main comparison includes both commits.What it changes
Heldtype. Lookups retain under registry locks; placed views, upload jobs/preludes, list identity keys, and mirror/ambient lookups keep resources alive for their use. List keys release ownership after submission completion and reset.VICTORY_CARD_STEPS_GATHERandVICTORY_PORT_CBVremain off by default. The raw-CBV path overlaps fix(gpu,shader): support VICTORY_PORT_CBV=1 on capped 1M-descriptor GPUs (raw_views == 0) and fix subword raw CBV load #3396 and must be reconciled if both are merged.VICTORY_PLACED_OBJECTS=0,VICTORY_RESIDENT_SWEEP=0andVICTORY_READ_POOL=0disable the corresponding memory policies for comparison; ownership guarantees remain enabled. Seedocs/owned-texture-memory.mdfor lifetime and lock-order rules.The Linux RADV/Wine/vkd3d alias-mapping backend is not ported here. This does not remove every shadow copy or establish complete VRAM leak remediation.
How it was tested
Windows, RTX 4070 Laptop 8 GiB / 32 GiB system RAM, Series S, DLSS Ultra Performance, frame generation off. Optimized
diagbuilds with diagnostics. The archived game candidate SHA-256 isD67AB69545113A1A3922E3405E968CDEAF22B1FA34652D71698B2856B3578DB6; the published source was checked against its frozen source patch before committing.VICTORY_SCALAR_SPLITSkey test. The pool test consumed an earlier invalid-pipeline-library InfoQueue message; its fresh-process debug rerun passed. The full renderer/debug suite is not claimed clean.OBJECT_DELETED_WHILE_STILL_IN_USE, and exception0x87DinsideResizeBuffers, also with the new memory policies disabled. Afterward the isolated packed-format test passed with no D3D12/DXGI errors, and it passed in the final full suite.git diff --checkand the actual staged asset policy passed for all 19 new-commit text files. Full-tree policy still finds the unchanged long hex run invictory-loader/src/heap_sites/frame_users.rs.Remaining limits: dark arm/neck artifacts persist, including with metadata collection disabled; visual equivalence has not been established. City traversal, other GPUs and an extended leak/soak test remain unverified. The normal local executable was not replaced.
Checked for overlap
Implemented and tested with OpenAI Codex. No game assets, executable bytes, captures, shader dumps or private run logs are included.