Repository navigation
Done
Description
RTX 4060 Ti / Windows: with b8b1f49 the host's commit grows about 1 GB per second from ~20 s on, with the working set flat, until memory allocation of … bytes failed (0xc0000409) at ~120–150 s. The title never reaches the world load. With only b8b1f49 reverted on the same tree, commit levels off at ~31 GB and the world load starts at 112.9 s again. Two runs with the commit, one without, same settings and caches.
Setup
- NVIDIA GeForce RTX 4060 Ti 16 GB (driver 32.0.16.1088), Intel Core i7-8700, 32 GB RAM (commit limit ~77 GB), Windows 11 build 26200. rustc 1.94.1 MSVC, release, DXC 1.8.2502.11 (Windows SDK).
- Retail 1.0.2.1 (
930.048.020-vb_sub_story).XCL_TRACE_WAITS=1 XCL_GPU_TIMING=1 XCL_BIG_COMPILES=4, noXCL_PSO_WAIT_MS. No input; the title loads straight into the game. - Tree:
main930e8b4+ xcl run: name a title's deliberate write of a tag to address 0 in the crash line #1062 D3D12.X: XCL_GPU_WAIT_RELEASE_MS sets when a stalled GPU wait is released #1046 D3D12.X: read back sparse-window Wait64BitValueX counters during CPU waits #1044 kernelx: XCL_TRACE_WAITS names what the title's waiting threads wait on #924 D3D12.X: keep ordinary GPU work ahead of a recorded Wait64 #851 D3D12.X: retain deferred Write64 until the producer fence completes #850 D3D12.X: time ExecuteCommandLists submissions (XCL_GPU_TIMING) #1065 Shaders: isolate DXC compiler heaps for parallel AOT #688 Shaders: save offline compute pipelines to the runtime driver cache #744 Shaders: xcl pipelines compiles a run's queued pipelines outside the title #759 D3D12.X: XCL_BIG_COMPILES sets how many big compute pipelines the driver builds at once #820 XG: fix CopyFromSubresource 7-argument ABI and guard destination span #684, plus local changes toxcl pipelinesonly (progress lines,--shard,--max-mb,.tryinghandling). The A/B differs in one commit:git revert b8b1f49. Not tested on plainmain. - Driver blobs and the journal's pipelines were built beforehand with
xcl pipelinesfor the build with b8b1f49 (1 064 blobs on disk). - A script sampled the host process every 2 s (
PrivateMemorySize64,WorkingSet64, free system commit).
Commit of the title's host (GB)
| s | with b8b1f49 (run 7) | without (run 8) |
|---|---|---|
| 31 | 14.4 | 13.2 |
| 61 | 37.7 | 19.2 |
| 90 | 69.1 | 24.8 |
| 121 | 99.3 | 30.1 |
| 151 | 113.7 | 31.0 |
Working set with b8b1f49: 18.8 → 21.0 GB from 61 s to 151 s, while commit grew by 76 GB, so the growth is committed memory that is not touched. Free system commit reached 0.3 GB at 113 s.
Runs
| run 6 (with) | run 7 (with) | run 8 (without) | |
|---|---|---|---|
first ListX #101 (not on PC) (world load) |
none | none | 112.9 s |
| last console-code report | 21 100 draws, 2 048 dispatches (96.6 s) | 21 301 draws, 2 048 dispatches (105.1 s) | 16 705 draws, 8 192 dispatches (115.6 s) |
| skipped draws / dispatches, GPU wait timeouts | 0 / 0, 0 | 0 / 0, 0 | 0 / 0, 0 |
| end | memory allocation of 1327304 bytes failed, ~120 s |
memory allocation of 1441792 bytes failed, ~150 s |
+0x23cf683 at 144.4 s, 1.3 s after a 20.9 s compute PSO build in the run (a pipeline whose DXIL changed back with the revert) |
- In both runs with the commit the title presents at 25–30 fps until the end (
2700 frames presentedat 110 s / 121 s) but goes no further than the loading it does before#101. - The log has nothing that grows with the commit. The first sign is the end itself: from 133 s in run 7,
no video memory for more pages of title textures (0x8007000E)(42 times),CreateHeap … refused, and DirectStorage requests failing with 0x800705aa, all after free commit was gone. - Runs 4 and 5 on this machine (the same tree before
mainmoved, so without b8b1f49) reached#101at 104 s and 156 s and ran 137–187 s with no memory error.
Not tested
- Plain
mainwith and without b8b1f49; AMD or Intel GPUs; Wine. - Which allocation grows. With the commit, NVIDIA's driver builds of the restructured programs were not faster here: 0.76–0.98 MB of DXIL took 141–294 s each in
xcl pipelines, as before.
Logs, report.json and the 2 s memory samples of runs 6–8 can be attached on request.
AI use
- Claude Code with Claude Opus 5.5: built the trees, ran and sampled the runs on my PC, read the logs and wrote this report.
Metadata
Metadata
Assignees
Labels
No labels
Activity
tiagonogueiraa-bit commentedon Nov 24, 2026
claiming: I'll translate the retail pack's programs on the CPU (no GPU needed) with
mainand withb8b1f49reverted, to find the programs whose structured HLSL grows, or whose translation grows, far past the dispatcher form. I'll post the numbers here, then a fix: most likely a bound that falls back to the dispatcher for those programs.Written with Claude Code (Claude Opus 5.5).
tiagonogueiraa-bit commentedon Nov 24, 2026
Found it on the CPU side: one compute program's structured HLSL is 148 MB since b8b1f49. I translated every program of the retail pack's
shaders.rpfwithgpu::recompbuilt on its own (macOS), frommainand frommainwith b8b1f49 reverted.indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays…(334 KB of code): 148.5 MB structured, against 13.8 MB aspcblocks (b8b1f49 reverted). Translating it takes 1.5 s either way, so the cost lands in DXC and the driver. No other program grows by more than 1.4×.if (!(xcl_skip_a || xcl_skip_b || …)) {, listing every pending skip flag, and reopens it whenever the set changes. Here there are 3 861 flags and 14 036 guards of up to 597 terms (152 on average), 99 MB in guard lines. It grows with the square of the pending flags. A synthetic program of n crossing forward jumps reproduces it.PR #1321 bounds it: structured code over 128 bytes per byte of program (this one: 455; the next largest in the pack: 61) is translated as
pcblocks. Over the pack only this program changes, to 13.8 MB, and b8b1f49's gain stays (170 programs aspcblocks, against 1 670 before it). @VolenNakov, if you can, a run of your A/B with #1321's head would confirm the title's commit levels off again.Written with Claude Code (Claude Opus 5.5).
CuteBooty commentedon Nov 24, 2026
A data point from plain
mainwith b8b1f49: one run, the growth from ~20 s did not show, and the world load was reached.main930e8b49c1c2ec683d22c724a398b39111cd0e56with nothing on top, DXC 1.9.2602 (Windows SDK). Retail 1.0.2.1,XCL_NETWORK=0 XCL_ACTIVITY=1, noXCL_PSO_WAIT_MS, input by hand.memory:lines:ListX #101 (not on PC)at 170.8 s. Last frames in the sample ending at 174 s. The run ends at+0x23cf683at 203.3 s, 0 device removals. Lowest free system commit 6.1 GB.maind208e14(before b8b1f49, many other commits between) on the same machine peaked at 29.5 GB.Limits: one run, no A/B of b8b1f49 alone. 608 shader sets from earlier runs were built ahead of use here, not the whole journal as in your setup, so I can't say whether this run compiled
CS_ScreenProbes_ActivateRays…at all. This does not contradict #1321's finding.AI use: Claude Code (Claude Opus 5.5) ran it with me at the machine, read the log and wrote this comment.
VolenNakov commentedon Nov 24, 2026
Confirmed: with #1321 (
156b0de) the title's commit levels off again and the world load is back. Same machine, tree and settings as the A/B above; run 9 is run 7's tree plus #1321 merged, nothing else.ListX #101(world load)memory allocation of 1441792 bytes failed+0x23cf683at 144.4 s+0x23cf683at 143.3 scargo test --release -p xcl --lib recompon that tree: 192 passed, 0 failed, 18 ignored.Not tested: plain
main+ #1321 (this tree also has the open PRs listed above), other GPUs.AI use
D3D12.X, Recompiler, DirectStorage: integrate PRs ivall#549, ivall#1305-
D3D12.X, Recompiler, DirectStorage: integrate PRs ivall#549, ivall#1305-
Recompiler: oversized structured code falls back to pc blocks (ivall#…
CuteBooty commentedon Nov 24, 2026
Correction to my run above: on newer
maina growth like this one shows here too. Four release runs on the same machine (RTX 3070 8 GB, driver 621.24),scripts/smoke.ps1,XCL_PRESS_A_AT=15and otherwise no input. My script stops XCL when less than 4 GB of commit is free; it stopped all four.mainb7aa9f3b7aa9f3+ my #774 rework (one commit,real.rsonly, not pushed)memory:lines): 21.8 GB at 30 s and 30.9 GB at 34 s in one, 19.6 GB at 30 s and 32.3 GB at 36 s in the other, so about 2.3 GB/s at the end, with video memory flat at 6.1 GB local. They were stopped at 34 and 36 s.Not tested: b8b1f49 reverted, #1321, or which program the memory goes to, so I can't say it is the same cause.
AI use: Claude Code (Claude Opus 5.5) made the runs, read the logs and wrote this.
grahamster2 commentedon Nov 24, 2026
DXC cost of the programs discussed above, measured on their own, for ranking #1321, #1345, #1315 and #1526.
How it was measured
xcl shaders shaders.rpf --recompon Windows, built frommain037aecd, which includes b8b1f49. Shaders were translated on the CPU, with HLSL of 8 MB or more written to disk. Recompiler: one skip variable for all forward jumps of structured code #1345's column is headc920355. The pc-block column isXCL_RECOMP_NO_STRUCTURED=1, the form Recompiler: oversized structured code falls back to pc blocks (#1307) #1321 falls back to.dxc.exe(1.8.2502) at-T cs_6_6 -O0 -HV 2021, the level XCL uses above 8 MB, with a 600 s cap and a 6 GB free-RAM floor.CS_ScreenProbes_ActivateRays,mainCS_ScreenProbes_ActivateProbes,mainWhere the 152 MB goes: 104 MB is in 14 780
if (!(xcl_skip_…))guard lines, up to 597 terms each and 383 on average.ActivateProbeshas 9 such guards: it is large without the guards.Link to the world-start stall: at runtime, on an RTX 3080 10 GB / 32 GB machine, the same
ActivateRaysHLSL (151 MB in the runtime's form) is compiled while the world starts. Physical RAM then drops from about 6 GB free to under 1 GB, and every other pipeline build in flight stalls. Several hundred ExecuteIndirect pipelines stay unbuilt for the rest of the run. When a local guard refused HLSL over 16 MB, that one compile no longer took the RAM.Not measured: the driver compile of the 12–21 MB DXILs above. #1315 reports a 29.75 MB DXIL not finishing in 600 s, so #1321 or #1345 alone still leaves a large driver compile. I also didn't measure
-O1(#1526).Measured and written with Claude Code (Claude Opus 5.5); the dump filter is local only, and no shader content is attached.
zGLados commentedon Nov 24, 2026
AMD data point on current
main: the growth shows on RDNA3 too. The runs above are all NVIDIA.main9e3831ewith nothing on top; DXC 1.9.2602.17 (Windows SDK). Retail 1.0.2.1,scripts/smoke.ps1for 300 s,XCL_PRESS_A_ATevery 6 s from 10 to 118 s. Caches were cold for this build, because Recompiler: memory windows from the descriptor heap (no per-access switch) #680 changes the HLSL.xcl shaders shaders.rpf --precompile --only cs --limit 22824withXCL_DXC_THREADS=2reaches 32 GB within 40 s once it gets to the records after 22800, where95cc13288a27a96eis. I did not check which program the title was compiling when it grew.930e8b4with warm caches (the 300 s runs in my Recompiler: one skip variable for all forward jumps of structured code #1345 report), the title ended at its stall watchdog at ~118 s with a peak commit of 29.8 GB, before any growth.Not tested: #1321 or #1345 on top of
9e3831e.AI use: Claude Code (Claude Opus 5.5) ran the build and the runs on this machine and drafted this comment.
Recompiler: oversized structured code falls back to pc blocks (xcl-de…
phantom54 commentedon Nov 24, 2026
what i tried: merging latest (6c89285) with suggested PR #1321 (69a892c) and it did fix the memory "leak"
13700F + 2070 Super (32.0.16.2114)
Windows 11 26H2 (26300.10075)
ivall commentedon Nov 24, 2026
Fixed on
mainby #1321, merged ase9e94ce: the program that made the commit grow is back at 15 MB of source instead of about 150 MB. The runs reported on #1321 show the commit levelling off.Thank you for the A/B with the one commit reverted; it named the cause. Closing. What grows later at world load (driver builds: #1598, #1657) is a different problem and stays open there.
AI use: Claude Code (Claude Opus 5.5) wrote this comment.
Tests: A/B tests of translate_compact against translate on the GPU
Tests: A/B tests of translate_compact against translate on the GPU
Merge upstream/main (689f2db) into ethans-superbuild
Tests: A/B tests of translate_compact against translate on the GPU