Repository navigation
Description
Goal
Reduce the native GPU backing and host commitment required to represent guest physical pages, without losing CPU/GPU visibility or compromising rendering correctness. Start with 16 GiB RAM / 6–8 GiB VRAM configurations; validate on NVIDIA and AMD.
Part of #1833 and #1773; coordinate with #1031. This is not a general memory, shader compilation or PSO optimization tracker.
Workstream status
| ID | Workstream | Owner / existing work | Tracking | Status |
|---|---|---|---|---|
| A | Deferred physical-home backing | CallMeBrado / Prime1997 (existing PR authors) | #1916, #3123 | GPU first exposure passes locally; subsequent write fails |
| B | Physical-page identity and dirty lifetime | Section-alias contributors / ZekkJJ (existing work) | #2293, #2294, #2307, #2308, #3074, #3075 | Follow-ups and independent validation needed |
| C | Unique backing attribution | Unclaimed here | #1773 | Need ownership breakdown at matched milestones |
| D | Redundant backing reclamation | Claim after identifying a measured owner | #2825, #2090, #3125 | Evidence/dependency gated |
| E | Independent hardware qualification | Open to testers | #42, #1607, relevant PRs | Open |
These are coordination statuses, not assignments. Existing PR authors retain ownership of their contributions. Check current heads and target branches before claiming anything. Use the existing issues/PRs for implementation discussion; open a child issue only for a distinct, reproduced defect not already tracked.
Why this deserves focused work
- Memory: defer GPU tiles for private physical page storage #1916 reports the following on an RTX 5090 (two 60-second retail runs):
| Metric | Baseline | Deferred backing |
|---|---|---|
| Sparse pool peak | 896 MiB | 320 MiB |
| Peak process commit | 14,596 MiB | 13,947 MiB |
- Independent results in #505 report approximately 2,600–4,400 active textures with all-zero sampled backing without aliasing, versus 690–790 with section aliasing and kernelx: preserve null scatter unmaps with physical aliases #3074/kernelx: check section page liveness for DirectStorage #3075. Visible scene content recovered. One run per configuration; zero samples are not automatically erroneous.
- A local section-dependent correction (
65d0d85e, not an upstream commit) preserved dirty records after all virtual views were removed. CPU/GPU regressions passed and previously flat-green intro frames recovered imagery. Upload staging high-water increased from 57 MB to 249 MB: lower upload volume can indicate missing required work. - Local qualification of the Memory: defer private physical-home GPU tiles on NVIDIA #3123 mechanism on an RTX 4060 Laptop GPU found an independent native copy/readback passes first exposure (
A7 / 00 / 38), but a later CPU write to the middle page returns0x5bon CPU and0x00on GPU. The apparent plain-commit/tile overlap is a hypothesis to verify against the normal upload and fence path. An attempted decommit/remap repair crashed and was reverted. Remap/destruction checks and retail savings are not yet established. This fixture is on the conventional path; the section dirty-record fix is orthogonal.
The invariant: guest physical identity, virtual mappings, native backing and content visibility are distinct. Unmapping is not destruction; backing allocation is not data synchronization; an API success is not proof of correct GPU contents.
How to claim
Comment claim: A/B/C/D/E — <specific mechanism> with the intended base/head, relevant existing PR, files, first experiment, hardware and whether you are implementing, reviewing or testing.
One implementation claim per contributor. If someone is already on the mechanism, test or review their work instead. A meaningful status update resets the 48-hour coordination window; inactive claims may be reopened after checking with the contributor. Link drafts/results here; keep detailed discussion in the corresponding PR or child issue.
Agent instructions by workstream
Give your agent the entire issue and the claimed ID. The following sections are intentionally collapsed for human readers. Agents should expand/read their claimed section and the common protocol before editing code.
A — Qualify deferred physical-home GPU backing (#1916 / #3123)
Inspect hle/kernelx.rs, hle/d3d12x/sparse.rs, hle/d3d12x/title_textures.rs and existing physical-page fixtures. Coordinate with the original PR authors; do not create another deferral implementation.
- Trace allocation, storage writes, dirty discovery, explicit exposure, tile mapping, upload, GPU use and subsequent writes. Identify the operation that actually requires native backing, including indirect shader accesses.
- Reproduce unnecessary allocations with deferral off and their absence with deferral on. Verify the exact post-exposure
0x5bdiscrepancy on the appropriate tree; do not attribute the local port's defect to an untested upstream head. - Follow the failing physical ID through home/away resolution, CPU commitment, tile mapping, dirty discovery, native upload and fences. Run the production synchronization path before the independent GPU consumer. Establish the failing boundary before changing
sparse::commit_rangeorsparse::committed; audit all callers. Do not blindly retry decommit/remap. - Exercise populated, untouched and late-written pages, consumed write-watch state, disabled storage hints, first exposure, repeated writes, mixed ranges, remap, unmap, free and failure cleanup. Zero-only checks cannot distinguish an unmapped tile from a correctly initialized one.
- Copy the entire expected range into a separate native readback resource after real fence completion. Never modify an aliased source to manufacture a test distinction. Verify GPU writes and subsequent CPU visibility where applicable.
Exit: no unnecessary pre-exposure tiles, byte-exact first and later native GPU reads, lifecycle regressions passing, and guarded retail allocation measurements. Keep experimental behavior off by default until qualified. If the existing PR is superseded or retargeted, coordinate there.
B — Physical-page identity and dirty-record lifetime
Inspect the section dependency stack (#2293/#2294/#2307/#2308), #3074/#3075 and relevant kernelx/{alias,sections,guards,lazy}.rs, kernelx.rs, dstorage.rs, title_textures.rs paths. Some files do not exist on main without the stack. Separate conventional and section-backed contracts.
Trace physical ID, home, backing, view, mapping generation, dirty state, consumer visibility and release. Verify late DirectStorage destination resolution; multiple aliases; null scatter unmaps; source validation before destructive remaps; independently freed neighboring pages; last-view removal; repeated writes; mixed section/conventional dirty-watch ranges; concurrent map/write/free; and failed allocation cleanup.
Dirty records must survive unmapping of live pages, not destruction. A reused address cannot inherit a dead page's state. A consumer clearing a dirty record must not conceal writes from another required consumer. Audit fault-handler and mapping lock ordering, protection restoration and failure paths. Check available lawful API contracts; do not equate current implementation limitations with console behavior.
For rendering failures, locate the first divergence: producer bytes → physical identity → CPU source → upload source → native backing → descriptor → sampled values. Test multi-plane/tiled textures or GPU-produced contents when the affected path requires them.
Exit: one failing-parent/passing-candidate regression per confirmed defect, independent GPU evidence where relevant, and a documented dependency on the section stack. Coordinate the existing local write-preservation correction before duplicating it.
C — Attribute unique physical backing and native allocations
Start with diagnostics, not allocator changes. Inspect kernelx, sparse.rs, vram.rs, gpu/uma.rs and existing memory/activity counters. Reuse counters and allocation identities where possible.
At matched completed-storage and native-submit milestones, distinguish unique committed guest/section backing, conventional homes, CPU-only and GPU-exposed homes, alias references, sparse mapped tiles versus actual heap capacity, native placed resources, coherent UMA, parked/quarantined/fence-pinned allocations and active/idle staging. Count metadata separately where known; report native object counts and unattributed commitment.
Track owner, allocation identity, capacity, lifetime and physical-page ID where practical. Reserved virtual address space is not committed backing; multiple mappings do not imply multiple copies; partially occupied pools still cost capacity. Do not sum overlapping series or infer opaque driver allocations from a subtraction without accounting for overlap.
Exit: identify and quantify one avoidable allocation cohort, with evidence of which representation is redundant. Publish the measurement before implementing a policy change. Coordinate staging budgets with #2639 and native texture object retention with #2743.
D — Reclaim demonstrated redundant backing safely
Depends on C or equivalent measured attribution. Review #2825 (CPU-copy reclamation), #2090 (direct sparse access), #2663/#2695 (GPU-to-CPU visibility), and #2538/#3125 (retirement). Do not duplicate them. Inspect sparse.rs, vram.rs, title_textures.rs, gpu/uma.rs and late_release.rs as applicable.
For one allocation cohort, establish the authoritative representation, all writers/readers (including bindless/indirect accesses), required mapping and fence ordering, whether layout/metadata permits sharing, reconstruction cost, and where memory pressure moves. Test the smallest evidence-supported change: deferred allocation, compatible sharing, reconstructible copy removal or fence-safe reclamation.
Do not free or reuse backing while recorded/in-flight work can access it. Reject missing/failed signals and device-removal sentinel completion. Avoid waits under locks required by the signal producer. Test delayed completion, multiple queues, resource release before completion, remap, reuse, failed signals and subsequent access. If considering idle reclamation, show actual reusable capacity or heap release; a smaller object count alone is not sufficient.
Exit: measured reduction at matched work, byte-exact GPU and CPU visibility where applicable, no premature reuse, and quantified restoration/upload/fault/runtime overhead. If there is no meaningful reduction, publish the negative result.
E — Independent hardware qualification
Prefer 6–8 GiB NVIDIA, 16 GiB RAM, AMD RDNA2/3/4 and higher-memory controls. Test an exact PR head against its documented dependency parent. Verify configuration actually reaches the mechanism; distinguish skipped, unsupported and executed cases. Test individual changes before agreed integration candidates.
Report on the relevant PR, using Tested / Not tested and actual hardware/driver/commands. General GPU reports belong in #42; follow #1607 for independent triage/batch validation. Run only reviewed code on suitable hardware, and use host safeguards. A tester who cannot safely run retail can still provide synthetic GPU evidence. Do not present a capability skip as coverage.
Exit: independent positive or negative results for the exact tested revision, including native GPU evidence and guarded memory/progress comparison where feasible.
Common agent protocol — baseline, implementation, validation and reporting
Read AGENTS.md, CONTRIBUTING.md, CLAUDE.md and relevant HANDOFF/design sections. Repository rules prevail. Inspect branch, HEAD, staged/unstaged/untracked state; preserve other work. Search issues, PR diffs and #1607; confirm current dependencies/targets. Do not commit, push or post without contributor authorization.
Execution: (1) trace actual production functions and ownership, (2) measure/reproduce on the baseline, (3) implement the smallest complete fix, (4) audit lock ordering, ranges, lifetime, cancellation and failure paths, (5) run focused tests, native GPU tests, release build and required full suite/smoke, (6) report evidence and limitations. A disproved hypothesis is useful; stop or narrow it rather than rewriting unrelated code. Keep one mechanism per PR, follow size/provenance/model rules and split independent changes. Do not weaken assertions, fabricate smoke blocks or report unexecuted tests as passing. The human contributor reviews every line.
Comparison: Record exact commits and dependency stack, feature settings, hardware, OS/driver/Rust/DXC, cache state, starting host headroom, guard settings, commands and stop reason. Compare at equivalent completed storage/submit milestones, not only equal elapsed time. Repeat where practical; report time and completed work alongside memory. Keep the official smoke runs on the required clean revisions and report any limitations rather than fabricating a compliant block.
| Metric | Baseline | Candidate |
|---|---|---|
| Peak process commit / resident memory | ||
| Minimum available RAM / system commit | ||
| Peak local / non-local GPU usage | ||
| Unique guest backing / sparse heap capacity | ||
| CPU-only / exposed home bytes | ||
| Active / idle / fence-pinned staging | ||
| Storage requests / confirmed native executions | ||
| Upload bytes / GPU readback mismatches | ||
| Runtime overhead / last verified stage / stop reason |
Use consistent units; separate each component in paired metrics. Mark unavailable counters unmeasured; do not add overlapping categories. Report the original and corrected regression results, actual full-suite counts including skips, smoke blocks where required, and independent hardware still needed. See CONTRIBUTING.md for exact current merge gates; a smoke pass alone does not prove memory savings or GPU correctness.
Acceptance criteria
A contribution must prove either a concrete correctness defect or a measured avoidable allocation. Optimizations must preserve required data and work, show native GPU correctness where applicable, and compare memory at matched execution milestones. No skipped required draws, dispatches, copies or uploads; no fabricated fence completion; no guest-budget reduction or disabled host safeguards to improve counters. Loading art and Present counts are not proof of world rendering.
No game binaries, packages, keys, dumps, proprietary names, console SDK material or DRM-related work. Use synthetic fixtures, hashes and aggregate measurements. Follow the repository's licensing and attribution rules.
Success: fewer unnecessary native allocations, preserved physical-page contents throughout their lifetime, and measurable progress on constrained hardware without rendering or stability regressions.
AI use: ChatGPT (GPT-6.2) assisted with source review and drafting. Local experimental results are from contributor-reported AI-assisted engineering runs, not independently reproduced by ChatGPT.
Activity
Anon64 commentedon Nov 28, 2026
A data point for C (attribution) from a 12 GB card, no claim. RTX 3060 12 GB (driver 581.80), i9-14900KF, 64 GB RAM (above the 16 GiB target), Windows 11 26200.
mainb937fbab, release, a newer retail game, 300 s,XCL_PREPARE=0, warm shader cache, default settings otherwise. Numbers are #2697'smemory by ownerline at the run's peak commit (294 s); the run is still in the title's front end at that point, not a world-render milestone.Two more runs of other heads in the same cache state peak within 0.5 % of this (37 198 / 37 535 MB, the same 838 MB of sparse tiles). So on this title the physical-page sparse backing workstreams A/D target is under 1 GB here, and about 87 % of commit is in "other". Peak commit also swings between ~17 and ~37 GB from run to run on this machine with the cache state, so a C breakdown probably has to split "other" before deferral savings are measurable on this title. In world loading (a separate run on a
main-based tree, reported on #3098) "other" grew from 27.3 to 41.8 GB in about 44 s while the pools stayed flat.Not measured: anything inside "other", world-render milestones, 16 GiB RAM, AMD.
AI use: Claude Code (Claude Opus 5.5) ran the runs, read the logs and wrote this comment.
cj-tomlin commentedon Nov 28, 2026
claim: C — what the process commit's
otheris made of@Anon64's run above has 32.6 of 37.5 GB of commit in
other. Onmain(beeb81be) the commit side ofmemory by ownerhas two parts, the UMA window and the sparse CPU copy; #2750 / #2776 / #2999 add owners on the video-memory side. So I'm taking the commit side only, and building on the existing line rather than adding another.Plan, measurement first:
mainwithXCL_ACTIVITY=1, and at the peak a breakdown of the process's committed private memory by region (heap, stack, private data, regions XCL handed to the title, the rest), next to thememory by ownerline. In particular: how much ofotheris video memory, whichHANDOFF.mdsays WDDM charges to the process's commit, so it would be counted on both sides. Posted here as aggregates.memory_report.rs(e.g. the title's allocations throughkernelx, process heaps), with the overlap with video memory stated rather than subtracted. No change to allocation. I'll coordinate with @joeypercia's stack first, since it touches the same file.Files I expect to touch in 2:
hle/d3d12x/memory_report.rs,hle/kernelx.rs(counters only). Draft PR in 48 h if 1 shows an owner worth counting; otherwise I'll post the negative result and release the claim.Hardware: RTX 3080 10 GB (621.40), Ryzen 7 7800X3D, 32 GB RAM, Windows 11 26300. Above the 16 GB target, so this is attribution, not a constrained-hardware result.
AI use: Claude Code (Claude Opus 5.5) did the source review and drafted this; I checked it.
brainhay5 commentedon Nov 28, 2026
claim: E — independent qualification of #1916 (
e2aa8560, parent689f2db4)Testing only, no code changes.
Hardware: RTX 5070 Ti 16 GB, driver 32.0.16.1088, Ryzen 7 5800X3D, 64 GB RAM, Windows 11 22631. Title 1.0.2.1 (TitleId
7952987A), release build of the exact PR head.First experiment:
XCL_DEFER_PRIVATE_HOME_TILESoff vs on, everything else identical, so the flag-off arm is the parent behaviour on the same binary rather than a second tree. Two 60 s runs per arm (matching #1916's own 60 s unit), readingsparse pools X MB (Y MB mapped)from the memory line, plus peak process commit and peak VRAM sampled from the same process. Repeating if the spread warrants it.Caveats I will state in the result, not discover later:
mainand around 50 s on this older base. So the evidence is front-end memory at a matched elapsed milestone, explicitly not world rendering, and I will not present it as progress.#1916is CONFLICTING against currentmain, so I am testing the head against its documented parent689f2db4as-is, not a rebase. I will say so in the report and will not attribute anything about currentmainto it.I will report on #1916 with Tested / Not tested and the actual commands.
cj-tomlin commentedon Nov 28, 2026
C, first result: on NVIDIA most of commit's
otheris video memory, which WDDM charges to the process's commit. Somemory by ownercounts it twice, once in commitotherand once under video memory, and adding the two overstates use.Setup:
mainbeeb81be, release; RTX 3080 10 GB, driver 621.40; Ryzen 7 7800X3D, 32 GB RAM, 15 GB page file; Windows 11 26300. A retail title,XCL_ACTIVITY=1 XCL_PREPARE=0 XCL_NETWORK=0, a copy of a warm DXIL cache, its ownXCL_DATA_ROOT. The process's committed private memory taken apart with Sysinternals VMMap snapshots next to thememory by ownerline.1. A synthetic check, no title. A small standalone D3D12 program (not part of XCL) creating 256 MB buffer heaps on the 3080, two runs with identical results:
(MB against the start.) Every byte of a heap, local or not, is a byte of
PrivateUsage, and shows in the address space as aMEM_PRIVATEregion withPAGE_WRITECOMBINE.2. The title, menus (300 s, no crash, 8,825 frames) and loading into the world. The run into the world reached 29.8 GB of commit in 92 s and was stopped by my guard (under 2 GB of system commit left), so its peak is not here. MB; the last VMMap snapshot (92 s) is incomplete and left out:
memory by owner)PrivateUsage(16,264 vs 16,296 MB at 280 s): nothing large is outside the address-space view.The @Anon64 run above (37.5 GB,
other32.6 GB) should split the same way on NVIDIA; I have not checked AMD.Next: a diagnostics-only PR for
memory_report.rs: show the video memory charged to commit as its own commit part (marked as the same bytes as the video side, not added), sootheris what has no owner. I'll check with @joeypercia first, since #2750 / #2776 touch the same file. Then the remaining read/write blocks and heaps.Not tested: AMD, other NVIDIA drivers, the in-world peak (needs a higher commit limit than this machine's 32 GB RAM + 15 GB page file: more RAM, or possibly a larger page file, if the run still gets far enough while paging that much), whether the UMA window is all of the non-local base.
AI use: Claude Code (Claude Opus 5.5) ran the runs, wrote the probe and the VMMap summary script, and drafted this; I checked it.
cj-tomlin commentedon Nov 28, 2026
Correction to my update above: this is not new. #2697 already counted it as a
D3D12 heapscommit part (both DXGI segments less the imported coherent window; 1 GiB heap = +1 GiB of commit, measured by @joeypercia on an RTX 4070 Ti and an RDNA2 iGPU).main's adaptation (d3e60ec) left it out, and #2697 was closed today with that piece anduma_imported_bytes()left for a small PR onmain, after @thehollowedone asked for a current-maincheck for double counting first.So what my runs add is that check, on
mainbeeb81bewith a retail title on an RTX 3080 (621.40): the write-combined private regions match local + non-local less the 4 GB window to within ~140 MB at three points, up to 27.7 GB of commit. Credit for the mechanism is theirs.Next, as two PRs on
main:D3D12 heapscommit part anduma_imported_bytes()from D3D12.X: a memory line by owner, against DXGI's budget #2697 tomain's report (authorship credited);snapshot()creating the UMA window throughuma::get(), with their child-process regression, if it still applies onmain.AI use: Claude Code (Claude Opus 5.5) found the overlap and drafted this; I checked it.
Anon64 commentedon Nov 28, 2026
@cj-tomlin the split of my 37.5 GB run (RTX 3060 12 GB, driver 581.80, 64 GB RAM,
mainb937fbab,XCL_PREPARE=0, idle at the title screen, no input; regions read withVirtualQueryExfrom outside the process, MB):0x404)So your video-memory reading holds here too (the write-combined part is flat at ~6.5 GB and matches local + non-local beyond the window), but on this machine there is a second, much bigger piece that is not video memory: 19,856 regions of exactly
0x101000bytes (1 MiB plus a page) at random 4 KiB offsets inside their reservations, i.e. NT-heap large blocks of 1 MiB. They are nearly empty (5 sampled: 123–1,805 non-zero bytes of 1,048,576; one 193 KB) and not freed.They arrive in one burst: commit is flat at 17–19 GB, then rises ~19 GB in ~20 s, starting at 244 / 247 / 251 / 262 s in four runs, the same with
XCL_NETWORK=0. XCL's activity (presents, submits, draws, write-watch) does not change during it, andXCL_TRACE_MEMshows no kernelx allocation ≥ 64 KiB after 1.5 s, so it is notXMemAllocor theVirtualAllochooks. Each burst overlaps a ~20 s NVIDIA driver compile of a 1.2–1.4 MB-DXIL compute PSO (a different one each run; earlier compiles of the same size did not jump), so the driver's compiler is my main suspect, not confirmed. A run that logsPrivateUsagearound each driver compile call is going now; I'll edit this with the result. Your 300 s menu runs peak at 16.3 GB, so they may end before this point, or the 3080's driver may not do it.This is also why my smoke runs swing between ~17 and ~37 GB of peak commit: a 300 s run either reaches the burst or not.
AI use: Claude Code (Claude Opus 5.5) ran the runs and the region scans and wrote this.
Edit, the probe result: it is inside the driver call. A local build of
b937fbabthat logsPrivateUsageright before and after each logged driver compile (local commit2187f46c, not for upstream), same run: oneCreateComputePipelineStateof a 1,272,016-byte DXIL compute pipeline (no driver blob, 23.5 s in the driver) took process commit from 17,233 to 37,050 MB (+19,817 MB). The six huge compiles before it added +6 to +519 MB each, the one after +93 MB. Commit stays at ~37–38.5 GB to the end of the run, so the driver keeps it after the call returns. The pipeline is a different one in each run (each run saves the blobs it builds, so the next run compiles further down the list), yet every run has one such compile at ~240–260 s, so I can't yet say whether it is a property of certain programs or of the driver's state after N huge compiles. Either way it is not an XCL owner: NVIDIA 581.80's compiler, on this title's largest compute programs.Two more things from the logs: (1) a run with shader preparation on (a local
main-based build, preparation done in 148 s by 28 workers) has the same burst, at ~250 s after play started, from a compile in the title process of a pipeline preparation had not built; so preparation's worker processes don't keep it out of the title here. (2) In both runs the compile right before the burst took ~50 s instead of the usual ~20 s (52.2 s, +519 MB; 50.3 s), and the large compiles ran strictly one after another, never two at once.brainhay5 commentedon Nov 28, 2026
E — result posted on #1916: #1916 (comment)
Short version: RTX 5070 Ti 16 GB (Blackwell), #1916
e2aa856against parent689f2db, one release binary withXCL_DEFER_PRIVATE_HOME_TILESoff vs on, arms interleaved, two repeats each, 70 s runs, retail title.Sparse pool 2,048 → 320 MB, identical in both repeats; mapped 2,020 → 314 MB; process commit and local video memory fall with it; target pages and pool capacity unchanged. Same direction as the PR's own 896 → 320 MB on a 5090, larger absolute drop here, and much larger than the 8 GiB laptop case in that thread.
What this does not cover: AMD (still the outstanding dual-vendor requirement noted in #1916), world rendering (the title is in its front end at 70 s), and current
main(#1916 is DIRTY and main has moved 514 commits). 16 GB is above this issue's 6–8 GiB target, so it is a higher-memory control rather than target coverage.Claim released — I have nothing else in flight on this issue.
KOLESNiii commentedon Nov 28, 2026
Workstream B: review findings on the section-alias stack, posted on the PRs:
alias::read/alias::writeresolve page addresses and then copy without holdingMAPPINGS. A free or remap at the same time can release or decommit the destination of a DirectStorage write while the copy runs. The comment includes a regression test that fails at 4fdd282 and passes with the lock taken incopy_pages: kernelx: check section page liveness for DirectStorage #3075 (comment)guards::written(page)inmap_one: kernelx: XCL_PAGE_ALIAS=1 shows a physical page at every address it is mapped at #2307 (comment)Both are unit tests on Windows with an RTX 2070 SUPER; they do not run on the GPU. Not tested: a retail title, AMD, GPU readback. No link to #505 is claimed.
AI use: Claude Code (Claude Opus 5.5); checked by @KOLESNiii before posting.
oni-swr commentedon Nov 28, 2026
claim: E — AMD qualification of #1916 (
e2aa8560, parent689f2db4), testing only, no code changes. Complements @brainhay5's NVIDIA result above.Plan: RX 7800 XT 16 GB (RDNA3), native Windows 11;
private_physical_pages_reach_the_gpu_on_mapping+ focused tests, then one release binary withXCL_DEFER_PRIVATE_HOME_TILESoff vs on, interleaved, on the same retail-title milestone; sparse pool / mapped / commit / local VRAM, aggregate numbers only. Results on #1916, ETA a few hours (our GPU is shared and queued). AI-assisted (Claude Sonnet 5.5 runs it, orchestrated by Claude).cj-tomlin commentedon Nov 28, 2026
@Anon64 on "or the 3080's driver may not do it": a 600 s run into the world here (
mainbeeb81be, release, RTX 3080 10 GB, driver 621.40,XCL_PREPARE=0, save loaded byXCL_PRESS_AT=25:A) had no burst: 100 huge driver compiles after 100 s, including 1.21, 1.30 and 1.68 MB DXIL compute programs at 420–600 s (35–59 s each), and no single compile moved commit by more than ~2.6 GB.0x101000regions: 0–5 in every snapshot. Peak commit 37.9 GB, of which 15.1 GB is the video-memory charge (still matching DXGI within ~150 MB at the peak).Not your programs, so a program-specific trigger isn't ruled out, but "the driver's state after N huge compiles" doesn't happen on 621.40. One more difference: here several huge compiles often ran at once (many from the title's own threads, ungated), where yours ran strictly one after another; and this run was in the world, yours idle at the title screen. Could you update your graphics driver and run your probe again? If the burst goes, it's a driver bug rather than something XCL needs to own. If you post one or two record hashes, I'll run them through
xcl shaders --measure-psohere with commit logged.AI use: Claude Code (Claude Opus 5.5) ran the run and drafted this; I checked it.
Anon64 commentedon Nov 28, 2026
@cj-tomlin thanks, that's a clean comparison: 621.40 with no burst over 100 huge compiles points at the driver (581.80 here) rather than XCL. The driver update needs the machine's owner, who is away; I'll rerun the probe on a current driver as soon as it's updated, and report here whether the burst goes.
I'll keep the record hashes off the thread, sorry: we don't post identifiers from the title's data. One pitfall if you measure your own huge programs with
--measure-pso: give itshaders.rpf, not the title folder. Onmaina folder makesrecord_by_hashread every file under it whole (here 72.8 GB of commit before translation, from the largest archive); #1338 fixes it and I've noted the numbers there.Also: this machine's release builds have started crashing rustc with random faults (access violation, illegal instruction, stack overrun) on an i9-14900KF, so I'm treating any new result from it as suspect until that's checked.
AI use: Claude Code (Claude Opus 5.5) drafted this.
Foniass commentedon Nov 28, 2026
Data point for the driver-compile commit jump @Anon64 measured above: not seen on an RTX 5070 Ti with driver 621.14.
Setup:
main765b2c5b, release; RTX 5070 Ti 16 GB (621.14), Ryzen 7 7800X3D, 32 GB RAM (97 GB commit limit), Windows 11 26300, Rust 1.100.0. A retail title idle at its front end, no input, 480 s per run.XCL_PREPARE=0 XCL_PSO_DISK_CACHE=0 XCL_ACTIVITY=1, so the title process asks the driver for every pipeline and XCL supplies no blob.PrivateUsageof the title process sampled from outside about twice a second (1,058 and 1,078 samples) and matched to thedriver compile finishlines.Eight of the compiles were 1.0–1.87 MB of DXIL (two of them 1,214,668 and 1,195,048 B, close to the 1,272,016 B one above). The ranges leave out the first long compile of each run, which overlaps the title's own start-up rise to ~17 GB; the control shows the same rise without a long compile. Most other pipelines returned in milliseconds even with no blob supplied, so only the compiles that really took 5 s or more are counted.
Not tested: driver 581.80, a 30-series card,
b937fbab(this is the tree after #3203), anything past 480 s, the world, AMD. So this does not say whether the difference is the driver, the GPU or the tree.AI use: Claude Code (Claude Fable 5.2) ran the runs, wrote the sampler and drafted this; I checked it.
cj-tomlin commentedon Nov 28, 2026
C, status: how much of the unowned read/write commit is the driver compiler. Short answer: a few GB at a time while huge compiles run, very little kept afterwards.
Setup:
mainbeeb81be, release, RTX 3080 10 GB, driver 621.40.xcl shaders shaders.rpf --measure-pso 062468c09af883b9 --repeat 10(the 1.68 MB compute program from my in-world run, 1.60 MB DXIL on this path, driver cache off), process commit sampled every 0.5 s from outside.@Anon64 thanks: I hit the same folder pitfall first (72.8 GB here too), so +1 for #1338.
Not tested: other programs, compiles inside the title (where the driver may behave differently than in a standalone process), other drivers, AMD. Next I'm looking at what owns the 8 GB present by 100 s.
AI use: Claude Code (Claude Opus 5.5) ran the measurements and drafted this; I checked it.
cj-tomlin commentedon Nov 28, 2026
C, status: owners for the whole commit at ~100 s into the world, from a
VirtualAlloctrace with stacks. Nothing large is left without an owner.Setup: as before (
mainbeeb81be, release, RTX 3080 10 GB, driver 621.40, a retail title into the world withXCL_PRESS_AT=25:A,XCL_PREPARE=0), 110 s, peak commit 34.1 GB.wpr -start VirtualAllocation -filemode, thenxperf -a virtualalloc -frames soc(commit still outstanding at each time, grouped by the first frame outside ntoskrnl / ntdll / kernelbase / kernel32). Symbols forxcl.exeonly, so driver and DXC rows are DLL names.dxgmms2.sys(video memory)kernelx/acphal/ loader)nvwgf2umx.dll(NVIDIA user-mode driver)nvgpucomp64.dll(NVIDIA shader compiler)dxcompiler.dllucrtbase.dlldxgmms2.sysagainst local 14,208 + non-local 5,260 = 19,468 MB in thememory by ownerline at 110 s; the UMA window is inside it, so theD3D12 heapscommit part is local + non-local less the UMA window, as in D3D12.X: a memory line by owner, against DXGI's budget #2697 / D3D12.X: memory by owner on nvidia-dev: two-pass buffers, GPU-view tiles #2999.kernelx::lazy::commit3.5 GB,XMemMapPhysicalPagesScatter1.1 GB,VirtualAlloc0.65 GB,home_again0.62 GB,ApuAlloc0.4 GB. Onmainnothing counts these (kernelxkeeps no committed-bytes total;lazyonly tracks which pages are still uncommitted), so they could become a commit part counted where they're made. I haven't checked how much of it is the 2.0 GB sparse CPU copy.nvgpucomp64) rise and fall with compiles, as with--measure-pso.dispatch_chain::build,shader::capture, sparse uploads.Not tested: past 110 s (the driver's growth after that is from the earlier run, not traced), what inside the driver or DXC holds it (no symbols for them), the split of title memory against the sparse CPU copy, AMD.
AI use: Claude Code (Claude Opus 5.5) ran the trace and the analysis and drafted this; I checked it.
vasanex commentedon Nov 29, 2026
E and A for #3123 on a 10 GB card (RTX 3080, NVIDIA 621.40), head
6330fba1, details and the test diff here: #3123 (comment)XCL_DEFER_PRIVATE_HOME_TILESoff vs on, interleaved. Front end: sparse pool 896 → 320 MB, local video memory −576 MB at equal work. Loading the save: pool 3,072 → 320 MB, local −2.75 GB at the last presenting point, but on 10 GB neither setting reaches a rendering world (both stay ~2.8 GB or more over the 9.3 GB budget, no system-memory pools on this base). Process commit: no conclusion.0xDDfailure (3070 / 3090 / 3080) is the test, not the deferral: it reads the CPU home afterland_page, which keeps chunks the CPU changed. A test-only change that reads the window natively after the fence passes 3/3 here, so first exposure is byte-exact on this card. The later-write case from the 4060 report is not covered by it.Not a claim; testing only. AI use: Claude Code (Claude Opus 5.5) ran the runs and tests and wrote this.
andrewDoing commentedon Nov 29, 2026
For workstream A's later write to the already-mapped middle page, I compared #3123 head
6330fba1to its parent54225f58on an RTX 5070 (616.92). The middle tile started lazy in every run. The next ordinary queue submission made all 65,536 bytes of 0x5B visible on the GPU in each case.I allocated three consecutive physical pages, wrote A7/38 to the outer pages, explicitly mapped the three pages home, and submitted a closed empty DIRECT list through the production
q_execute_command_listshook on an adopted queue. After its fence both outer tiles matched on native readback and the untouched middle still had the lazy backing marker. I then filled the middle page on the CPU, checked its bytes, and submitted again through the same hook. The native readback checked all three tiles, A7/5B/38. Each copy required a concrete backing tile and no pending mapping. The fixture usedXCL_SPARSE_LAZY=1,XCL_DS_KNOWN_WRITES=0, ordinary write-watch, and no forced refresh, explicit dirty range, or CPU overwrite after submission.This narrows the difference with the RTX 4060 observation: an initially lazy middle tile and a later write at its mapped home are insufficient by themselves to produce stale data here. Both write routes targeted the home throughout. The separate move-away control covered writing through a physical page while it was mapped elsewhere. The remaining useful comparison would be the 4060 fixture's submission hook, write-watch state, and concrete/pending mapping state before its copy. These runs establish no driver-specific cause.
AI-assisted fixture and verification.
cj-tomlin commentedon Nov 29, 2026
C, status: one avoidable cohort found and measured: XCL's in-memory driver blob stores keep ~0.5 GB of blobs that also exist on disk and in the driver, and almost none of it is read back. A second, smaller one: per-pipeline copies of the same shader bytecode. Two lines I expected to find something on came back empty. No policy change from me; both cohorts already have open PRs, linked below.
Setup: release build of
0f0cc342(#3344's head) plus uncommitted counters logged every 2 s, RTX 3080 10 GB, driver 621.40, a retail title into the world withXCL_PRESS_AT=25:A,XCL_PREPARE=0, 110 s per run, peak commit ~33 GB. Heap stacks come fromxperf -heap -Pidsattached to the running title process (0 lost events).Since the last update: the video-memory double count is in #3343 (a memory sample no longer creates the UMA window) and #3344 (stacked:
memory by ownergets aD3D12 heapscommit part, local + non-local less the UMA windows read in place). With #3344,otherlands within ~240 MB of VMMap at 64 s (6,857 vs 7,097 MB), against ~9.4 GB over before. Both are drafts until the flaky CI tests (#3183 / #3221) are fixed.1. Driver blob stores (
GRAPHICS_BLOBS256 MiB cap,COMPUTE_BLOBS512 MiB cap)driver_cache::load) and admitted after the driver accepted it. Each one exists three times: the file on disk, the pipeline the driver built from it, and this copy.2. Shader bytecode copied per pipeline (
own_shader)Ruled out
VirtualAlloctrace put under the parser is heap that parsing committed first and later allocations reused.vram::place_on_pages, reserved resources, placements, sparse uploads).Not tested: sessions past 110 s (how much of the blob store is read back later), AMD (where the disk cache is off by default), other titles. The heap trace accounts for 702 MB live at 26 s, while
HeapSummaryshowed ~1.7 GB in another run at that point. The traced run went slower and held fewer blobs by then, but I haven't shown that this explains the gap. The counters are scratch code, not a PR.AI use: Claude Code (Claude Opus 5.5) wrote the counters, ran the traces and runs, did the analysis and drafted this; I checked it.
oni-swr commentedon Nov 29, 2026
E update for #1916, partial, under claim 7246503115. Not a completed qualification.
Tested:
e2aa856010a637d33adc2cf8b49766da91574747built as it is on its documented parent689f2db47(not merged ontomain). RX 7800 XT 16 GB (RDNA3), driver 32.0.31035.1003, Windows 11 build 26200, Ryzen 7 5700X3D, release build for the title runs, debug for the test.Focused test:
private_physical_pages_reach_the_gpu_on_mappingran on the 7800 XT: 1 passed, 0 failed, 0 ignored, no SKIPPED line.One off/on pair (one release binary,
XCL_DEFER_PRIVATE_HOME_TILESunset vs1, 70 s each, same retail title,XCL_PREPARE=0, fresh copy of the same cache and data per arm):No device removal or crash in either arm. The sparse pool drop matches the NVIDIA result, so the mechanism was reached.
The failures: in the "on" arm all 2,054 failed requests fall in one 2 s sampling window near the end (66–68 s); the other windows show none. The first logged failure is
0x89240009(E_ACCESS_VIOLATION). Only the first failure is logged, so the cause of the other 2,053 and their destinations are unknown. This is an association with the flag in one pair, not an attribution: the run has no repeat, and the two arms differ in timing (the "off" arm had a long driver compile at about 65 s).Not done: the grouped sparse/kernelx tests did not run (my script error), and the second off/on pair did not run (a competing build stopped the batch). I did not rerun them. Not covered: the repeat that would show whether the failures recur, and the failing destination.
AI-assisted (Claude Sonnet 5.5): it prepared the build and run script, ran the test and arms, and wrote this report.
D3D12.X: report UMA DXGI backing and D3D12 heap commit without alloca…
D3D12.X: defer GPU-owned target pages until first use
D3D12.X: defer GPU-owned target pages until first use
tiagonleal commentedon Nov 30, 2026
C: local video memory by owner at a matched milestone, RTX 5070 Ti 16 GB (driver 617.42), Series X profile (
title memory 13824 MiB), a retail title in its open world. Release build ofmain7a649b0emerged with #3304, so without #3343 / #3344. Switches:XCL_RAM_MB=12000 XCL_CS_PSO_WAIT_MS=200 XCL_UMA_DRIVER=mixed:1536:1792 XCL_TEXTURE_LEVEL_PAGES=1 XCL_PREPARE=0after a full shader preparation. Default UMA layout: the log says 3 sparse VRAM windows, 1 coherent window (4095 MB) and 0 view windows, so this is not the 16-window setup. Eight runs, one per configuration: two-pass cap unset (2 runs),XCL_TWO_PASS_MB=3072,=1536(3 runs, two of them with a diagnostic switch on),=1536+XCL_VRAM_KEEP_SPARE_POOLS=0,=1536+XCL_MIRROR_MB=512.Milestone: the last
memory by ownerline at or before 340 s of log time (338.2 to 339.9 s in every run). Ranges across the eight runs, MB:otheris the rest.sparse CPU copyin the commit part equalssparse tilesin every run (within 1 MB), so the sparse tiles exist once in video memory and once as committed CPU memory.target pools freestays between 1.1 and 1.5 GB from about 210 s to the end in every run. No run logs areclaimed N empty 64 MiB VRAM pool heap(s)line. WithXCL_VRAM_KEEP_SPARE_POOLS=0it is 1,475 MB at the end. The free pages sit in 64 MiB heaps that never become empty. D3D12.X: bound target-page pools by title and adapter VRAM budgets #2357 bounds pool growth and D3D12.X: reclaim cooling and idle tiles on pool heap OOM #1663 reclaims on OOM; I found no open PR that gives back partly used target pool heaps.XCL_MIRROR_MB=512ends at 17,887 MB, inside the range of the other=1536runs.Not tested: who owns
other(this build has noD3D12 heapspart from #3344); which heaps Windows demotes to shared memory; the Series S profile; AMD; other titles; repeats of each configuration.AI use: Claude Code (Claude Fable 5.2 ran the runs; Claude Opus 5.5 read the logs and wrote this).
POMXARK commentedon Nov 30, 2026
Data point / clean-room silicon lab finding relevant to Workstream D (Redundant backing reclamation) and Workstream B (Physical-page identity & dirty-record lifetime) — no claim.
Summary of Silicon Findings (
T51/T53inPOMXARK/victory-city-bench)While auditing redundant host/GPU backing and page-guard overhead on Windows 11 (NVIDIA GeForce RTX 5080 16 GB ReBAR ON, AMD Ryzen 7 5700X, 32 GB DDR4, DirectX 12 Agility SDK
1.614.1), we isolated two Win32 VM + D3D12 hardware contracts in a clean-room synthetic bench (victory-city-bench) and verified Phase 1 on a separate GPL-3.0 translator tree (POMXARK/victory-pc-opt@4e591de):ID3D12Device13::OpenExistingHeapFromAddress1overMEM_PRIVATE | MEM_WRITE_WATCH(T53/EXP-048):P1,--exp048):OpenExistingHeapFromAddress1+CreatePlacedResource(D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER | ALLOW_UNORDERED_ACCESS,L0Write-Back UMA) succeeds directly over committedMEM_PRIVATE | MEM_WRITE_WATCHpages, whileGetWriteWatch(WRITE_WATCH_FLAG_RESET)continues to detect 100% of subsequent CPU writes (64/64pages,missed_writes == 0) with zeroVirtualProtectcalls and zero VEH page faults.174 MiBbuffer benchmark (24 MiBhot CPU ring +2.0 GB/fGPU L1 reads,14realExecuteCommandListssubmits/f,14background contention threads,D3D12_QUERY_TYPE_TIMESTAMP):MEM_MAPPED (SEC_RESERVE) + VirtualProtect(RO) + VEH + CPU memcpy -> L1:16.12 msCPU (224 VP/f,224 VEH/f,0.29 msGPU,missed == 0)MEM_PRIVATE | MEM_WRITE_WATCH + L0 Alias DMA -> L1:5.96 ms(2.70×faster),0 VP/f,0 VEH/f,0.00 msCPUmemcpy,1.31 msGPU,missed == 0MEM_PRIVATE | MEM_WRITE_WATCH + staging -> L1:6.59 ms(2.45×faster),0 VP/f,0 VEH/f,0.29 msGPU,missed == 024 MiBL0Alias across14submits/f: refuted at32.51 ms(27.56 msGPU PCIe wall over336 MiB/freads)D3D12_HEAP_TYPE_GPU_UPLOAD(WRITE_COMBINE) with3 MiB/fCPU reads (EXP-046/T51): refuted at733.8–774.9 ms(4.2–10 MB/suncached WC CPU read cliff).EXP-048B/EXP-048C,POMXARK/victory-pc-opt@4e591de,24/24unit tests passing,0errors): Moving an un-aliased185 MiB32-bit graphics reservation fromSEC_RESERVE MEM_MAPPEDtoMEM_PRIVATE | MEM_WRITE_WATCH(with aliasing detection and DirectStorage write routing) cutVirtualProtecttime by−86.6%(56.77 -> 7.62 ms/f), eliminated all 6 hot 32-bitVirtualProtectbuckets (15–23×/f -> 0.00 ms), cutVEHguard faults by−71.3%(436 -> 125/f), cutGUARDSlock wait by−43.7%(77.86 -> 43.81 ms/f), cutcopiesby−26.0%(21.82 -> 16.15 ms), and improved--releasesteady 3D frame time across matched full-orbit runs from66.70 ms(15.44 FPS) to59.76 ms(17.19 FPS) (first 80 s 3D:15.05 -> 18.14 FPS).Safe Lifetime & Size Guardrails for L0 Aliasing (
T8/T51):> 32 MiB, e.g.,~2 GB/fskinning/BVH) must remain inL1 DEFAULTVRAM (fed via GPU DMA from L0 alias), whereas hot CPU-written ranges<= 24–32 MiBstay resident in RTX 5080's64 MiBL2 cache (0.14 msGPU inEXP-046).MEM_PRIVATErange requires explicit fence settlement beforeVirtualFree(otherwise Win32 returns error 87 while anOpenExistingHeapholds locked pages, or in-flight GPU work can fault on torn-down pages).References & Reproducibility
--exp046,--exp048), raw JSON telemetry,AGENTS.mdprotocol, and formal theorems (T1–T53): https://github.com/POMXARK/victory-city-bench (experiments/EXP-046_hot24m_l0_alias_vs_vp_veh.md,experiments/EXP-048_writewatch_l0_alias_174m.md,docs/THEOREMS_AND_LAWS.md,PROGRESS_RTX5080_R7-5700X_32GB.md).Phase 1onmain @ 4e591de): https://github.com/POMXARK/victory-pc-optTested: Windows 11, NVIDIA RTX 5080 16 GB (ReBAR ON, Agility SDK
1.614.1), Ryzen 7 5700X, 32 GB DDR4, synthetic D3D12 lab + standalone GPL-3.0 tree (4e591de).Not tested:
xcl-dev/xclupstreammaindirectly, AMD RDNA2/3/4, 6–8 GiB VRAM / 16 GiB RAM systems, Phase 2 (OpenExistingHeapFromAddress1as liveCard::staging).AI use: Antigravity assisted with building and running the synthetic lab benchmarks and local A/B runs, parsing telemetry, and drafting this summary; reviewed and authorized by @POMXARK before posting.
cj-tomlin commentedon Nov 30, 2026
C, status: the driver blob store cohort from my last update is still there on current
main, at about the same size, and still almost never read back. The shader copies are unchanged. #3343 and #3344 are closed as duplicates of #3229, which was merged first and does the same plus the mixed and legacy UMA modes.Setup: release build of
main9dfbe3eaplus the same uncommitted counters, RTX 3080 10 GB, driver 621.40, a retail title into the world withXCL_PRESS_AT=25:A,XCL_PREPARE=0, coherent window 4,095 MB, two 300 s runs back to back. The cache-key changes (#3450, #3495) made the driver disk cache cold again; I ran the title three times before these two, and it was still filling between them (2,914 and 3,420 disk loads by 108 s).0f0cc342, 110 s9dfbe3earun 1 / run 2, ~108 sown_shadercopies / distinctmain: at ~112 s on the previous base, at 105 and 87 s in these two runs, with draws waiting over 1 s on pipelines still being built. So everything after that is a stalled title with background builds still running, not gameplay. A long session with a working world may read more back.Not tested: gameplay past the stall (see above), AMD, other titles. Process commit at ~108 s was 33.9 / 34.4 GB here against 30.3 GB on the old base; the stall comes at a different point of the load, so I have not treated that as a regression or looked into it. In an earlier run of the same build and settings the coherent window came up at 512 MB; I have not looked into why. The counters are scratch code, not a PR.
AI use: Claude Code (Claude Opus 5.5) ran the runs, did the analysis and drafted this; I checked it.
cj-tomlin commentedon Nov 30, 2026
C, final status, releasing the claim. The exit condition was met by my last two updates: the driver blob RAM stores are an avoidable cohort (460–564 MB held, 17–24 MB of it ever read back, 96–97 % never; #3328 caps them), and the
own_shadercopies hold 251 MB for 79 MB of distinct code (#3091). Below is what I measured since and have not posted, for whoever picks up C or the policy change.Setup: RTX 3080 10 GB, driver 621.40, release builds of
main9dfbe3ea/abec7ce9plus uncommitted memory counters, a retail title withXCL_PRESS_AT=25:A,XCL_PREPARE=0.The ~3 GB commit jump when the title stalls at its first in-engine cutscene (VMMap pairs around the stall in three runs, and a kernel VirtualAlloc trace with stacks from 60 to 125 s in a fourth):
nvwgf2umx.dllunder XCL's pipeline creation (driver_pso) andbind::set_pipeline_state. Gross commits in the 25 s around the stall: ~3.7 GB for pipeline creation, ~0.8 GB in the compiler (nvgpucomp64), even though only ~150 pipelines were built from 100 to 135 s.Compute-split scratch since #3499: indirect dispatches of split programs always run the chain now. Since their group count is on the GPU, each recording claims the full
XCL_SPLIT_SCRATCH_MBbudget (256 MiB). The direct dispatches in these runs need 8–17 MiB at most. The 384 MiB total still gives each new recording a 2 MiB floor, so live scratch passes it. #3528 removes the claim once the whole forms are built: in one run with it, scratch fell to 23 MiB. While the forms are still building, which is when the stall happens, it stays the same. I tried to read the real indirect group counts back from the GPU, but the device was removed before any of those dispatches completed. So how much of the 256 MiB they need is still open.A caveat on all of my runs: the stall itself is pipelines still being built (title threads waiting over 1 s). As the shader and driver caches warm,
maingets past it and the device is removed right after, at the same point as with #3528 (see my corrected report on #3528). So my measurements past ~110 s come from stalled runs, as status7 said, not from gameplay.Not done / open:
The counters are scratch code, not a PR; I can share the patch if it helps someone.
AI use: Claude Code (Claude Opus 5.5) ran the runs and traces, did the analysis and drafted this; I checked it.