You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Since b8b1f49 one compute program of the retail package takes more than 30 GB to compile; with the preload the title's process is killed for memory in its first minute #1332
Since b8b1f49 ("Recompiler: jumps to outer loop heads and into loops are structured"), xcl shaders shaders.rpf --precompile --only cs passes 30 GB of memory at record 22619 of the retail package (1.0.2.1) and is killed; with that commit reverted the same records compile with memory steady. In the title, once that program is in used-pipelines.txt, the preload compiles it at start and the kernel's OOM killer ended 3 of 3 runs at 56–71 s with the process at 45–50 GB.
Setup: Fedora 44 (kernel 7.2.9), 62 GB RAM, Ryzen 9 9950X3D, RTX 4060 Ti 16 GB (driver 615.71.09), Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b, DXC 1.9.2609.5, release, x86_64-pc-windows-gnu. Tree: mainb8b1f49 + #684 + #751 + #1045 + #850 + #851 + #906 + #688, all clean merges; the comparison tree is the same with b8b1f49 reverted (it reverts cleanly). Each process ran under a 30 GB cgroup limit (systemd-run --scope -p MemoryMax=30G) unless said otherwise.
The offline pass (XCL_DXC_THREADS=2, no --pipelines, so no driver and no dxil-spirv):
tree
--limit
result
with b8b1f49
23000
killed at the 30 GB limit after 23 s
with b8b1f49
22619
killed at the limit after 19 s
with b8b1f49
22618
finished in 4 s (461 compiled)
b8b1f49 reverted
23000
finished (two passes, 500 s and 242 s), 843 compiled, 0 errors, memory steady
So it is one program, the 22619th record in the package's order. Without --limit and with 2 threads the process stayed near 8 GB for 170 s and then went past 30 GB within about 10 s. I did not separate XCL's translation from DXC, and I do not have the program's name (the pass does not print it).
In the title (XCL_PSO_WAIT_MS=50, preload on, no memory limit): three runs in a row were ended by the kernel, with no XCL crash line:
07:10:59 Out of memory: Killed process 750339 (main) total-vm:189762000kB, anon-rss:45035232kB
07:12:49 Out of memory: Killed process 755753 (main) total-vm:198360408kB, anon-rss:50392952kB
07:14:22 Out of memory: Killed process 760055 (main) total-vm:192322212kB, anon-rss:47584624kB
A fourth under the 30 GB limit was killed at 24 s. A thread dump at 20 s showed two xcl-dxc threads in dxcompiler.dll and two xcl-pso-pre workers waiting for them, 14 s after their last log lines. Three earlier runs of the same tree had lasted 138–194 s; they still had 61–95 shaders to compile first.
This is the same commit as #1246 but a different symptom (that one is vkd3d-proton's dxil-spirv; this pass creates no pipeline), and it looks from outside like #1035 (the preload, memory growing at the title screen) with another cause.
Not tested: native Windows; plain main without the pull requests listed; whether the memory goes to the translator or to DXC; main after b8b1f49 (930e8b4 has no later recompiler change); the cargo test suite.
AI use: Claude Code (Claude Fable 5.2) ran the passes and the title, bisected the record count and drafted this issue.
Record 22619 in the package's order is indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays_d60186e6_Wrapped. It is the program I found for #1307: since b8b1f49 its structured HLSL is 148.5 MB (13.8 MB with b8b1f49 reverted), so the memory goes to DXC, not to the translator. Translating it takes about 1.5 s either way.
The cause is the structured form's skip-flag guards, which list every pending flag each time they reopen. That grows with the square of the pending flags: this program has 3 861 flags and guards of up to 597 terms. Details in #1307 (comment).
#1321 translates structured code longer than 128 bytes per byte of program as pc blocks. Over the whole pack only this program changes (148.5 → 13.8 MB), and the next largest structured one is at 61 B/B. @Royalflamejlh, your --precompile --only cs --limit 22619 pass under the 30 GB limit on #1321's head (156b0de) would be a direct check of it.
Ran it: on #1321's head 156b0de the pass over the first 22,619 records finished under the 30 GB limit, with 0 errors. On b8b1f49 the same command was killed at the limit after 19 s.
Setup: the machine above (Fedora 44, Wine 11.21 Staging, DXC 1.9.2609.5, 62 GB RAM). 156b0de as it is, with no other pull request, release, x86_64-pc-windows-gnu. xcl shaders shaders.rpf --precompile --only cs --limit 22619, XCL_DXC_THREADS=2, an empty XCL_DXIL_CACHE folder, under systemd-run --scope -p MemoryMax=30G -p MemorySwapMax=1G.
It took two goes, because of a time limit of mine and not of memory. The first was stopped by my 420 s timeout with 455 programs written to the cache; it printed 22600/22619 at 284 s and wrote its last file about 100 s before the timeout. The kernel logged no memory kill.
The second, on the same cache folder, wrote one more file, 14,105,380 B of DXIL, and ended after 47.5 s: compiled 462, already cached 0, errors 0.
Memory in the second go, sampled every 5 s: 2.5 GB at most. I did not sample the first.
So the last program of that range, which took the process past 30 GB on b8b1f49, compiled here in under 48 s.
Not tested: the title on 156b0de (whether the preload now survives the first minute); the pass without --limit or with --pipelines; why the first go spent its last 100 s on that one program without finishing it.
This issue duplicates #1307, which I had not seen when I opened it. Closing it in favour of #1307 and #1321.
AI use: Claude Code (Claude Fable 5.2) built the tree, ran the pass and wrote this reply.
Activity
tiagonogueiraa-bit commentedon Nov 24, 2026
Record 22619 in the package's order is
indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays_d60186e6_Wrapped. It is the program I found for #1307: since b8b1f49 its structured HLSL is 148.5 MB (13.8 MB with b8b1f49 reverted), so the memory goes to DXC, not to the translator. Translating it takes about 1.5 s either way.The cause is the structured form's skip-flag guards, which list every pending flag each time they reopen. That grows with the square of the pending flags: this program has 3 861 flags and guards of up to 597 terms. Details in #1307 (comment).
#1321 translates structured code longer than 128 bytes per byte of program as
pcblocks. Over the whole pack only this program changes (148.5 → 13.8 MB), and the next largest structured one is at 61 B/B. @Royalflamejlh, your--precompile --only cs --limit 22619pass under the 30 GB limit on #1321's head (156b0de) would be a direct check of it.Written with Claude Code (Claude Opus 5.5).
Royalflamejlh commentedon Nov 24, 2026
Ran it: on #1321's head
156b0dethe pass over the first 22,619 records finished under the 30 GB limit, with 0 errors. Onb8b1f49the same command was killed at the limit after 19 s.Setup: the machine above (Fedora 44, Wine 11.21 Staging, DXC 1.9.2609.5, 62 GB RAM).
156b0deas it is, with no other pull request, release,x86_64-pc-windows-gnu.xcl shaders shaders.rpf --precompile --only cs --limit 22619,XCL_DXC_THREADS=2, an emptyXCL_DXIL_CACHEfolder, undersystemd-run --scope -p MemoryMax=30G -p MemorySwapMax=1G.22600/22619at 284 s and wrote its last file about 100 s before the timeout. The kernel logged no memory kill.compiled 462, already cached 0, errors 0.So the last program of that range, which took the process past 30 GB on
b8b1f49, compiled here in under 48 s.Not tested: the title on
156b0de(whether the preload now survives the first minute); the pass without--limitor with--pipelines; why the first go spent its last 100 s on that one program without finishing it.This issue duplicates #1307, which I had not seen when I opened it. Closing it in favour of #1307 and #1321.
AI use: Claude Code (Claude Fable 5.2) built the tree, ran the pass and wrote this reply.
D3D12.X: a huge compute program the driver refuses is logged with its…
D3D12.X: a background driver compile needs the commit its size takes
D3D12.X: a background driver compile stays within a share of the RAM