Repository navigation
Description
With XCL_PER_LANE=1 the retail title (TitleID 7952987A, the one of #505) loses its device at the first world frames: the per-lane form of two wave32 compute programs does not finish on the GPU. With the per-lane form kept to wave64 programs there is no hang, but two small programs take 189 ms and 357 ms a call and the world runs at 0.5 fps.
Setup: #2057's head 4df1e6e (on main 568e7db, so without the per-lane fixes merged or opened since: #2117, #2128, #2503, #2321 …) plus local changes outside the recompiler. Linux 7.3, Proton Experimental's Wine, vkd3d-proton 3.1 with the XCL patch, RTX 4070 Ti 12 GB (driver 620.73.04), i7-14700K. XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PER_LANE=1 XCL_GPU_PROFILE=1, Series S, runs of 120–200 s. The programs are named by XCL_GPU_PROFILE.
[SHADER] hash |
Shape | With XCL_PER_LANE=1 |
Per-instruction form |
|---|---|---|---|
a2325a5828f82784 |
CS, 32x1x1 threads, wave32, 9,508 B code; Dispatch of 17x1x1 groups | RUNNING for 4411 ms and not finished, Xid 109 (CTX SWITCH TIMEOUT), device removed at ~72 s |
~0.26 ms a call (8,810 calls) |
6f2d17214d434d66 |
CS, 32x1x1 threads, wave32, 12,676 B code; 36x1x1 groups | with the first one kept out: RUNNING for 5811 ms and not finished, device removed at ~74 s |
~0.8 ms a call |
4ef76f69bf3b5606 |
CS, 16x16x1 threads, wave64, 1,936 B code; 69x39x1 groups | 357 ms a call (122 calls, 43.5 s of GPU time in 200 s) | not in the top-15 lists |
be7a084f47ea94d5 |
CS, 16x16x1 threads, wave64, 1,300 B code; 69x39x1 groups | 189 ms a call (244 calls, 46.2 s) | not in the top-15 lists |
- The first two rows are two runs: the second with a local switch that keeps one hash in the per-instruction form. The last two are a third run with a local switch that gives the per-lane form to wave64 programs only; that run had no hang and no GPU-wait timeout.
- The programs that take most GPU time here did not get cheaper in that third run:
56c0cd3b82a00c6e9.8 ms a call (9.6 in the per-instruction form),7bb2d0b9894ded7f20.0 ms (21.2),a74706fb8f96ade966 µs (72). - 788 program builds were refused by the per-lane form and fell back:
a branch on whether any lane of a mask is set, with lanes in EXEC without its bit215,unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)207,unsupported IMAGE_SAMPLE_L / IMAGE_LOAD / IMAGE_SAMPLE_LZ / IMAGE_STORE (it reads register N the per-lane form did not pass)194,EXEC as a number in the split form where some lanes are elsewhere30,a value written while some lanes were elsewhere, read after they met again27.
Not tested: current main or a branch with the open per-lane fixes (#2458's, #1889's); Windows; an AMD card; whether the two wave32 programs loop without end or only run very long (the driver gave up after ~5 s each time).
I can rerun on a commit you name. Without XCL_PER_LANE the same build runs this scene for 300 s (3–13 fps with placeholder textures).
AI use: found, measured and written with Claude Code (Claude Fable 5.2).
Activity
thehollowedone commentedon Nov 27, 2026
Current-main follow-up for #2647. I rechecked the four reported compute inputs offline at
623d02e4, using XCL's current per-lane and per-instruction translation paths with four memory windows and split wave64 where applicable. Both paths accepted all four. This was translation and emitted-DXIL inspection, not a rerun of the reported GPU timeout or frame-time regression.The two wave32 programs each still have 19 backward-address guest CFG edges. Their emitted forms have no cross-half spin-limit comparison, group-shared atomic, or group barrier. The two wave64 programs each have three guest blocks and no backward edge; their per-lane forms contain one cross-half poll-limit comparison, three group-shared atomics, and four barrier calls. The per-instruction forms contain seven, fifteen, and sixteen respectively. These are static site counts, not dynamic execution counts.
This narrows the pending PRs: #2341 and #2796 route only much larger programs, so their size caps would not change these four on this build. #2769 bounds guest loop backedges and could affect the wave32 pair if a guest loop is running away; it cannot bound a guest loop in the wave64 pair because neither has one. None of these observations identifies the cause of the old device timeout or 190–360 ms dispatches.
The useful next check is a guarded rerun of the same reported workloads on a named current revision, recording backend selection, dispatch completion, and GPU times for per-lane on/off with the same inputs and cache state. A bounded guest-loop counter would distinguish a runaway wave32 loop from a long-running but terminating one. For the wave64 pair, matched GPU timestamps and output checks are needed before changing the cross-half exchange. AI use: Codex (GPT-6.2 Astra) inspected the current translation paths; Codex (GPT-6.2 Sol) checked this report.