Recompiler: write split-wave helpers into the entry, not as functions #3707
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3707"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-02T16:24:45Z.
Since #3655, every title whose compute shaders use the split-wave64 rendezvous or the safe group barrier ends a few seconds after start under Wine (vkd3d-proton), on any GPU. #3655 writes these two loops as internal DXIL functions (
xcl.spin.wait,xcl.barrier.arrive) that take groupshared pointers, and dxil-spirv can't type a pointer parameter: it callsstd::terminate(). This change writes the helpers' bodies into the entry when the bitcode is written, which is what DXC does for a non-library shader. Planning, optimisation and dispatch-chain cuts are unchanged.What is in it
VKD3D_LOG_FILE,main5eaadb54) ends withdxil-spirv: Cannot reliably convert LLVM pointer type, we cannot differentiate between Function and Private.That isdxil_converter.cppget_type_id(dxil-spirv b540c8a2, vkd3d-proton master's), which callsstd::terminate()for any pointer type outside physical node I/O. Leaf-function parameters go through it, so a pointer parameter ends the process. XCL's log shows the abort on anxcl-pso-aheadthread right after it built a translated console CS (process ends with status 0x3, msvcrtabortind3d12core.dll).df0cfef6(before #3655) runs (1449 frames in 60 s, 0 faults);d71578f8(df0cfef6+ #3655 only),1fdb11f7and5eaadb54all end at ~3.5 s with exit 0x3. The same happens with stock vkd3d-proton 3.1 and with a build on dxil-spirv b540c8a2.module.rs):Module::inline_helpers, called bytry_to_bitcodebefore writing. For every call to a function with a helper body: the calling block is cut at the call, the helper's blocks follow it (arguments mapped to the call's operands, its values renumbered), the helper's last block branches to a new block holding the rest of the cut block and its terminator, the phis of that block's successors now name the new block, and uses of the call take the helper's result. The helper functions are then neither called nor written. Everything before writing (optimize,split_compute's budgets and features, which count a rendezvous as one indivisible call) is as #3655 has it.module.rsspin_wait, after review): the loop let one elected lane signal and poll while the other lanes went straight to the end and waited there for it before loading the peer's slots. Written into the caller, NVIDIA's compiler does not keep that wait (gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_readsread the upper half's values at 48–128 threads on an RTX 5070 Ti, see the merge-check). Now every participating lane goes round the loop; the arrival add, the counter load and the timeout CAS stay with the first lane, and the values that decide the outcome are read from it withwaveReadLaneFirst, so all lanes leave together. It is a plain while loop (one back edge, one exit, outcome selected): a version with the old loop's several exits plus the per-lane branches inside made dxil-spirv's translation spin on the GPU (robustness_tests,mask_exchange,idiomshung under Wine). Same atomics and outcomes; a failed (negative) counter still wins over "reached".main078358a0(7b19e27d), which brought #3652 (a half leaving the program sets bit 30 on its spin counter; a waiting half then gives up at once). Its changes are carried into the every-lane loop: the arrived count is compared under0x3FFF_FFFFbefore the exited bit, a peer's exit leads into the same CAS path as the poll budget, and the bounds check looks at bits 30..31. #3652'sgpu_spin_exchange_early_exit_bails_immediatelylooked for the constants in the helper's body; it now checks that no helper is left and finds them in the entry (its GPU cases pass here: 256 groups bail out in 0.0006 ms, the bound is 2 ms), andsplit_lds_reads_meet_after_writescounts the exit'satomicrmw oronce and not as an exchange.split_lds_reads_meet_after_writeschecks the inlined rendezvous again (one poll and one timeout CAS per exchange on the same partner counter, one arrival per exchange on one own counter, a fence before and after each, a first lane per exchange);a_group_barrier_of_several_hardware_waves_uses_safe_barrier_directlychecks that no helper is left and counts the inlined CAS loops. Newinlined_rendezvous_is_one_loop_with_one_exit_and_first_lane_atomics(IR level) pins the loop shape: one back edge, one exit, every atomic behind the first-lane branch, both fences on the participating path only.inline_helperswalks the module once. Newsplit_compute_rendezvous_and_barriers_have_no_helper_functions: a split compute program (64 and 256 threads) with LDS writes and reads, a group barrier inside a loop and one after it validates and has one function.waveReadLaneFirst, two short first-lane branches and some ALU work more than the elected-lane loop did, and a partner that never arrives takes correspondingly longer to time out (still1 << 20polls). Not measured as frame time; the smoke runs below are atmain's level wheremainruns.Tested
cargo test --workspace(lib tests, at the merge7b19e27d): 2829 passed, 17 failed, 32 ignored, 2 died;main5eaadb54: 2771 passed, 17 failed, 13 ignored, 30 died. The 29 GPU tests that die onmain(dxil-spirv terminate) pass. The 17 failures and one death are the same as onmain. The other death,hle::netoff::tests::a_sockaddr_in6_under_28_bytes_is_left_alone, is a test added onmainafter5eaadb54(ddcf5394) and crashes in Wine's socket code, not in the recompiler.uma_drivergroup (~32 GB of address space under Wine) left out, andserialize_root_signature_strips_console_flags_and_preserves_pc_flagsremoves the device and ends its process (the 1 died), both the same onmain.main5eaadb54the same way: 2771 passed, 17 failed, 13 ignored, 30 died. 29 of those are split-wave64 / dispatch-chain / safe-barrier GPU tests (mask_exchange,idioms,module::split,robustness_tests,recomp::lower_dxil,recomp::lower,recomp) that end their process in dxil-spirv'sstd::terminate()onmain; they pass here. No test fails only with this PR; the 17 failures are the same on both (gpu::dxilfuzz/round andrecompf32/f64/FMA GPU tests,device_x,list_x,real::*, and thetitle_texturesgroup, all known under Wine on this machine).912ff558alone:core_tests36/0/1,robustness_tests15/0/0,module59/0/0 (incl.module::splitand the new IR test),mask_exchange20/0/0,idioms9/0/1 (incl.gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads); the new test runs (not skipped).Regression run
main:
PR:
No amdgpu page fault, ring timeout or reset in the kernel log during the PR's run, and no dxil-spirv error.
peak commitreads 0 MB under Wine. Both runs with the same Wine, vkd3d-proton and environment.NVIDIA: needs #3748 first
On NVIDIA the split halves can fall out of step through the mask-skipping bug (#505). On
mainthe wave then reads zeros (dark frames). With this PR the rendezvous keeps polling, so the same bug shows up as a GPU queue watchdog stop in the world (@throny, RTX 4080). WithXCL_X64_ALL_MASKS=1there was no stop in 2 of 2 runs, so the cause is the out-of-step halves, not a new loop. #3748 makes exchanging every mask the default; this PR should be merged after it, and @throny will rerun it on top of #3748.Not tested
mainthe same way); Windows (no dxil-spirv; DXC-style output is the safe form for native drivers too, but not measured).main.AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-02T16:27:12Z.
Thanks for jumping on this, @lucsoft — inlining
HelperBodyintry_to_bitcodeis much cleaner than revertingb995046b6(keeps all of #3655's ~91% exchange/barrier reductions,optimize, andsplit_computebudgets untouched).Cross-linking #3694 (Windows AMD
amdxc64.dll0xc0000409on RX 9070 XT and0x887A0005device removal on RX 6700 XT / RDNA2 iGPU since #3655): this removes the exact same internal functions takingaddrspace(3)*groupshared pointers from emitted bitcode, so it likely fixes #3694 too. cc @Chrysana @ArtuArtaza if you can give #3707 a quick run on RX 9070 XT / RX 6700 XT.(Also moved #3654 to Draft since its outlined
xcl.sbuf.*helpers passi32*output pointers and emit internal DXIL functions.)AI use: Antigravity (Gemini 4 Neon) reviewed #3707's diff against #3694 and drafted this comment.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-02T16:32:07Z.
merge-check
base:
5eaadb54c1head:
b2e6f239d4merge: clean
build: cargo build --workspace -> ok (
cargo build --release -p xcl-> ok)tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2974 passed, 1 failed, 52 ignored; SKIPPED: 24 (22 no wave64, 2 no heap windows); failing:
gpu::dxil::idioms::tests::gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads(passes on base5eaadb54c)review:
gpu::dxil::idioms::tests::gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_readsfails deterministically on RTX 5070 Ti (driver 610.74) for every split thread count > 32 (48,64,96,128; passes at32threads and passes withidioms=false; passes all thread counts onmain5eaadb54c).threads=48,idioms=true): every thread (t0..t47) outputs[0x48848442, 0x00004c84]([1216644162, 19588]) instead of[0x48644442, 0x00004c64]([1214530626, 19556]), i.e. every lane gets the upper half's values[66, 132, 132, 72, 132, 76]forj = 1, 2, 4even though lower half hadj=1 -> 68 (has=1)andj=2,4 -> 100.module.rs,core_tests.rs,robustness_tests.rs) and the disassembled 48-thread DXIL:Module::inline_helpers/inline_callis clean and the emitted DXIL IR is mathematically valid (and a separate local revert ofb995046b6hit the exact same wrong output on RTX 5070 Ti, even withXCL_DXIL_NO_OPTdisabling all opt passes). That strongly suggests an NVIDIA shader-compiler miscompilation triggered when@xcl.spin.waitis inlined intosix_first_lanes's 10-word lazy meet.inline_helperscallsself.replace_uses(...)once per inlined call site (O(calls * insts)), which is fine for small shaders but easy to batch into one pass if needed.PR descriptionCI failure:scripts/pr_check.py:66rejectsframes shown: none logged (the run did not reach its end)in themainsmoke block because it expects a leading digit (^(\d+)). Changing that line toframes shown: 0 (crashed at ~3.5 s before first frame)(or maintainer override) clears it.#3694), Linux/vkd3d-proton, wave64 GPU tests, heap-window GPU tests.performance: 60 s smoke of a retail title (
ea3b5e4d),main5eaadb54cvs#3707b2e6f239d: 1693 -> 1419 frames shown (coldXCL_DIRECT_DXIL_SOURCE_IDtranslation cache on#3707sincemodule.rschanged; steady-state last presents per 2 s:60 61 60->60 60 60), peak commit16723->15881MB, 0 device removals, 0 crashes.verdict: not yet:
gpu::dxil::idioms::tests::gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_readsfails deterministically on RTX 5070 Ti (48/64/96/128 threads, passes onmain5eaadb54c)hardware / tool and model: RTX 5070 Ti (driver 610.74), Ryzen 9 9950X, Windows 11 26200, rustc 1.99.0, DXC 1.9.2609.5 / Antigravity (Gemini 4 Neon)
AI use: Antigravity (Gemini 4 Neon) ran the build, full test suite, paired 60 s smoke, and diff/DXIL audit and drafted this merge-check.
Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-02T17:31:15Z.
Thanks for the run and the numbers. I think the failing test is real rather than a driver bug: the inlined rendezvous let one elected lane signal and poll while the other lanes jumped to the end and relied on waiting there for it before loading the peer's slots. As a separate function NVIDIA's compiler evidently kept that wait; written into the caller it does not, so the other lanes read the slots before the partner half wrote them (which matches every lane getting the upper half's values).
886f9057(second commit) makes every participating lane go round the polling loop: the arrival add, the counter load and the timeout CAS stay with the first lane, and every value that decides the outcome comes from it throughwaveReadLaneFirst, so all lanes leave the loop together and only then fence and load. The loop is a plain while loop with one exit; a first try that kept the old loop's several exits made dxil-spirv's translation spin on the GPU under Wine, so that shape is gone.On RX 7800 XT / RADV under Wine at
886f9057:core_tests36/0/1,robustness_tests15/0,mask_exchange20/0,idioms9/0/1,module58/0; the 180 s smoke block is in the description. Could you rerungpu::dxil::idioms::tests::gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads(and the suite) on the RTX 5070 Ti?PR description check: the
mainblock saysframes shown: none loggedbecausemainends at ~3.5 s under Wine; that is smoke.ps1's own output for a run that never reaches its end, so I left it as printed rather than writing a number it did not log.AI use: Claude Code (Claude Opus 5.5) found the cause, wrote the change and drafted this reply; reviewed by me.
Imported from ivall/xcl. Originally posted by cj-tomlin on 2026-12-02T17:38:59Z.
Test report, head
886f9057a7ba3ed33c5b6418af62d51f68c336cfonmain5eaadb54c14e0fc29597b2a1689d7dbd83491303(the head is based on it: the merge is a fast-forward).cargo build --workspace: ok.cargo test --workspace --no-fail-fast -- --test-threads=4: 2975 passed, 0 failed, 52 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll), the same 27 as plainmain(2974 passed, 0 failed, 52 ignored) on this machine.gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads,gpu_split_wave64_local_votes_leave_what_the_exchange_leaves, the newsplit_compute_rendezvous_and_barriers_have_no_helper_functionsandconsole_wave64_compute_through_the_pso_hook_dispatch_and_read_backpass in that run, with no SKIPPED line for them.b2e6f239the uniform-first-lanes test also passed here: alone, 3 of 3 runs, and in a full suite (2975 passed, 0 failed). So the failure reported on the RTX 5070 Ti did not show on this card at either head.Diff read (both commits, +202/-59 in
module.rs,core_tests.rs,robustness_tests.rs). This says nothing about #3694 itself: no AMD GPU and no Wine here, and no title run.Tool and model: Claude Code (Claude Opus 5.5) merged, built, ran the tests and drafted this; I checked it.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T17:44:50Z.
Edited: the narrowing below is wrong. With only pointer-taking helpers written in, the title still ended at start under Wine (exit 0x3 in
d3d12core.dll, 2.4 s, 1 run); with every helper written in, as this PR does, it got past that (shader preparation ran on with no worker ending, 1 run). So this PR's inline-everything is what works; on a branch with #3654 the fix is to update #3654's tests to the written-in form, not to narrow this.A note for when this meets #3654 (open, Kalmarv), which outlines more helpers (f16 rounding, raw heap loads and others) as internal functions with helper bodies.
We carry both on an integration branch (
main5eaadb54+ #3654 + other PRs). With this PR merged in as it is,Module::inline_helperswrites every function that has a helper body into its callers, which also undoes #3654's outlining. 11 of that branch'sgpu::dxiltests then failed, all of them #3654's tests that check the outlined helpers in the written module (e.g.module::tests::legacy_products_share_one_zero_preserving_function,helper_and_entry_inherit_function_abbreviations,compute_fmad_outlines_word_results_and_keeps_float_consumers).Since dxil-spirv only fails on pointer parameters, we narrowed it: only helpers whose function type takes a pointer are written into their callers; the rest stay functions:
With that, 7 of the 11 pass again. Four still fail because they count calls of helpers that do take a pointer and are now written in (
xcl.spin.wait,xcl.raw.word4):lane_spill::tests::a_forwarded_readlane_exchanges_nothing_in_the_split_formand threelower_mem::stage_guard_tests. Those need the inlined form counted instead; the behaviour they guard is unchanged. Under Wine on CPU Vulkan, 1 run.On
mainalone this does not come up, since only #3655's two helpers have bodies there. If #3654 lands first, the pointer check (or #3654's tests counting the inlined form) is what keeps both.AI use: Claude Code (Claude Opus 5.5) found the interaction, made the change and wrote this comment.
Imported from ivall/xcl. Originally posted by Edgaras0404 on 2026-12-02T17:49:18Z.
merge-check claim
head:
886f9057a7Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-02T18:03:19Z.
Thanks for running it against #3654, that interaction is real. I'd still keep this PR writing every helper into its callers, not only the ones that take a pointer:
std::terminate()inget_type_id). Whether value-only internal functions are fine on every consumer is not known yet: DXC never writes internal functions in a non-library shader, so drivers see them only from us. #3694 (AMD'samdxc64.dllon Windows since #3655) hasn't been narrowed down to pointers either.mainit makes no difference today (#3655's two helpers both take pointers).So for #3654: if its outlined value-only helpers are shown to work where it matters (dxil-spirv under Wine on AMD and NVIDIA, and AMD on Windows given #3694), narrowing
inline_helpersto pointer-taking helpers is the one-line change you posted (takes_pointer), and #3654 can carry it together with that evidence. Until then its tests would count the inlined form.(Separately, correcting what I wrote above about the description check: the
mainblock'sframes shownnow reads0with smoke.ps1's own words next to it, since that run logged 0 presents before it ended at ~3.5 s and the check needs a number.)AI use: Claude Code (Claude Opus 5.5) drafted this reply; reviewed by me.
Imported from ivall/xcl. Originally posted by Edgaras0404 on 2026-12-02T18:07:15Z.
merge-check
base:
817eb1fc9fhead:
886f9057a7merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> non-lib targets: 151 passed, 1 failed, 20 ignored. The lib binary aborts with 0x80004005 in
hle::d3d12x::list_xon both trees and prints notest result:line: merge 1433 ok / 6 FAILED / 26 ignored, base 1158 ok / 280 FAILED / 26 ignored (2885 scheduled, so the lib run is incomplete). SKIPPED: 2 (no heap windows).Merge failures:
gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form,gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu,gpu::recomp::tests::gpu_f32_compares_with_nanandgpu::recomp::tests::gpu_float_compares_randomfail with the same values on base alone;hle::d3d12x::bind::tests::gpu_two_pass_pooled_scratch_respects_remaining_budgetandhle::d3d12x::list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_listpass alone on both (parallel-run failures);two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobsfails atgpu_two_pass_cache_e2e.rs:584on both. Base additionally fails the split-wave64 tests (see review); they pass on the merge.title run: merge
2e3184ec, 60 s smoke (Enter injected to clear the menu), title 1778c2d9: 1578 frames shown (PresentX 1578), last-3 presents 61/60/33, 0 device removals, 0 crashes, peak commit 17629 MB, exit 0x0. Base817eb1fc: exit 0x887a0020, 0 frames, 1 device removal, 2 crashes, peak commit 5300 MB.review:
817eb1fc,gpu::dxil::idioms::tests::gpu_split_wave64_local_votes_leave_what_the_exchange_leaves,...::gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_readsandgpu::dxil::module::split::tests::dispatch_chain_safe_barrier_crosses_cutsfail 2 of 2 runs each withCreateComputePipelineState: The GPU device instance has been suspended ... (0x887A0005), and the basegpu_compute_e2ebinary dies with0x887a0020after 2 of its 9 tests. On the merge all three pass 2 of 2,gpu_compute_e2eis 9/9, and everymodule::splittest passes. This is the RDNA2 device-removal symptom of #3694 and the AMD Windows coverage the PR listed as not tested.inline_helperswrites every function with a helper body into its callers. On currentmainonlyxcl.spin.waitandxcl.barrier.arrivehave bodies, so the scope is right. Royalflamejlh's edited comment says narrowing to pointer-taking helpers is not enough (the title still died under Wine with only those written in), so inline-everything is the intended form; if #3654 lands first, its tests must count the written-in form (or carry itstakes_pointervariant with separate evidence). Merge-order note, not a defect here.inline_callis hand-written CFG surgery: block cut, tail move, successor-phi rewrite, call operands mapped to helper arguments, helper values renumbered. I traced both helper bodies (11 and 7 blocks; neither ends with a terminator, so the appendedBr(tail)is the only one) and found no wrong mapping.replace_usesruns once per call site (O(calls * insts)); fine here, easy to batch later.debug_assert_eq!on the block layout only runs in debug/test builds; release trusts it. The newsplit_compute_rendezvous_and_barriers_have_no_helper_functions(64 and 256 threads, barrier in a loop and after it) validates the emitted DXIL and would fail without the change (twodefines and the helper names); the two updated tests now assert no helper function and count the inlined atomics/CAS.PR descriptionfailed on the 17:58 run, which used the pre-edit body (frames shown: none logged); the body now readsframes shown: 0, so it should clear when it reruns.Build and test (Windows, no GPU)was still in progress when this check was made. Both must be green before merge.performance: base crashed before the world (0 frames), so a base/merge frame ratio is not meaningful. Merge 1578 frames / 17629 MB is at this machine's known clean 60 s main level (1615 frames / 16487 MB; +6.9 % peak) and close to the earlier clean merge (1618 / 17726). Writing each rendezvous into its caller gives up #3655's DXIL-size sharing, so DXIL grows; drivers inline before code generation, and the measured GPU work is unchanged within run-to-run noise.
verdict: safe to merge
hardware / tool and model: AMD Radeon RX 6700 XT 12 GB (RDNA2), driver 32.0.21045.29003; AMD Ryzen 5 5600X; Windows 10 build 19045 / DeepSeek V4.1 Flash 1017 (OpenCode)
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T18:08:46Z.
Test report (not a merge-check:
PR descriptionred)base:
5eaadb54c1head:
886f9057a7merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2975 passed, 0 failed, 52 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (
b2e6f239, +146/-31) and the follow-up commit886f9057("poll the split-wave rendezvous with every lane",module.rs~538-660, +56/-28). Since #3655 the split-wave64 rendezvous (xcl.spin.wait) and the safe group barrier (xcl.barrier.arrive) are internal DXIL functions with groupshared pointer parameters, which dxil-spirv can't handle (titles under vkd3d-proton end at about 3.5 s); this PR inlines every helper body into the entry intry_to_bitcode, on every module. The reported NVIDIA failure: a merge-check onb2e6f239(RTX 5070 Ti, driver 610.74) hadidioms::tests::gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_readsfailing at 48/64/96/128 threads, most likely because only the first lane entered the loop and the other lanes branched straight toexit, so once the loop sits in the caller NVIDIA's independent thread scheduling doesn't keep their wait at the merge.886f9057makes every participating lane go round the loop, with only the arrival add, the counter load and the timeout CAS behindfirst, each result broadcast withwaveReadLaneFirstright after the branch rejoins, so the loop exit is uniform and the fence and slot loads come only after the exchange completed or failed; under split wave64 each half is its own hardware wave with its own first lane andowncounter; by reading, the phis and dominance across the 11 blocks hold and the outcomes match the old loop (a negative counter still fails ahead ofdone, a timeout fails only when the CAS saw the peer unchanged or failed, otherwise it succeeds or polls again as the oldracededge did). This run (below) passes that test at886f9057on an RTX 5070 Ti (driver 621.14), along with the whole suite. Still open: (1) rendezvous structure assertions deleted, not ported.split_lds_reads_meet_after_writes(core_tests.rs~150-170) lost the checks for shared arrival counters, one TGSM fence before and after the broadcast, the no-partner edge skipping both fences, leader election bywaveIsFirstLaneand the broadcast phi, all still true of the inlined code; only a no-helper check and an atomic count are left, close to the rule against weakening assertions; and nothing at IR level pins the new every-lane loop shape (one back edge, one exit), though the commit message says a version with several exits hung dxil-spirv. (2)inline_helpersinlines everyhelper_body, not only the two its doc names, which undoes #3654's outlining, leavesOp::CallOutputunhandled, and breaks #3645's new helper test after a clean textual merge. (3) Cost: each poll now runs two to three times as many instructions (two branches, twowaveReadLaneFirst, about 20 ALU ops), so a partner that never arrives takes correspondingly longer to fail (1 << 20 polls); unmeasured on Windows. (4) Minor: each inline rescans from block 0 (find_map~704) and runsreplace_usesover the whole module (~793), O(sites × module); the new test turns anydisassembleerror intoSKIPPED no DXC(~201), which would hide malformed bitcode; the description's "the GPU code should not change" no longer holds after886f9057. Fine: the CFG splice, phi and argument remapping (forward refs included), shifted branch and switch targets, the tail's successor phis (self-loop included), the RPO layout, dropping the helper declarations, inlining per piece module aftersplit_compute, the source-hash cache key, and a new test that fails on main.performance: 60 s smoke of a retail title, main
5eaadb54vs this merge (886f9057): 1422 -> 1576 frames shown (110 %; last presents per 2 s: 60 60 60), peak commit 17184 -> 16037 MB, 0 device removals, 0 crashes.assessment: merges, builds and passes the whole suite on current main (including the test the earlier RTX 5070 Ti report had failing), and the smoke run is clean; the blocking point is in the review: the rendezvous structure assertions in
split_lds_reads_meet_after_writeswere deleted rather than ported, andinline_helpersinlines every helper (undoing #3654's outlining); the reported RTX 5070 Ti failure itself passes in this runhardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
AI-written and posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T18:09:43Z.
Agreed, and our own run backs it: with only the pointer-taking helpers written in, the title still ended at start under Wine (exit 0x3 in
d3d12core.dll, 2.4 s, 1 run); with every helper written in, as here, it got past that. I edited my comment above to say so; on our branch #3654's tests are what change.AI use: Claude Code (Claude Opus 5.5) wrote this reply.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T18:14:57Z.
merge-check
base:
5eaadb54c1head:
886f9057a7merge: clean
build: ok
tests: 2975 passed, 0 failed, 52 ignored; 28 skipped, the same as on main
review: 2 high, 2 medium, 2 nits (below)
performance: 60 s smoke run: 1422 → 1576 frames (110 % of main), peak commit 17184 → 16037 MB, no device removal, no crash
title run: not run
verdict: not yet: 2 high findings (1 and 2 below), and
PR descriptionis red: its main smoke block saysframes shown: none logged, so it needs a smoke pair from runs that finish. The earlier RTX 5070 Ti failure ofgpu_split_wave64_uniform_first_lanes_read_what_the_exchange_readspasses in this runhardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
In short: The PR fixes titles that stop at about 3.5 s under vkd3d-proton: it copies the split-wave rendezvous and barrier helpers into the shader entry, because dxil-spirv cannot handle helper functions that take groupshared pointers. The NVIDIA failure from the last check is fixed (the split-wave test now passes on an RTX 5070 Ti) and the whole suite passes. Two findings should be fixed before merging: deleted test assertions, and the inlining reaching every helper instead of the two it is meant for. The
PR descriptioncheck is also red (see the verdict).High
split_lds_reads_meet_after_writes(core_tests.rs~150-170) lost its checks for the shared arrival counters, the fences around the broadcast, the no-partner edge, the leader election and the broadcast phi, though all of these are still true of the inlined code. Only a no-helper check and an atomic count remain, and nothing pins the new loop shape (one back edge, one exit), which the commit message says matters for dxil-spirv. Port the checks to the inlined form instead of deleting them.inline_helpersinlines everyhelper_body. That undoes #3654's outlining, leavesOp::CallOutputunhandled, and breaks #3645's new helper test after a clean textual merge. Limit it toxcl.spin.waitandxcl.barrier.arrive, or say why all of them must go.Medium
waveReadLaneFirst, about 20 ALU ops per poll), so a partner that never arrives takes that much longer to time out (1 << 20 polls). Not measured on Windows.disassembleerror intoSKIPPED no DXC(~201), so bitcode DXC rejects would show as a skip, not a failure. Skip only when DXC is missing.Nit
find_map~704) and runsreplace_usesover the whole module (~793): O(call sites × module size).886f9057.Checked and fine
done, a timeout fails only when the CAS saw the peer unchanged).split_compute, the source-hash cache key, and a new test that fails on main.How this was tested
5eaadb54, thencargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4.scripts/smoke.ps1: 60 s of a retail title on main5eaadb54and on this merge; presents per 2 s at the end: 60 60 60.Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-02T18:53:00Z.
Thanks for the 5070 Ti run and the close read. On the points:
912ff558(third commit) ports them to the inlined form insplit_lds_reads_meet_after_writes(one poll and one timeout CAS per exchange on the same partner counter, one arrival per exchange on one own counter, a fence before and after each, a first lane per exchange) and addsinlined_rendezvous_is_one_loop_with_one_exit_and_first_lane_atomicsat IR level: one back edge, one exit, all three atomics behind the first-lane branch, both fences on the participating path and the no-partner edge around them.mainonly #3655's two have bodies.Op::CallOutputand #3645's helper test aren't onmain, so whichever of #3654 / #3645 lands after this counts the inlined form (or carries a narrowing with its own evidence).mainblock now saysframes shown: 0with smoke.ps1's own words next to it.maincan't produce a run that reaches its end under Wine (it ends at ~3.5 s), so that is the honest number.inline_helpersnow walks the module once and replaces the results in one walk; the new test skips only when DXC is missing; the description no longer says the GPU code is unchanged and states the per-poll cost.912ff558: dxil modules green under Wine (RX 7800 XT), smoke block in the description.AI use: Claude Code (Claude Opus 5.5) made the changes and drafted this reply; reviewed by me.
Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-02T19:04:01Z.
merge-check
base:
c53e969602head:
912ff558e9verdict: not yet: the focused AMD barrier tests and retail completion checks passed, and the workspace aborts affected both trees. The fresh-data smoke pair on this head showed fewer frames and higher peak commit on the merge. That performance signal needs a repeat. The later merge check covers a newer head.
Windows / AMD RDNA4 — split-wave barriers and retail smoke on
912ff55Clean merge onto
main(merge commit88d11dc839c66baaab6c01d671a431156a45361b).git diff --checkwas clean. GitHub's PR description check was green and the Windows CI job was still in progress when checked.Setup
d3d12SDKLayers.dll, DXC 1.9.2609.5Tested
cargo build --workspacepassed on both builds.cargo test --workspace --no-fail-fast -- --test-threads=4 --show-outputexited 101 on both.SKIPPEDnoticesmainCounts are partial because the library aborted on each build. The merge reached more tests before aborting.
--test-threads=1 --show-output --nocapture. Both new tests passed, as didsplit_lds_reads_meet_after_writes,a_group_barrier_of_several_hardware_waves_uses_safe_barrier_directly, andgpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads.uploads_start_from_each_subresources_statepassed on both builds.Workspace failures, aborts, and skips
fuzz_validate_and_gpu_1,fuzz_validate_and_gpu_3, andtwo_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs. The latter reported two failures on the merge and one on base.gpu_smem_flat_descriptor_windows_and_limits,f32_programs_on_the_gpu,gpu_f32_compares_with_nan,gpu_float_compares_random, andgpu_ps_readfirstlane_loop_on_a_primitive_edge_ends.0xc0000409on base and0x80004005on the merge. Base also abortedgpu_compute_e2ewith0xc0000409. The merge logged two heap-window skips, fortwo_pass_binds_set_the_shared_view_heapandheap_window_out_of_memory_falls_back_to_the_switch_form.Retail smoke
Ran
scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary>withXCL_UMA_DRIVER=mixedfor title hash2c508222.main, initial0xc00004090x00x0main, fresh data root0x0Both fresh-data runs finished without a logged crash. The merge showed 26% fewer frames and 41% higher peak commit in that pair. Startup outcomes varied across attempts, so the pair records a performance difference without establishing its cause.
Diff review
The focused checks exercised the latest head's inlined rendezvous shape, fences, and arrival atomics. The AMD GPU test that previously failed on NVIDIA passed here.
Not tested
Remaining tests after the workspace aborts, NVIDIA on this head, and repeated fresh-data performance pairs.
AI use
Codex (GPT-6) merged and built the PR, ran the tests and smoke comparisons, reviewed the changed paths, and drafted this report.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-02T19:43:30Z.
merge-check
base:
5ad98adbc3head:
912ff558e9merge: clean (75b9667fae0a1c82823f0e330ba73bfea5985e8a;
git diff --checkclean; 3 files, +315/-59)build:
cargo test -p xcl --lib --no-run-> ok (19 lib-test warnings, same asorigin/main5ad98adbc; full workspace/release build skipped after targeted GPU regression failed)tests: targeted split-wave64 and barrier GPU/DXIL suite (
cargo test -p xcl --lib -- gpu_split_wave64 split_lds_reads_meet_after_writes a_group_barrier_of_several_hardware_waves_uses_safe_barrier_directly inlined_rendezvous_is_one_loop_with_one_exit_and_first_lane_atomics split_compute_rendezvous_and_barriers_have_no_helper_functions --nocapture, DXC 1.9.2609.5) -> 24 passed, 1 failed, 0 ignored; SKIPPED: 0; failing:gpu::dxil::idioms::tests::gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads(fails 5/5 deterministically on merged PR, passes 5/5 onorigin/main5ad98adbc). Fullscripts/test.ps1skipped after this deterministic failure.title run: skipped (targeted split-wave64 GPU regression test failed 5/5 on this driver before reaching retail title run)
review: Read the full diff (
core_tests.rs,module.rs,robustness_tests.rs). The CFG splice ininline_helpers/inline_call, phi/successor updates, and the single-loop every-lanespin_waitlogic look sound by reading (single back edge, single exit,waveReadLaneFirstbroadcasts after each first-lane atomic/CAS, failure still takes priority over unsigned>= need, and the restored assertions incore_tests.rs/robustness_tests.rsplusinlined_rendezvous_is_one_loop_with_one_exit_and_first_lane_atomicsall pass with DXC 1.9.2609.5). However, on NVIDIA RTX 5070 Ti with driver 610.74,gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_readsstill fails 5/5 deterministically on912ff558ewhile passing 5/5 onorigin/main5ad98adbc:crates\xcl\src\gpu\dxil\idioms.rs:638:17:assertion left == right failed: thread 0 of 48left: [1216644162, 19588](0x4884_4442,0x4C84)right: [1214530626, 19556](0x4864_4442,0x4C64)j=0,1,3,5match (0x42,0x44,0x48,0x4C), while the two all-inactive-EXEC casesj=2(t == 200,lo=0, hi=0) andj=4(t > 100,lo=0, hi=0) return0x84(132 = 100 + 32, upper-half lane 0) instead of0x64(100 = 100 + 0, lower-half lane 0) on thread 0 of 48 (threads=32withPartner::Missingpasses;threads=48is the first size usingspin_wait). Note that this same test passed on@Foniass's RTX 5070 Ti with newer driver 621.14, so this appears to be an NVIDIA driver 610.74 codegen/reconvergence issue specific to the inlined form ofspin_wait(it does not reproduce onorigin/main5ad98adbcwhere@xcl.spin.waitstays an internal function).inline_helpersreplaces call results in a single non-transitivereplace_usespass (fine forspin_waitandbarrier_arrivewhich return freshPhis, but worth keeping in mind if a future helper ever returned an argument directly).performance: Not measured (stopped at the failing targeted GPU regression test).
verdict: not yet:
gpu::dxil::idioms::tests::gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_readsstill fails 5/5 deterministically on RTX 5070 Ti driver 610.74 (thread 0 of 48:j=2andj=4read132instead of100), whereasorigin/main5ad98adbcpasses 5/5 on the exact same machine and driver.hardware / tool and model: NVIDIA GeForce RTX 5070 Ti (driver 610.74 / 32.0.16.1074), AMD Ryzen 9 9950X 16-Core, Windows 11 Pro 26200,
rustc 1.99.0 (b940084d7 2026-09-28), DXC 1.9.2609.5 / Antigravity (Gemini 4 Neon)Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-02T19:47:22Z.
Thanks for the RDNA4 run. Good to see the split-wave tests pass there, and
main's first attempt ending with0xc0000409is the #3694 picture.On the frame/commit pair, I'm measuring before drawing a conclusion, but I don't think that pair can show a regression on its own:
shaders/andcache/along with the PSO data, so "cold shader caches" and "a different path through the title" are mixed together. Players have a save, and a warm cache after the first start.mainwith the helpers as functions it can't be measured under Wine, sincemainends at start.)Edit, measured (RX 7800 XT / RADV under Wine, 300 s each, release builds). Baseline A is
main5eaadb54with #3655 reverted (the loops inline as before #3655, everything else asmain; plainmainends at ~3.5 s here), B is this PR at912ff558. Each arm has its own data root (a copy of the player's save and settings, without XCL's shader/DXIL caches, so the title takes its usual path) and its own vkd3d and Mesa caches; first cold, then warm.frames shownis mostly the first 90 s of loading and menu screens (> 80 %); the same build differs by 9 % between its cold and warm runs (and the warm run has fewer). A and B are within that. In the world the title runs below 1 frame/s here, too few frames in 150 s to compare.So I don't see a regression here. A single 60 s pair from start, cold, in a debug build is within this noise. If you see it again on RDNA4, 2–3 pairs from the same data root would tell.
AI use: Claude Code (Claude Opus 5.5) drafted this reply; reviewed by me.
Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-02T19:50:24Z.
Thanks for the 5×5 and the byte breakdown, that pins it well. A few observations, then two asks:
j=2andj=4, the cases with no lane active, and only from 48 threads on, wherespin_waitruns at all. The upper half returns its own lane 0 (132) rather than stale or mixed data. That is the "exchange failed, keep your own value" outcome, so on 610.74 the rendezvous reports failure or times out for the upper half. It does not look like a wrong value arriving through the slots.b2e6f239(leader-only loop) and912ff558(every-lane loop), so the loop shape isn't what 610.74 objects to; being written into the caller is.886f9057, whole suite), on @cj-tomlin's RTX 3080 with 621.40 (both heads, 3/3 alone and in the suite), on RX 6700 XT / RX 9060 XT on Windows and on RADV. So it looks like 610.74's compiler rather than the code, but that isn't proven, andmaindoes pass on 610.74 with the helper as a function.Two asks:
AI use: Claude Code (Claude Opus 5.5) drafted this reply; reviewed by me.
Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-02T20:32:23Z.
@Kalmarv the two asks for your 610.74 machine are in my comment above: a rerun of
gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_readson 621.14, and whether a diagnostic branch for 610.74 (exchange status per half) would help.Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-02T20:35:21Z.
@throny @Foniass i would be intrested in your merge checks.
Imported from ivall/xcl. Originally posted by Chrysana on 2026-12-02T20:44:51Z.
merge-check
base:
5ad98adbc3head:
912ff558e9merge: clean (local
fcfc1ca9;git diff --checkclean)build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2999 passed, 9 failed, 52 ignored; SKIPPED: 4 (2 × no heap windows, 1 × driver cache can't be disabled without Developer Mode, 1 × no D3D12 debug layer); failing: the 8 known AMD failures on this card (
fuzz_validate_and_gpu_1/_3,gpu_smem_flat_descriptor_windows_and_limits,f32_programs_on_the_gpu,gpu_f32_compares_with_nan,gpu_float_compares_random,gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends,two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs(counted twice)), the same list asmainbefore #3655. The base can't give a full count: its lib binary andgpu_compute_e2eboth end with0xc0000409(#3694), 142/1/20 counted.title run: retail title, RX 9070 XT, 4 × 40 s from start, 0 removals, 0 crashes (
mainexits0xc0000409at 1.6–1.9 s, 2/2); RDNA 2 iGPU 40 s clean; 120 s with #3455 also merged, into the world, 0 removals, 0 crashes (details below)review: Read the full diff (3 files, +315/−59).
inline_call's cut is sound by reading: the cut block's terminator moves to the tail and its successors' phis are renamed, a self-loop included; the tail is scanned later, so a second call in the same block is inlined too. In the every-lanespin_wait, every branch inside the loop depends only onwaveReadLaneFirstvalues or the poll count, so the lanes stay together; the zeroactualon the no-CAS path only counts whentimed_outis set. No findings. Not tested here: NVIDIA (the 610.74 failure Kalmarv reported) and Wine.performance: measured, 40 s from start, warm caches, normal data root, interleaved in one session: PR 1,089 / 1,091 frames, peak 17,057 / 17,286 MB;
df0cfef6(main before #3655, loops inline then too) 1,087 / 1,081 frames, peak 17,399 / 17,766 MB. No difference beyond run-to-run spread. Record73ffa0b705ae2cc0is 14,772 B of DXIL here (13,432 B onmain, 15,144 B before #3655), 182 ms on its first driver compile. Not measured: a fresh data root (stijn-boer's pair) or in-world frame rate.verdict: safe to merge
hardware / tool and model: AMD Radeon RX 9070 XT (driver 32.0.32015.2008) and RDNA 2 iGPU (9800X3D, gfx1036, driver 32.0.21045.11001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26200; rustc 1.100.1, DXC 1.9.2602.17, debug test builds, release title builds / Claude Code (Claude Opus 5.5)
The #3694 cases, each test alone in its own process, 3 rounds per GPU (
main=5ad98adb, PR = the merge above):mainRX 9070 XTmainiGPUgpu_split_wave64_local_votes_leave_what_the_exchange_leaves(32/48/64/128 threads, idioms on and off)0xc00004093/30x887A0005) 3/3gpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads0xc00004093/3console_wave64_compute_through_the_pso_hook_dispatch_and_read_back(e2e)0xc00004093/3offline_compute_pipeline_is_reused_by_a_second_process(e2e)synchronous_compute_manifest_records_first_bind(e2e)The PR's three new tests,
split_lds_reads_meet_after_writesanda_group_barrier_of_several_hardware_waves_uses_safe_barrier_directlypass too (in the suite and alone). On the iGPU,main'sconsole_wave64e2e test doesn't crash but reads back a wrong value; with the PR it's right.Title runs (
scripts/smoke.ps1, release, default settings,XCL_PSO_TRACE=1). 40 s keeps clear of #3544, which ends the title at 42–48 s on this card on default settings. The recordmainnever finishes compiling is the one from #3694:main, 2 of 2 runs the same way:PR (first run, cold for the new DXIL):
main0xc0000409at 1.9 smain0xc0000409at 1.6 sdf0cfef6df0cfef6No device removal, no crash and no guard trip in any PR run.
Into the world, with #3455 too. To get past #3544, I also merged #3455 (
1895d9e8, its fix for #3544, clean on top) and ran 120 s. Record73ffa0b705ae2cc0compiles, PS7381166e806847c9compiles in 282 ms at 42.7 s, and the world streams in from ~66 s: 2,398 frames, exit 0, 0 removals, 0 crashes, peak 30,607 MB. Presents fall to 0 from ~106 s (#10188.2 s) while draws are still recorded. That matches the AMD stall after world load thatmainalready shows on this card (#2996), so I don't count it against this PR, but I can't run a pair without #3707 on currentmain(it ends at 1.5 s).Not tested: NVIDIA, Wine, a fresh data root, frame rate in the world.
AI use: Claude Code (Claude Opus 5.5) ran the merge, suite, per-test runs and title runs, read the diff, and drafted this comment.
Imported from ivall/xcl. Originally posted by throny on 2026-12-02T21:55:07Z.
Test report for #3707 at
912ff558e(lucsoft asked for tests; not a merge check). On Windows with NVIDIA (wave32, split wave64), the title stops on a GPU queue wait in 2 of 2 world runs.Tested
6c5ecdff7into main5ad98adbc.cargo test --workspace -- --test-threads=4on the trial merge: 3007 passed, 0 failed, 52 ignored; 25SKIPPEDlines (no wave64 and similar).XCL_RESIDENCY_PRIORITY=1):a GPU queue wait exceeded its watchdog without a graph-proven cycle – the title is stopped before its remaining GPU submission.5ad98adbcran the full time (3.13 and 3.01 presents/s, no stop).So on wave32 hardware something in the inlined split-wave rendezvous / safe-barrier path seems to leave a GPU queue waiting forever, likely a compute shader that never finishes. I haven't narrowed it to a program. If you want me to, I can bisect it with a switch or try a per-program trace on this GPU.
Not tested
AI use: Claude Code (Claude Opus 5.5) ran the builds, suite and world runs, and wrote this.
Imported from ivall/xcl. Originally posted by Lum7nt on 2026-12-02T22:12:11Z.
Windows 11 + NVIDIA GeForce RTX 3060 (driver
581.42) test report for PR #3707Tested clean merge of PR #3707 (
912ff558e932264511f386eb8b7e97cbf7cf46e2) ontoorigin/main(5ad98adbc360225ac8a57ad9661e16fe8df9d8dd),git diff --checkclean,cargo build --workspace-> ok (39warnings,0new vs base).Environment
32.0.15.8142(581.42, WDDM 3.2)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, Windows SDK DXC1.8.2502.11/ dxil1.8.2502.11Test Results
Targeted split-wave64 uniform-first-lanes check (5 consecutive runs):
0.36s–0.40seach,0skips). The deterministic failure reported on RTX 5070 Ti driver610.74did not reproduce on Ampere RTX 3060 with older driver581.42.Full
gpu::subsystem (gpu::dxil,gpu::recomp,gpu::bvh,gpu::tiling,gpu::texture,gpu::uma,gpu::xbox):22 SKIPPED:no wave64— RTX 3060 is native wave32).gpu::dxil::(355 passed, 0 failed, 4 ignored,1 SKIPPED no wave64),gpu_split_wave64_local_votes_leave_what_the_exchange_leaves,split_compute_rendezvous_and_barriers_have_no_helper_functions,inlined_rendezvous_is_one_loop_with_one_exit_and_first_lane_atomics, anda_group_barrier_of_several_hardware_waves_uses_safe_barrier_directly.Full workspace run (
cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture):5 SKIPPED:2 no d3d12SDKLayers.dll,1 no D3D12 debug layer,1 no heap windows,1 driver could not export every fixture PSO). The 4 failures are ingpu_compute_e2e(a_preparation_worker_keeps_a_split_programs_abi_whole,split_compute_prefers_the_offline_whole_pipeline,offline_compute_pipeline_is_reused_by_a_second_process,offline_split_compute_pipeline_is_reused_by_a_second_process), all confirmed failing identically onorigin/main5ad98adbcon driver581.42(driver blobs saved 0, unavailable).--libat--test-threads=4aborted inhle::d3d12x::list_xwith exit0x80004005(sparse upload preparation still failed after bounded retries, pre-existing parallel test contention); rerunningcargo test -p xcl --lib -- hle::d3d12x::list_x:: --test-threads=1passed 116 passed, 0 failed.Scope & Not Tested
22 SKIPPED).AI disclosure: OpenCode (
google/antigravity-gemini-4-hydrogen-low) merged, built, ran the tests, and drafted this report.Imported from ivall/xcl. Originally posted by throny on 2026-12-02T22:15:44Z.
merge-check
base:
5ad98adbc3head:
912ff558e9merge: clean (trial merge 6c5ecdff7)
build: cargo build --workspace -> ok; cargo build --release -p xcl -> ok
tests: cargo test --workspace -- --test-threads=4 -> 3007 passed, 0 failed, 52 ignored; 25 SKIPPED (no wave64 and similar); failing: none
title run: retail title, RTX 4080, 300 s runs did not reach their time: the title stopped on the GPU queue wait watchdog 100-135 s after the first frame in 2 of 2 runs (details in my comment above)
review: diff read (gpu/dxil/module.rs helpers written into the entry, tests); nothing found in the code itself, but the runs above
performance: not measured (the runs stopped)
verdict: not yet: on Windows/NVIDIA (wave32, split wave64) the title stops on a GPU queue wait in 2 of 2 world runs; main
5ad98adbcran two 900 s runs clean. Possibly related to the split-wave swap issue on #505 (XCL_X64_ALL_MASKS); I'll try this PR with XCL_X64_ALL_MASKS=1 next.hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300 / Claude Code with Claude Opus 5.5
Imported from ivall/xcl. Originally posted by throny on 2026-12-03T00:38:08Z.
Follow-up to my check above: with
XCL_X64_ALL_MASKS=1(keep every split-wave exchange) the watchdog stop did not happen, in 2 of 2 runs of the same trial merge on the RTX 4080. Run 510 (cold) reached the world; run 511 (warm) ran its 300 s at 2.02 presents/s, with 0exceeded its watchdoglines. So the hang looks like the out-of-step halves from #505. #3748 makes every exchange the default; with it, this PR may be fine on NVIDIA too. I'll re-run it on top of #3748 once that is in.AI use: Claude Code (Claude Opus 5.5).
Imported from ivall/xcl. Originally posted by throny on 2026-12-03T03:10:24Z.
Update with your new head
7b19e27d, on top of #3748 (every split-wave exchange by default, no switch set): main395405e4c+ #3748 + this PR, RTX 4080. The warm 300 s world run (519) ran the full time at 2.78 presents/s, with 0 GPU queue watchdog stops, no crash and no device removal. The cold run before it (518) was cut short by our own memory guard (a local commit limit, not the title). So on NVIDIA the hang I reported looks like #505's out-of-step halves, and it goes away with #3748. AI use: Claude Code (Claude Opus 5.5).Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T04:01:14Z.
merge-check
base:
078358a058head:
7b19e27d8amerge: clean
build: ok
tests: 3008 passed, 0 failed, 52 ignored; 28 skipped, the same as on main
review: 2 medium, 1 nit (below)
performance: 60 s smoke run: 1669 → 1671 frames (100 % of main), peak commit 17577 → 17093 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 224 s there, 0 device removals, 0 crashes, 3.8 presents/s; run with
XCL_SKIP_CS=95cc13288a27a96e(the NVIDIA hang at the end of loading, #3541) and NVIDIA's 2048 MB shader heap (#2590)verdict: not yet:
PR descriptionis red; otherwise no blocking finding, the suite passes and the smoke run is cleanhardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
In short: Writes the split-wave rendezvous and safe-barrier helper bodies into the entry when the bitcode is written (inline_helpers), so no internal function with groupshared pointer parameters reaches dxil-spirv or the driver; the polling loop now runs on every lane. The earlier high findings are addressed: the assertions are ported, an IR test pins the loop shape, and inlining every helper is the same as inlining the two named ones on main. Nothing in the code blocks it, but the new loop relies on lanes reconverging after first-lane branches, and two NVIDIA reports (a test failure on driver 610.74, watchdog stops on an RTX 4080) are unexplained, so the title run should reach the world.
Medium
Nit
7b19e27dmerges main into the PR instead of rebasing onto it; CONTRIBUTING asks for a rebase, and this merge commit would end up in main's history.Checked and fine
How this was tested
078358a0, thencargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4.scripts/smoke.ps1: 60 s of a retail title on main078358a0and on this merge; presents per 2 s at the end: 60 60 60.XCL_RUN_SECONDS=300and scripted A presses counted from the first frame (XCL_PRESS_BASE=frame, #3712) into the world from an existing save; time in the world is counted from the first in-world draw call to the end of the run.Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-03T08:17:46Z.
Thanks for the run.
PR descriptionred: that is thePR checksworkflow failing to start (startup_failure) on every PR since 22:56 UTC yesterday, not a finding on this description;scripts/pr_check.pyon this body and head reportsdescription ok. So by your own read nothing blocks. Could the verdict besafe to merge, or do you want to wait for the check to run?inline_helpers(or its doc) to the other.AI use: Claude Code (Claude Opus 5.5) drafted this reply; reviewed by me.
Imported from ivall/xcl. Originally posted by CharlyRien on 2026-12-03T10:08:31Z.
Test report: RTX 3090 and WARP, split compute fuzz programs, head
7b19e27d(not a merge-check)Setup: RTX 3090 (driver 621.47, 32-lane waves only), Windows 11 22631, DXC 1.9.2602.17, debug build. WARP:
d3d10warp.dll1.0.23 with the Agility SDK 1.621.0. The programs are the split compute programs of the #3716 fuzzer: 12 that are wrong on NVIDIA ("G6"), and 4 controls. Both sides areprobe/direct-split-nv(main5ad98adb+ #3716d2293dcb+ a test-only probe), merged with this PR's base078358a0or with this PR, so they differ only by this PR's diff. One process per program.@xcl.spin.waitor@xcl.barrier.arrive. With it, 15 of 16 run right. The DXIL of 1001676 under this PR gives the reference words in a CPU interpreter, so its 4 wrong words on WARP are not explained yet.XCL_X64_ALL_MASKS=1(#3748's default) on this PR's tree too, so that is the mask-exchange issue (#3758), not the helpers.main5ad98adb+ #3716 on the same driver: 201 of the 8,000 seeds differ from the RDNA2 reference on both trees, and no seed differs with this PR only. (The 201 are other known issues: groups of 96 threads, #3779, a signed zero, and the 12 above.)AI use: Claude Code (Claude Opus 5.5) set up the trees, ran the WARP and 3090 checks and wrote this; checked and posted by me.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T11:13:47Z.
merge-check
base:
078358a058head:
7b19e27d8amerge: clean
build: ok
tests: 3008 passed, 0 failed, 52 ignored; 28 skipped, the same as on main
review: 2 medium, 1 nit (below)
performance: 60 s smoke run: 1669 → 1671 frames (100 % of main), peak commit 17577 → 17093 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 224 s there, 0 device removals, 0 crashes, 3.8 presents/s; run with
XCL_SKIP_CS=95cc13288a27a96e(the NVIDIA hang at the end of loading, #3541) and NVIDIA's 2048 MB shader heap (#2590)verdict: safe to merge: no blocking finding (the points below are medium or nits), the suite passes and the smoke run is clean
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
In short: Writes the split-wave rendezvous and safe-barrier helper bodies into the entry when the bitcode is written (inline_helpers), so no internal function with groupshared pointer parameters reaches dxil-spirv or the driver; the polling loop now runs on every lane. The earlier high findings are addressed: the assertions are ported, an IR test pins the loop shape, and inlining every helper is the same as inlining the two named ones on main. Nothing in the code blocks it, but the new loop relies on lanes reconverging after first-lane branches, and two NVIDIA reports (a test failure on driver 610.74, watchdog stops on an RTX 4080) are unexplained, so the title run should reach the world.
Medium
Nit
7b19e27dmerges main into the PR instead of rebasing onto it; CONTRIBUTING asks for a rebase, and this merge commit would end up in main's history.Checked and fine
How this was tested
078358a0, thencargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4.scripts/smoke.ps1: 60 s of a retail title on main078358a0and on this merge; presents per 2 s at the end: 60 60 60.XCL_RUN_SECONDS=300and scripted A presses counted from the first frame (XCL_PRESS_BASE=frame, #3712) into the world from an existing save; time in the world is counted from the first in-world draw call to the end of the run.Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-03T12:04:59Z.
merge-check
base:
0c725d5da2head:
7b19e27d8amerge: clean (local merge a41fb2036494e9210e478ada4a433e0f7965089e; git diff --check clean)
build: cargo build --workspace and cargo build --release -p xcl passed on both trees
tests: The AMD workspace runs exited 101 with incomplete coverage. Both hit the same memory-grooming stall, SM 6.6 skips and two-pass driver-cache E2E failure. Main exited 0xc0000409 in gpu_compute_e2e and both smoke attempts, consistent with #3694. With #3707, gpu_compute_e2e and smoke completed and all five focused checks passed. The independent same-head merge-check on the RTX 5070 Ti reported 3,008 passed, 0 failed, 52 ignored and 28 skips, with a completed smoke comparison. See the partial AMD counts below.
review: the focused DXIL and split-wave checks passed on AMD. The full suite did not establish GPU coverage because many tests reported no usable SM 6.6 device after Agility initialization errors. Wine and other GPUs were outside this run.
performance: #3707 completed the 60 s smoke with 1,439 frames and 16,381 MB peak commit. Main exited 0xc0000409 on both attempts before a completed frame count or peak commit was logged, so there is no matched performance delta.
verdict: safe to merge: this head addresses the observed AMD crash and independently passed the workspace suite and smoke comparison. The AMD workspace coverage remains incomplete due to the stall shared by both trees.
hardware / tool and model: AMD Radeon RX 9060 XT (32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332 / OpenAI Codex (GPT-6, exact variant unavailable)
Workspace suite
SKIPPEDlog noticesCounts are from completed libtest summaries only. I stopped both library harnesses after
grooming_leaves_a_window_under_1_gib_only_its_holestalled, so their unreported counts are excluded. GPU skip notices can repeat in captured output. The debug-layer root-signature E2E failed on main and passed with #3707. The DRED E2E passed on both. Thegpu_compute_e2etarget exited0xc0000409on main and completed with #3707. In a supplemental PR run with the grooming test filtered out, the library eventually finished. Completed targets reported 2,938 passed, 16 failed, and 40 ignored when I interrupted the rerun before the remaining targets finished.The earlier isolated tests on the same merged source tree still stand. I ran
cargo test -p xcl --lib <filter> -- --test-threads=1 --show-output --nocapturefor each of the five filters:split_compute_rendezvous_and_barriers_have_no_helper_functionsinlined_rendezvous_is_one_loop_with_one_exit_and_first_lane_atomicssplit_lds_reads_meet_after_writesa_group_barrier_of_several_hardware_waves_uses_safe_barrier_directlygpu_split_wave64_uniform_first_lanes_read_what_the_exchange_reads5 passed, 0 failed, 0 ignored, 0 skips.
Retail smoke
Ran
scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <release binary>withXCL_UMA_DRIVER=mixed, separate fresh data roots, Agility SDK 1.620.2 with matching debug layer, and DXC 1.9.2609.5. The second main attempt produced the same block as the first. Maintainer follow-up on the baseline crash · Independent same-head merge checkAI use: OpenAI Codex (GPT-6, exact variant unavailable) prepared the two builds, ran the tests and smoke comparisons, and wrote this report.
Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-03T12:35:41Z.
Thanks for running both trees. Two notes on the verdict:
mainexiting0xc0000409is the bug this PR fixes, not a missing baseline: since #3655, AMD's Windows compiler (amdxc64) crashes on the split-wave64 helper functions (#3694, RX 9070 XT, the same exit code). Your run shows it on an RX 9060 XT too:maincrashes in the smoke twice and ingpu_compute_e2e; with #3707 the smoke runs to the end (1439 frames, 0 crashes) andgpu_compute_e2ecompletes.grooming_leaves_a_window_under_1_gib_only_its_hole) and the SM 6.6 skips happen on both trees, so they don't separate the two; your filtered rerun (2938 passed, 16 failed) has no failure that is new with this PR as far as the report shows.Since
maincannot run the title on AMD Windows at all, would you consider the PR side's clean smoke as the comparison and the verdictsafe to merge? If the template needs a full suite, a rerun with--skip grooming_leaves_a_window_under_1_gib_only_its_holeshould finish on both trees.AI use: Claude Code (Claude Opus 5.5) drafted this reply; reviewed by me.
Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-03T12:40:51Z.
@lucsoft Thanks for connecting the baseline failure to #3694. Given that context and the independent passing suite and smoke on the same head, I’m comfortable recommending
7b19e27das safe to merge.On my RX 9060 XT,
mainexited0xc0000409in both smoke attempts and ingpu_compute_e2e. With #3707,gpu_compute_e2eand the 60-second smoke completed, and all five focused checks passed. The memory-grooming stall and SM 6.6 skips occurred on both trees. My AMD workspace runs remain incomplete, and the two baseline exits leave the performance delta unmeasured.Your follow-up · Independent same-head merge check
AI use: OpenAI Codex (GPT-6, exact variant unavailable) drafted and posted this reply on my behalf.
Imported from ivall/xcl. Originally posted by lucsoft on 2026-12-03T12:43:29Z.
Thanks! Could you change the
verdict:line in your merge-check comment itself tosafe to merge(e.g.safe to merge: main crashes with 0xc0000409 (#3694); with #3707 the smoke and gpu_compute_e2e complete)? The merge queue reads the verdict from themerge-checkblock, so the reply alone doesn't count yet.AI use: Claude Code (Claude Opus 5.5) drafted this reply; reviewed by me.