Repository navigation
Description
On a 32 GB machine, the title's shader precompile on main never finishes: it reaches 23,000 of 26,503 shaders, then either aborts out of memory or stays on the same shaders for good. There is no time or memory limit on one shader, so one program can take the whole run with it.
Setup: AMD Radeon RX 6800 16 GB, driver 32.0.21045.5002; Intel i5-10600KF; 32 GB RAM; Windows 11 Pro 26200; DXC 1.9.2602.17; main 6089122a, release build, clean worktree. Retail title 2c508222 (TitleID 7952987A), cold shader cache for this commit (26,503 shaders).
What happened (3 attempts, xcl run):
| attempt | compile threads | result |
|---|---|---|
| 1 | 11 (default) | 23000/26503 after 6,160 s, then DXC: a program could not be linked with its memory accessors, compiled whole, and no more programs are linked: Link: Not enough memory resources are available to complete this operation. (0x8007000E), then memory allocation of 5828608 bytes failed and exit 0xc0000409 |
| 2 | 11 (resumed from the cache) | exit 0xc0000409 again, about 20 min in |
| 3 | 4 (XCL_DXC_THREADS=4) |
23000/26503 after 91 s (cache), then no progress for over 18 min; the process had 75.5 GB of commit (32 GB RAM + page file) when I closed it |
- Just before the stall the log names the biggest programs:
56c0cd3b82a00c6e: 30266 KB of HLSL would compile unoptimised – direct DXIL instead,958400d2caf07244: 30185 KB …,95cc13288a27a96e: 15020 KB …. I have not yet measured which program holds the memory: that is the next thing I will run, one program at a time. - Fewer threads did not help, so it looks like one or a few programs, not many compiles at once.
- Smoke runs (
scripts/smoke.ps1) onmaincannot get past this on this machine, so I cannot make amainblock for a PR (D3D12.X: coherent UMA windows in a driver heap on NVIDIA (port of #2844 to amd-dev) #3061 is waiting on it).
What I suggest: a limit per shader in the precompile, so that the worst case is "this program is built when the title first uses it" instead of "the run never starts":
- a time limit per program (for example a few minutes), and a commit limit, after which the program is left out of the precompile and recorded, as the driver-crash list does;
- since DXC runs in the process and cannot be cancelled, the programs over a size threshold could be compiled in a child process that can be ended at the limit;
- an out-of-memory result from DXC (
0x8007000E) leaves that program out instead of aborting the whole precompile.
Related: #1724 (reserve DXC memory by source size), #2585 (keep linking on a transient out-of-memory), #1710 (compile again after an out-of-memory). Those limit or retry concurrent compiles; none of them puts a bound on one program, which is what stops this run. I will test #1724 and #2585 on this title and post the results here.
AI use: Claude Code (Claude Opus 5.5) ran the attempts, read the logs and wrote this issue. All numbers come from those runs on the hardware above.
Activity