Recompiler: keep multi-wave 1-D wave32 compute shaders with wave/quad ops whole #2339
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2349"
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 saintwolf on 2026-11-25T16:15:31Z.
An earlier version of this PR's native wave32 compute-splitting changes reached
mainvia#3655(e7f68192), without the SM 6.6 multi-wave 1-D wave/quad guard from04f0bb6f. This PR is now rebased ontomain(5eaadb54) and narrowed to that guard and its tests (+81/-5insplit.rsonly). Part of #1269, #2088.What is in it
crates/xcl/src/gpu/dxil/module/split.rs:prefix.is_empty() && total > 32) whole whenever any livedx.op.wave*ordx.op.quad*call is present (ignoringsetup_lanes_compute's unuseddx.op.waveGetLaneIndex), because SM 6.6 only specifies thread order within 1-D quads and does not guarantee identical quad-to-wave assignment across dispatches without a wave-ID prefix.multi_wave_1d_wave_ops_decline_splitverifying that wave-free[128, 1, 1]shaders still split and validate, while[128, 1, 1]shaders with liveWaveReadLaneFirstorWaveGetLaneIndexstay whole.dispatch_chain_native_wave32_group_shapes_match_wholeso the[128, 1, 1]multi-wave 1-D case tests a wave-free shader (while single-wave[8, 4, 1]/[4, 4, 2]and prefix-bearing[8, 8, 1]continue exercisingWaveReadLaneFirstacross cuts).Tested
32.0.16.2140), AMD Ryzen 7 7800X3D,rustc 1.100.0 (0ef1bc386 2026-11-09), DXC/DXIL1.8.2502.11.cargo test -p xcl --lib gpu::dxil:: -- --test-threads=4on790f252f: 353 passed, 0 failed, 4 ignored (includingmulti_wave_1d_wave_ops_decline_splitanddispatch_chain_native_wave32_group_shapes_match_whole).cargo build --release -p xcl: clean build.Regression run
Not tested
790f252f(covered by CI).AI use
main(5eaadb54), rangpu::dxil::tests and the 60 s head smoke, and updated this description.Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-25T16:31:38Z.
AMD native wave64 run (listed as untested), plus an RTX 3060, paired against
mainwith the direct translator on for the whole GPU suite.Head
63131c6applied onmain3f4495a, debug, Windows 11 Pro 26200,XCL_DIRECT_DXIL=1 cargo test -p xcl --lib -- gpu:: --test-threads=4, onmainand on this PR for each card:mainPer-test comparison: on both cards the only differences are the 2 new tests (
dispatch_chain_native_wave32_group_shapes_match_whole,single_wave_2d_3d_omits_xcl_wt_and_guest_barrier_declines_split, both ok). No existing test changes result or skip state. The 2 RX 9070 XT failures are the AMD fuzz seeds tracked in #2115, the same onmain.Not tested: the newly split
[8, 4, 1]programs of a title, Intel.AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-25T16:37:48Z.
Ran the split-compute tests at
63131c6:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
All ten tests pass, including
dispatch_chain_native_wave32_group_shapes_match_whole; the--nocaptureoutput confirms the GPU parity checks ran onNVIDIA GeForce RTX 5070 Tifor[8, 4, 1],[4, 4, 2],[8, 8, 1]and[128, 1, 1], with no device skip.What this adds: the author tested an Ada RTX 4070 SUPER with DXC 1.8.2502.11; this is a Blackwell wave32 part with DXC/DXIL 1.9.2609.5. No test report exists in the thread yet.
Not tested: the whole workspace suite, the retail shader corpus validation, the cold PSO compile A/B, a paired 60 s smoke run, AMD/native wave64 and Intel GPUs, Wine, release profile, title data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T16:49:03Z.
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).One red on this lane: the new group-shapes test crashes at the same
d3d12core.dllsite as the #2338 and #2344 crash reports.gpu_suite: 144 passed / 3 failed / 1 ignored, exactly this rig's baseline set (fuzz seed 1003 of #2115, mad/mac, depth-buffer placement). Both new tests sit outside thegpu_filter.single_wave_2d_3d_omits_xcl_wt_and_guest_barrier_declines_split: passes, targeted, 2/2 (1 passed; 0 failed).dispatch_chain_native_wave32_group_shapes_match_whole: crashes, 4/4 deterministic, no Rust panic.WINEDEBUG=warn+sehshowsEXCEPTION_ACCESS_VIOLATION, read access to address0x110(null base + 0x110), faulting instruction atd3d12core.dll + 0x1AB118(module base0x6FFFFC880000, fault PC0x6FFFFCA2B118), unwind through mored3d12coreframes (+0xDF8DB, +0xD5AA1, +0x4D98F, +0x524A9, +0x6DA8) down into the test exe. Barecargo testreports it asexit status: 5(= 0xC0000005 truncated), which looks silent underWINEDEBUG=-all.d3d12core.dll + 0x1AB118fault site as #2344'sdispatch_chain_transports_live_f16_and_f64_across_cutscrash and the #2338offline_split_compute_pipeline...child crash on this lane (vkd3d-proton 3.1 XCL patch + Mesa 26.2.5 + RADV). Three different PRs, three different new split/dispatch-chain pipeline paths, one fault instruction in the D3D12core shim. Native Windows lanes (Aniseto, Leonidas, DarkPanda69 across those PRs) are green.2349head63131c64does not contain #2353's commits (checked ancestry), so this is #2349's own test failing on this tree alone.Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
Imported from ivall/xcl. Originally posted by alexmircea1299 on 2026-11-25T17:37:54Z.
Re-tested commit
63131c6on Windows after updating to NVIDIA driver621.40:Environment
621.40, nativewave32/ nowave64)1.8.2502.11(Windows SDK10.0.26100.0)Results
cargo test -p xcl --lib gpu::dxil::module::split -- --test-threads=4): 10 passed, 0 failed, 0 ignored (0.43s), includingdispatch_chain_native_wave32_group_shapes_match_wholeandsingle_wave_2d_3d_omits_xcl_wt_and_guest_barrier_declines_split.cargo test -p xcl --lib -- --skip fuzz_validate_and_gpu): 1201 passed, 0 failed, 26 ignored, 4 filtered out (15.35s).gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(known Blackwell RTX 5000 driverE_OUTOFMEMORY0x8007000Eon non-constantgroupsharedatomic subtract tracked in #1905 / #1919, still present in621.40).Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T18:25:32Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T18:40:51Z.
Diff review (wave32 group-shape checks) and CI look clean, and Windows native/split coverage is solid, but holding merge until the deterministic
d3d12core.dll + 0x1AB118(0xc0000005) access violation reported ondispatch_chain_native_wave32_group_shapes_match_wholeunder Wine/vkd3d-proton is diagnosed or resolved.Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-25T18:57:02Z.
@raylitebull That
d3d12core.dll + 0x1AB118(0xc0000005) Wine/vkd3d-proton 3.1 crash is the same pre-existing upstream fault already onmainsince #2080 — @ivall confirmed this on #2338 (which hit the exact samed3d12core.dll + 0x1AB118offset and was merged):All native Windows reports here (AMD RX 9070 XT wave64, NVIDIA RTX 5070 Ti / 5070 / 4070 SUPER / 3060 Ti / 3060) are green, so this isn't a regression from #2349.
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:24:36Z.
Review: COMMENTED
No concrete source-level defect found. The admission gates exclude partial/LDS groups, continuation identity is correct across admitted group shapes, and the GPU parity coverage is substantial; current CI and AMD/NVIDIA reports are green. Residual validation gap: no retail-title exercise of the newly admitted 2-D/3-D group shapes and no Intel run. Those should remain explicit, but I found no merge blocker.
Imported from ivall/xcl. Originally posted by CalvyPZ on 2026-11-25T22:44:19Z.
This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.
Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-26T16:04:53Z.
@saintwolf I published the tested main integration branch in
xcl-dev/xcl, retaining your authorship. It applies63131c64to main8b957becand resolves this PR's conflict.This preserves main's #2371 scratch-slot reuse hook while using the full threadgroup size for scratch. The tests include four wave32 group shapes and the existing divergent-edge regression, with the reuse hook checked both enabled and disabled.
Local result: 6 passed, 0 failed, 0 ignored, 0 explicit skips on the RTX 3060 Ti. Each exact filter ran separately with
--test-threads=1 --nocaptureafter a freshcargo test --locked -p xcl --lib --no-runbuild, with 1,346 tests filtered out per invocation. The branch is available for the PR rebase. The focused checks leave full-suite, exact-head title smoke, and the maintainer RDNA4 batch validation pending.AI use: Codex (GPT-6) resolved the conflict and verified the focused checks. Optional temporary Discord for coordinating contributor work, testing, and comparing results.
Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-26T18:04:08Z.
@Prime1997 Thanks for resolving the conflict on
review/2349-main-8b957bec! Applied that exact resolution ontoe120925e(merges cleanly ontomain8b957becwith zero conflicts) at6aa4e2f5, preserving#2371's scratch-slot reuse hook alongside full threadgroup sizing..\scripts\test.ps1passed with 0 failures and a fresh 60 sscripts/smoke.ps1run at6aa4e2f5is updated in the PR description.Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T19:09:05Z.
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2349 rebased head
6aa4e2f578dfdc2b296c38eb30129f45439ea8d5(exact parent & merge-basee120925e3abc9956a8b9bae631969d32e8ccd43c). Measurements and targeted GPU/unit test results only; not a full source review.Setup
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.9.2609.5, release builds, quiet machine (zero concurrent builds/tests during timed runs; notegpu/dxil/*edits give6aa4e2f5a freshXCL_DIRECT_DXIL_SOURCE_IDnamespace)title: 29640639viascripts/smoke.ps1 -Seconds 60(XCL_NETWORK=0, default flags, no input)Targeted RTX 4060 release unit & GPU tests (
6aa4e2f5)cargo test --release -p xcl --lib single_wave_2d_3d_omits_xcl_wt_and_guest_barrier_declines_split -- --nocapture: 1 passed, 0 failed, 0 ignored (0.00 s,0SKIPPED).cargo test --release -p xcl --lib dispatch_chain_native_wave32_group_shapes_match_whole -- --nocapture: 1 passed, 0 failed, 0 ignored (0.49 s, executed on RTX 4060,0SKIPPED).cargo test --release -p xcl --lib gpu::dxil::module::split::(3 consecutive parallel passes): 10 passed, 0 failed, 0 ignored on all 3 passes (0.35 s/0.34 s/0.35 s,0SKIPPED).cargo test --release -p xcl --lib gpu::dxil::: 186 passed, 0 failed, 3 ignored (4.00 s;1SKIPPED:gpu::dxil::kernel::dispatch_chain_native_wave64_builds_wholeskippedno wave64on NVIDIA wave32 RTX 4060).Paired 60 s RTX 4060 smoke (exact parent
e120925evs6aa4e2f5)Both runs completed cleanly at steady 60/2 s pacing with
0device removals and0crashes (6aa4e2f5vse120925excl.log:6,115vs6,114 MBpeak/end local VRAM,4,651 MBend non-local VRAM on both,19,663vs19,588translated draws /1,024dispatches with0skipped).Exact parent (
e120925e):PR #2349 head (
6aa4e2f5):Limits of coverage
6aa4e2f5(only the 2 new tests individually, 3 parallel passes ofgpu::dxil::module::split::, all186passing tests ingpu::dxil::, release build, and exact-parent paired 60 s smokes);dispatch_chain_native_wave64_builds_wholeskippedno wave64on wave32 NVIDIA hardware.0split-compute programs (compute split: 0 programs split, 0 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB), so split 2D/3D native-wave32 execution vs whole-shader parity was exercised on-GPU bydispatch_chain_native_wave32_group_shapes_match_wholerather than live in-world split compute dispatches.RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.AI use
Ran the targeted release unit/GPU tests, release build, and exact-parent paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, timings, memory figures, and smoke blocks were extracted directly from
cargo test,xcl.log, andscripts/smoke.ps1outputs.Imported from ivall/xcl. Originally posted by upipibi on 2026-11-27T00:25:32Z.
Tested head
6aa4e2f5, merge-basee120925e, RTX 3070 (Ampere) driver 616.56, Windows 11, rustc 1.100.0. Debug build, no env vars, no game files.cargo test -p xcl --lib gpu::dxil::module::split::tests -- --test-threads=1, 3 runs on head:10 passed, 0 failedeach time.e120925e:8 passed, 2 failed.dispatch_chain_native_wave32_group_shapes_match_wholeandsingle_wave_2d_3d_omits_xcl_wt_and_guest_barrier_declines_splitfail there.cargo test -p xcl --lib -- --test-threads=4 --skip hle::xaudio2(9 filtered out on both trees):1307 passed, 1 failed(27 ignored)1306 passed, 0 failed(27 ignored)hle::kernelx::tests::a_sleep_stops_counting_when_the_title_gets_held, a timing test the PR doesn't touch. Run alone with--exact, 5 times on each tree, it gave1 passed, 0 failedevery time on both. So I read it as load-related flakiness from the parallel run, not a regression.Not tested: retail title.
AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 ran the reruns, checked and posted).
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T00:38:47Z.
Tested: Clean
6aa4e2f578dfdc2b296c38eb30129f45439ea8d5, Windows 11 build 26200.9974, Ryzen 7 3800X, Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, DXC/DXIL 1.9.2602.17, debug. Four CPU/DXIL toolchain controls and six Arc fixtures passed, with zero failures, ignores or skips. Built withcargo test -p xcl --lib --no-run -j 2, then each exact test with--nocapture --test-threads=1.dispatch_chain_native_wave32_group_shapes_match_wholetested [8,4,1], [4,4,2], [8,8,1] and [128,1,1] thread groups. The four whole shaders and all 14 split pieces validated. Whole and split readbacks matched the CPU reference bit for bit, including slab limits of 1, 3, and 7 groups.Not tested: Native wave64, [4,8,1] groups, workspace suite, retail smoke and performance.
AI use: T3 Code / Codex (
gpt-6.2-sol) ran and reran the fixtures and wrote this report.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-27T06:11:24Z.
NVIDIA and AMD full-suite run, to go with the reports above by Decodere, JJAutoCompare, upipibi, since none of them covers AMD. Tested exact head
6aa4e2f5(on its basee120925).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1432 passed, 0 failed, 45 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,dispatch_chain_native_wave64_builds_whole,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.single_wave_2d_3d_omits_xcl_wt_and_guest_barrier_declines_split,dispatch_chain_native_wave32_group_shapes_match_whole.XCL_ADAPTER=radeon),cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1443 passed, 0 failed, 47 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on mainc2ee10e4too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-28T23:26:27Z.
Review: APPROVED
Approving on a merge-check run on an RTX 3060 Ti 8 GB (driver 32.0.16.1714, i5-10400, Windows 11 Pro 26200, Rust 1.100.0).
ec6b695409e66eda2a2a9af1dcaee6bd944ac038merged cleanly ontomain7db2f391, and the workspace builds.cargo test --workspace --no-fail-fast -- --test-threads=4, with--skipfor threeuma_drivertests that can end the library harness on this PC on plainmaintoo: 2,593 passed, 0 failed, 49 ignored, 28 SKIPPED (21 of them no wave64).mainwith the same skips: 2,591 passed, 0 failed. Both new tests pass, including the GPU parity of the split shapes on this wave32 card.scripts/smoke.ps1withXCL_PREPARE=0: 1,367 frames against 1,385 onmain, peak commit 15,556 MB against 15,626 MB, no device removal, no crash. The smoke does not reach world compute.AI use: Claude Code ran the builds, tests and smoke on Prime's PC and wrote this text. Approving is Prime's decision.
I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. Test coordination on Discord
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-29T00:29:24Z.
merge-check
base:
fa204595a4head:
ec6b695409merge: clean (trial merge b9b21353f32a386cf34c9d5e3eb224da0d352094, local, not pushed;
git diff --checkclean;dxil/kernel.rsauto-merged)build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> 2610 passed, 0 failed, 49 ignored; SKIPPED: 26 (21 no wave64 on this 32-lane GPU, 3 per-lane f16/f32 forms refused (#1426 semantics), 2 no heap windows); failing: none. All 11
dxil::module::split::testsran and passed. Of the two new ones,dispatch_chain_native_wave32_group_shapes_match_wholeran on this GPU, not skipped: bit-exact whole vs. split, CPU reference,[8,4,1]/[4,4,2]/[8,8,1]/[128,1,1], with wave ops in a middle piece. The other issingle_wave_2d_3d_omits_xcl_wt_and_guest_barrier_declines_split.review: none blocking; whole diff read (
kernel.rs,lanes.rs,module/split.rs).total <= lanes):tid = WaveGetLaneIndex()without thexcl_wtcounter, atomic or barriers. That gives the same tid as before, because the old path's base was always 0 there (total & !(lanes-1)for a partial wave, or the only full wave's atomic).xcl_wt. It stays when the counter is the guest-visiblexcl_lds[8191].split_compute, the wave64 exchange state machine is gated onhas_xs. So in native wave32, a guest barrier or groupshared access outside the replayed prefix declines the split; the negative test covers this.WaveGetLaneIndex()for 32 threads,FlattenedThreadIdInGroup()for 1-D multi-wave, and the replayedxcl_wtprefix for 2D/3D multi-wave. In the last case each piece re-derives a consistent logical tid, even if waves arrive in a different order.Feature::WaveOpsis recomputed per piece fromdx.op.wave*/dx.op.quad*calls in reachable blocks.Note, not blocking: for a 1-D multi-wave group, a wave op in a later piece assumes the driver forms waves from consecutive flattened thread ids in every dispatch. That is how NVIDIA and AMD launch groups, and the new GPU test checks it on this card. D3D12 itself doesn't guarantee it.
performance: compile time is expected to improve for the newly split shapes (the author's NVIDIA A/B); I did not measure it. Per frame, a split shader runs as a chain of dispatches with scratch round trips, as the existing
[32,1,1]splits already do.title run (fast-world harness, release builds, each from its own fresh snapshot of the same warm cache, run as the same firewalled exe; the base run is the one made on the same main
fa204595for #936):fa204595: exit 0x0, crashes 0, device removals 0, no system display events; world entry at 90.6 s, peak commit 28,620 MB, 70 WARN lines; 6,897 translated pipelines, 0 failed, 0 fallback.b9b21353: exit 0x0, crashes 0, device removals 0, no system display events; world entry at 115.2 s, peak commit 28,919 MB (+1.0 %), 62 WARN lines (no new kinds); 6,961 translated pipelines, 0 failed, 0 fallback, 0 translation errors.verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (driver 610.74, wave32 only), AMD Ryzen 9 9950X, Windows 11 build 26200; rustc 1.99.0, debug test profile, DXC 1.9.2609 via XCL_DXC_DIR; title runs from release builds. Claude Code, Claude Opus 5.5: merge, build, suite, title runs and full-diff review; this report.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-29T07:28:58Z.
merge-check
base:
fa204595a4head:
ec6b695409merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2,610 passed, 0 failed, 49 ignored; SKIPPED: 26 notices (21 no wave64, 2 no heap windows, 3 refused per-lane f16/f32 forms); failing: none.
XCL_DXIL_CACHEpointed to a fresh writable directory. Both new tests passed, including the GPU readback for four wave32 threadgroup shapes.review: I read the three changed files and found no correctness blocker. The local test merge was
f6b1cdc7, andgit diff --checkwas clean. The fixture checks whole, split and slabbed results against a CPU reference on NVIDIA. AMD native wave64 and a title dispatch of the newly split shaders remain outside this check. The author reports the earlier Wine/vkd3d split-test crash at the same site onmaintoo; that driver-layer issue is discussed separately above.performance: Both clean release builds passed. The 60 s smoke pair showed 1,649 versus 1,669 frames and 15,443 versus 15,422 MB peak commit (main versus merge), with zero crashes or device removals. It did not reach world compute. A local timing fixture measured higher GPU time for split versions of four tiny synthetic dispatches; it does not establish a gameplay regression or the cost of the production-size shaders.
verdict: not yet: measure warmed GPU time for a representative newly eligible shader at its actual dispatch size and production split threshold, or document an accepted runtime cost before enabling the wider split path by default.
hardware / tool and model: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11 / Codex (GPT-6.2 Sol) ran and reviewed the check; Codex (GPT-6.2 Astra) reviewed the performance inference.
Timing method and measured GPU time
Both trees passed
cargo build --release -p xcl -j 4. A test-only, uncommitted timing extension to the existing GPU fixture passedcargo test -p xcl --lib dispatch_chain_native_wave32_group_shapes_match_whole -- --nocapture --test-threads=1(1 passed, 0 failed, 0 ignored, 0 GPU skips). It alternated whole and split runs, discarded four warm-up samples per run, and took the median of 48 GPU timestamps per variant:[8,4,1][4,4,2][8,8,1][128,1,1]The timestamps are quantized at 1.024 µs. This fixture forces a 40-instruction split threshold; the production default is 12,500. The PR's reported cold PSO compilation improvement measures a separate cost.
Generated paired smoke blocks
Each block came from
scripts/smoke.ps1 -Game <local title> -Seconds 60on its clean tree, withXCL_PREPARE=0,XCL_ADAPTER=3080, a fresh per-tree DXIL cache, and the script's network-off setting. A 16 GiB process-tree commit cap, 8 GiB system-commit headroom floor and 210 s launcher timeout guarded each run; neither guard stopped a run.Imported from ivall/xcl. Originally posted by throny on 2026-11-29T07:50:42Z.
merge-check claim
head:
ec6b695409Imported from ivall/xcl. Originally posted by throny on 2026-11-29T08:09:37Z.
merge-check
base:
fa204595head:
ec6b695409merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2610 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at
fa204595: 2608 passed, 0 failed, 49 ignored. The new GPU test ran on this card (native wave32).review: no blocking finding. For a single-wave 2-D/3-D group the lane index gives the same thread id as the old atomic path, and dropping the trailing barrier is safe because nothing touches the counter afterwards (it is kept when the LDS top word is shared). The narrower exchange rule in split.rs changes nothing reachable, since split-wave64 compute groups stay whole. Two notes, neither blocking: a 1-D multi-wave piece keys its scratch by the flattened thread id and so relies on hardware waves holding contiguous thread ids (the whole program already relied on that); and piece features are inferred before the optimiser runs, so a wave op that later turns dead can leave the flag set, which costs that piece its split but not correctness.
performance: not measured.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T12:12:46Z.
Thanks for the thorough review and timing check, @thehollowedone!
Two updates on this PR:
main(9dfbe3ea) →5737eb7e(preservinglw.safe_barrier_init()inkernel.rsandmain's always-onreuse_piece_slotsinmodule/split.rs). Re-verifiedcargo test -p xcl --lib gpu::dxil::module::split::tests -- --test-threads=1(13 passed, 0 failed) and a fresh 60 s release smoke (1654frames,0device removals/crashes,15415 MBpeak commit).split_computeto the remaining full-wave native wave32 shapes carries the same per-dispatch scratch round-trip and multi-dispatch launch overhead already accepted onmainfor[32, 1, 1]shaders (XCL_DIRECT_SPLIT_INSTRUCTIONS, default12,500,0disables). In production it only triggers on12,500+-instruction shaders (where cold NVIDIA compile drops from11–26 sto1.1–1.9 s), whereas the 40-instruction synthetic fixture reflects empty dispatch launch overhead.Ready for re-check when you have a moment!
Imported from ivall/xcl. Originally posted by Gevroska on 2026-11-30T13:26:41Z.
@saintwolf I measured the runtime tradeoff on my RTX 3080 (driver 616.92) using the production code from
5737eb7ewith a local test fixture. A generated native wave32 compute shader with an[8,8,1]thread group reached 15,327 optimized instructions. At the default 12,500-instruction threshold, the PR split it into two pieces. The same input stayed whole onmainat9dfbe3eaand on the PR withXCL_DIRECT_SPLIT_INSTRUCTIONS=0.Across 128 groups, both forms matched all 8,192 expected output words and preserved all 16 guard words. With 32 GPU timestamp samples per form after warmup, median execution time was 41.984 µs whole and 43.008 µs split. An independent run reproduced both the readback and the timings.
That puts the extra GPU execution time at about 1 µs for this generated workload. I haven’t verified that some retail uses this shader shape above the threshold, so I can’t infer a frame-time impact from this test.
I used Codex GPT-6.2 Sol to write and run the fixture. A separate GPT-6.2 Sol agent reviewed the source, and GPT-6.1 Terra independently repeated the Windows and GPU checks. Codex GPT-6.2 Astra drafted this comment.
I reviewed and approved this comment before posting.
Imported from ivall/xcl. Originally posted by AAsobu on 2026-11-30T21:46:34Z.
merge-check claim
head:
5737eb7eeaImported from ivall/xcl. Originally posted by AAsobu on 2026-11-30T22:41:45Z.
merge-check
base:
078358a058head:
790f252f22merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3007 passed, 0 failed, 52 ignored; SKIPPED: 28 (22 no wave64, 3 no D3D12 debug layer / d3d12SDKLayers.dll, 2 no heap windows, 1 no GPU_UPLOAD heaps); failing: none.
multi_wave_1d_wave_ops_decline_splitruns and passes.review: no finding. I read the whole diff (
split.rs, +81/-5): multi-wave 1-D native wave32 groups with a livedx.op.wave*/dx.op.quad*call (other than an unusedwaveGetLaneIndex) are no longer cut into a dispatch chain, with a test of both sides. This replaces the version I measured as slower (04f0bb6f, comment edited below).performance: no measurable difference on this GPU. Retail title, release builds,
main078358a0as A and this merge as B, NVIDIA shader heap profile 2048 MB, 360 s runs, no frame dumps. One B warm-up run first (translated cache keyed by the binary); after it no run waited for a compute pipeline. Window: world entry (firsttwo-pass ExecuteIndirect) +30 s to +140 s, from theactivity (2 s)lines.04f0bb6f(B behind in all three pairs, 82 % of A's presents) does not show here.0x887a0006(B at 168 s, A — plainmain— at 184 s), with the same DRED page fault at VA 0 on the same draw (vs 505022186d7aeaa4 ps c1cffdc3f13a4f2f). It happens onmainwithout this PR, so it is not this PR's; I repeated the pair once.scripts/smoke.ps1 -Game <title>(60 s, the script's own settings) on the base and on the merged tree, same release binaries. Neither reaches the world in 60 s, so this only checks startup: same frames, no removal or crash, peak commit +60 MB.verdict: safe to merge
hardware / tool and model: RTX 3090 24 GB (driver 621.24), i5-10600K, 32 GB, Windows 11 26300 / Claude Code (Claude Opus 5.5)
Earlier check of
04f0bb6f(not yet; superseded by the check above)merge-check
base:
6bfb5c5153head:
04f0bb6ff0merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2907 passed, 0 failed, 51 ignored; SKIPPED: 28 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll, 1 no GPU_UPLOAD heaps); failing: none.
multi_wave_1d_wave_ops_decline_split,single_wave_2d_3d_omits_xcl_wt_and_guest_barrier_declines_splitand the GPU testdispatch_chain_native_wave32_group_shapes_match_wholerun and pass on this wave32-only GPU.review: no correctness finding. I read the whole diff (
kernel.rs,lanes.rs,module/split.rs). The only change since5737eb7eis insplit.rs: multi-wave 1-D groups with a livedx.op.wave*/dx.op.quad*call now stay whole, plus the test for that. The default-on part that the measurement below exercises is the same as before: wider native wave32 splitting, and single-wave 2-D/3-D groups computingtidwithout thexcl_wtcounter and barrier.performance: measured regression in the world on this GPU. Retail title (the one that reaches the world here), release builds,
main6bfb5c51as A and this merge as B. NVIDIA shader heap profile 2048 MB, my usual settings,XCL_FRAME_DUMP=5on every run, 300 s runs. Before the series, one B warm-up run, because the translated cache is keyed by the binary. Window: world entry (firsttwo-pass ExecuteIndirect) +30 s to +140 s, from theactivity (2 s)lines.main) ended at 134 s with0xc0000005 in nvwgf2umx.dll+0x7c89af(inside the NVIDIA driver) at world entry, before the window, so it is excluded and was repeated. It was not a B run.scripts/smoke.ps1 -Game <title>(60 s, the script's own settings: no network, no preparation) on the base and on the merged tree, using the same release binaries. Neither run reaches the world in 60 s, so this only checks that nothing regresses at startup: same frames, no removal or crash, peak commit +39 MB.verdict: not yet: on an RTX 3090 (wave32) the merged build presents about 18 % fewer frames and issues about 26 % fewer draws in the world than its base, consistently over 3 pairs including reversed order. It may be worth finding which part costs the time (the wider split, or the single-wave 2-D/3-D
tidpath) before enabling it by default.hardware / tool and model: RTX 3090 24 GB (driver 621.24), i5-10600K, 32 GB, Windows 11 Home 26300 / Claude Code (Claude Opus 5.5); runs and figures checked by me.
Edited 2026-12-01: this report replaces my earlier one for
5737eb7e(safe to merge). That one was measured with a 512 MB shader heap and 180 s runs, which ended before an in-world window like the one above.Added 2026-12-01, later the same day: the slowdown above depends on the in-world workload.
From about 17:30 the title entered the world in a lighter state on every binary,
mainincluded. The lastcompute split:line of each run shows 0–486 chained dispatches, where the earlier runs had 29,405–60,984.In that lighter state, with the same settings and warm caches, 2–4 runs each of
main, this PR and two local split builds show no measurable difference (presents / 2 s, entry +30 to +140 s; ranges are per build):main6bfb5c51tidchangemainwith only the single-wavetidchangeAll ranges overlap. The two local builds do not separate the parts cleanly: only the single-wave
tidchange dropsxcl_wtfrom single-wave 2-D/3-D groups such as[8, 4, 1], so only the full PR can split those.So the regression I measured holds for the heavy compute workload of the earlier runs, and I could not reproduce that workload later to attribute it to one part. The verdict stays
not yetuntil someone measures it in a compute-heavy scene.Imported from ivall/xcl. Originally posted by AAsobu on 2026-12-01T00:02:35Z.
Correction to my report above, about the device removal it mentions (0x887a0005, DRED "page fault at GPU VA 0x0", no breadcrumbs): on this machine it was most likely NVIDIA's 512 MB shader-heap limit (#2403), not a bug of
mainand not a regression range.xcl nvprofile status(from #2590) showed thatxcl.exehad no profile here, so the driver's default 512 MB applied. #3277 had the same signature and timing on another RTX 3090 and it went away with the profile.mainff0c364btwice, #3528 twice) stayed in the world for ~220-270 s with no removal, where before 13 of 13 runs past the loading screen lost the device, at 143-816 s from start (5-50 s after world entry in the 8 runs where I timed it).d52ff48c(a run without the removal, "a possible regression range"): that one run most likely just had less shader code in use.Hardware: NVIDIA GeForce RTX 3090 24 GB (driver 621.24), Intel Core i5-10600K, 32 GB, Windows 11 Home build 26300. Tool and model: Claude Code (Claude Opus 5.5), results checked by me.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-12-01T02:29:25Z.
Source-level portability concern on current head
5737eb7e: the newly admitted multi-wave 1-D shapes useFlattenedThreadIdInGroup()to restore each thread's scratch values across pieces, but a wave operation in a later piece uses that dispatch's physical wave. Shader Model 6.6 specifies the order within each four-thread 1-D quad, while leaving the order of quads implementation-dependent. The flattened ID therefore identifies the thread, but does not guarantee that the same threads share a wave in every dispatch.For
[128, 1, 1], considerWaveReadLaneFirstbefore and after a cut, with each thread's input equal to its flattened ID. If a later dispatch exchanges the quads containing IDs 4–7 and 32–35 between physical waves, ID 32 restores its own saved value but its new wave's first-lane read comes from ID 0 rather than ID 32. That layout obeys the documented quad rule. The existing GPU fixture passes on the tested adapter; it cannot establish parity for every legal quad assignment.Could the split eligibility keep multi-wave 1-D shaders with wave-dependent operations whole until the pieces can preserve the guest wave membership? A structural/CPU model regression using two legal quad assignments would pin this case without relying on a driver to choose the second layout. This is a specification-level counterexample; I did not observe a hardware failure or run a test in this review.
AI use: Codex (GPT-6.2 Sol) reviewed the PR and specification; Codex (GPT-6.2 Astra) checked the counterexample.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:53:08Z.
Triage (#1607) – head
04f0bb6The existing duplicate group D85 lists this PR with #2353. #2353 (closed as superseded by #3504) and #3504 carry an earlier version of this commit (
63131c6).04f0bb6fadds a guard #3504 does not have: a multi-wave 1-D group with live wave or quad ops is kept whole (multi_wave_1d_wave_ops_decline_split). This PR is the smallest reviewable piece of that work, and it is not on main (kernel.rsstill setssplit_tidonly for[64, 1, 1]). It overlaps #2344 ininfer_piece_features, where both re-inferWaveOps. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by saintwolf on 2026-12-01T14:41:36Z.
Good catch on the SM 6.6 1-D quad-to-wave rule, @thehollowedone!
Updated in
04f0bb6f:crates/xcl/src/gpu/dxil/module/split.rs:split_computenow keeps multi-wave 1-D native wave32 shaders (prefix.is_empty() && total > 32) whole whenever they contain any livedx.op.wave*ordx.op.quad*call (ignoring only an unconsumeddx.op.waveGetLaneIndexleft behind bysetup_lanes_compute). Single-wave groups (total == 32) and multi-wave 2-D/3-D groups (which replay their@xcl_wtwave-ID prefix) are unaffected.multi_wave_1d_wave_ops_decline_splitverifying that[128, 1, 1]withWaveReadLaneFirstor liveWaveGetLaneIndexstays whole, while wave-free[128, 1, 1]still splits and validates cleanly; updated the[128, 1, 1]case indispatch_chain_native_wave32_group_shapes_match_wholeaccordingly.cargo test -p xcl --lib gpu::dxil::module::split::tests -- --test-threads=1(14 passed, 0 failed),cargo build --release -p xcl, and a fresh 60 s smoke on04f0bb6f(1649frames,0device removals/crashes,15380 MBpeak commit).AI use: Antigravity (Gemini 4 Neon) implemented the guard and test, ran the local tests and smoke, and drafted this reply.
Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-01T16:14:57Z.
merge-check
base:
5eaadb54c1head:
790f252f22merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2974 passed, 1 failed, 52 ignored (base: 2974 passed, 0 failed, 52 ignored); SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps), the same set as base; failing:
two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs("releasing the title PSOs releases their two-pass state"). Not this PR: it is the known intermittent failure of #3441, and it passed alone 3 of 3 here.review: read the whole diff (1 file, +81 -5). No problem found. This is the part of the old PR that main lacked.
gpu::dxil::module::split::tests: 3 of 3 rounds passed on this wave32 GPU, none skipped.multi_wave_1d_wave_ops_decline_splitfails ("multi-wave 1D with WaveReadLaneFirst must stay whole").performance: programs the guard declines compile whole again, so a big one takes longer to build. By the author's count that is at most 1 of the 96 native wave32 shaders newly split in their corpus. Not measured here; the author's smoke pair is within the limits (1631 frames against 1668).
verdict: safe to merge
hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
This is a rerun on the new head; it replaces my
not yeton04f0bb6f.Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T11:59:18Z.
merge-check
base:
1c8b551475head:
04f0bb6ff0merge: clean (a6311f258a6817268107363966542a7b2d4f1134; 3 files, +297/-21; git diff --check ok)
build: cargo build --workspace ok; cargo build --release -p xcl ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture -> 42 non-lib targets passed (148 passed, 0 failed, 20 ignored);
xcl --libhit the pre-existing synthetic-pointer ASLR abort (0x7c000041) under--test-threads=4and passed cleanly on rerun viacargo test -p xcl --lib -- --test-threads=2 --nocapture(2764 passed, 0 failed, 31 ignored) -> combined 2912 passed, 0 failed, 51 ignored across 43 targets (28 SKIPPED lines matching clean base1c8b551475: 22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache). All 14gpu::dxil::module::split::testspassed on RTX 4060 with 0 skips, including all 3 new tests (single_wave_2d_3d_omits_xcl_wt_and_guest_barrier_declines_split,multi_wave_1d_wave_ops_decline_split, and the live GPU parity testdispatch_chain_native_wave32_group_shapes_match_whole).review: Full 3-file diff (
crates/xcl/src/gpu/dxil/kernel.rs,lanes.rs,module/split.rs, +297/-21) audited; no correctness issues found.lanes.rs: single-wave 2D/3D native groups (y * z > 1 && total <= lanes) usewave_lane_index()directly withoutxcl_wt, atomics, or barriers while deriving row-major(gx, gy, gz)fromtid; multi-wave 2D/3D groups drop the trailingGROUP_SYNCwhen using dedicatedxcl_wt(keeping it when sharingxcl_lds[8191]), which is sound since all threads already synchronized after zeroingxcl_wt[0]and nothing else writesxcl_wt.kernel.rsandmodule/split.rs: extendssplit_computeto full-wave native wave32 groups without guest LDS (total >= 32 && total % 32 == 0), sizes per-group scratch bytotal, replays thexcl_wtprefix on multi-wave 2D/3D pieces so wave membership stays intact across dispatches, gates thexcl_xsstore/barrier/load exchange state machine onhas_xsso guest barriers in native wave32 cleanly decline splitting, keeps multi-wave 1-D groups (prefix.is_empty() && total > 32) whole whenever any livedx.op.wave*ordx.op.quad*call is present (addressing SM 6.6 quad-to-wave portability), and recomputesFeature::WaveOpsper piece so wave-free pieces pass validation.performance: Single 60 s release smoke on title 29640639 vs clean base
1c8b551475(1462 frames, presents per 2 s last 3: 48 53 59, peak commit 16043 MB): 1639 frames (+12.1%, steady 60 60 60), peak commit 14759 MB (-8.0%), 0 device removals, 0 crashes. However,xcl.logreportedcompute split: 6 programs split, 20 pieces built, 0 chained dispatches issued in 0 slabsduring the 60 s startup/menu run, so this smoke did not exercise newly split chained dispatches at runtime and cannot refute the measured -18% presents/2 s and -26% draws/2 s in-world regression reported on RTX 3090 across 3 paired 300 s A/B runs (including reversed order) where 29k-44k chained dispatches ran.verdict: not yet: code correctness, full test suite, live GPU parity tests, and 60 s startup smoke are clean, but the 60 s menu smoke issued 0 chained dispatches and cannot refute the measured -18% presents / -26% draws in-world regression reported on RTX 3090 for this default-on change; isolate the in-world cost (wider split vs single-wave 2D/3D tid) or verify with paired in-world A/B runs before enabling by default
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-02T13:34:29Z.
@saintwolf an earlier version of this commit reached main today with #3655 (
e7f68192), but without your 1-D wave / quad guard from04f0bb6f. Yourmulti_wave_1d_wave_ops_decline_splitfails on main38ad22da, and passes once the guard is added. So this PR is still needed: could you rebase it down to the guard and its tests? Details are in my updated report: https://github.com/xcl-dev/xcl/pull/2349#issuecomment-7317285016AI use: Claude Code (Claude Opus 5.5) ran the checks and wrote this.
Imported from ivall/xcl. Originally posted by saintwolf on 2026-12-02T14:10:13Z.
Thanks @fromthemoonx! Rebased onto
main(5eaadb54) as790f252fand narrowed down to just the multi-wave 1-D wave/quad guard and its tests (+81/-5incrates/xcl/src/gpu/dxil/module/split.rsonly):cargo test -p xcl --lib gpu::dxil:: -- --test-threads=4: 353 passed, 0 failed, 4 ignored (includingmulti_wave_1d_wave_ops_decline_splitanddispatch_chain_native_wave32_group_shapes_match_whole).790f252f): 1631 frames,60 60 61,0device removals,0crashes,15644 MBpeak commit.AI use: Antigravity (Gemini 4 Neon) rebased the branch, ran the tests and 60 s smoke, and drafted this reply.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T14:13:55Z.
Follow-up review (head
790f252f, since04f0bb6f, diff read, not a merge-check):main): still applies, narrowed. The split of native wave32 groups beyond[32, 1, 1]reachedmainase7f68192through #3655 (#3504 was closed), and this PR is now just the multi-wave 1-D wave/quad guard plus its tests; the title and description match (split.rsonly), and theinfer_piece_featuresoverlap with #2344 is gone.New:
setup_lanes_computealready takestidfromFlattenedThreadIdInGroup()and the guest lane fromWaveGetLaneIndex()(lanes.rs~165, ~192), so the whole shader assumes threads32k..32k+31share one hardware wave; if that could change between dispatches, the unsplit shader would be wrong the same way. The guard (split.rs~217) declines the split for any shader with a live wave op, including every VALU compare that reacheswaveActiveBallot(lower.rs~1071), which probably turns off most of the 1-D splite7f68192added, and there is no count of how many shaders lose it.Fine: the guard only declines splits, so the default falls back to the whole shader; the
prefix.is_empty() && total > 32condition matches exactly the multi-wave 1-D case; an unusedwaveGetLaneIndexis ignored;multi_wave_1d_wave_ops_decline_splitfails without the guard.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by saintwolf on 2026-12-02T14:16:18Z.
Two factual corrections to the automated review above:
FlattenedThreadIdInGroup(), SM 6.6 does not guarantee that the same 1-D quads are assigned to the same hardware wave in Piece N+1 as in Piece N — so a thread's scalar continuations survive while its wave peers can change mid-shader. That cross-dispatch hazard (raised in earlier human review) does not affect an unsplit dispatch, and is the entire reason this guard exists.[8, 4, 1]: 86,[4, 8, 1]: 6,[4, 4, 2]: 2,[8, 8, 1]: 1) and only 1 was multi-wave 1-D ([128, 1, 1]), so this guard does not meaningfully reduce split coverage.Ready for human maintainer / merge-check review on
790f252f.AI use: Antigravity (Gemini 4 Neon) drafted this reply.
Imported from ivall/xcl. Originally posted by Pipodi on 2026-12-02T14:24:36Z.
merge-check
base:
5eaadb54c1head:
790f252f22merge: clean (the PR is already on
5eaadb54; merge commit 77ee7cda, split.rs only, +81/-5)build: cargo build --workspace -> ok (also
cargo test --workspace --no-runandcargo build --release -p xcl)tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2975 passed, 0 failed, 52 ignored; failing: none. 25 SKIPPED lines: 22 "no wave64", 2 "no heap windows", 1 "cannot disable the driver cache".
multi_wave_1d_wave_ops_decline_splitand the GPU parity testdispatch_chain_native_wave32_group_shapes_match_wholeran and passed (not skipped).review: no blocking finding; whole diff read. The guard only declines splits, so the fallback is the whole program, and it cannot make a shader wrong.
prefix.is_empty() && total > 32matches exactly the multi-wave 1-D native wave32 groups: split-wave64 and multi-wave 2-D/3-D groups carry atidprefix, andfinish_dispatchonly callssplit_computefor native wave32 or asplit_tid. Thedx.op.wave/dx.op.quadprefixes match the names the module declares (same test asopt.rswave_call), and an unusedwaveGetLaneIndexis correctly ignored. On Foniass's two points, from my own reading:setup_lanes_computetakestidfromFlattenedThreadIdInGroup()(lanes.rs:166) and the guest lane fromWaveGetLaneIndex()(lanes.rs:192), independently. So the whole shader already assumes hardware wave k holds threads 32k..32k+31 in lane order, a layout that would then be the same in every dispatch. The split adds a hazard only for a layout that is consistent within a dispatch but not linear. Under such a layout, unsplit shaders that relate thread ID to lane would already be wrong. So the guard is defensive against a legal-but-unobserved layout and fixes no observed failure. saintwolf's reply is right that it closes a hazard specific to the chain, but not that the unsplit shader is free of the assumption.Lw::ballot->dx.op.waveActiveBallot(lower.rs:1071, lanes.rs:822), and that ballot is live in any shader with divergent branches. So nearly every multi-wave 1-D shader over the 12,500-instruction piece limit now stays whole. The absolute number looks small: these are guest wave32, 1-D, more than 32 threads, no guest LDS, over the limit; saintwolf's corpus has 1 such shader among 96 newly split. I did not count it here; the smoke's "compute split" counters depend on what each run translated and cannot be compared.performance: measured, no regression. Retail title, 60 s, XCL_PREPARE=0, the same scripted presses, one warm-up run per side, gamesave moved aside before each run: frames 1611 vs main's 1609 (100.1 %), peak commit 19399 vs 18303 MB (106.0 %), no device removal or crash on either side. Neither run issued a chained dispatch ("0 chained dispatches issued" on both), so this smoke does not reach the guard's runtime effect. Reasoned: a shader the guard keeps whole is what main ran before
e7f68192. It runs as one dispatch with no continuation scratch, so it costs no frame time or memory per dispatch. The cost is at build time: the driver compiles the whole, larger program, built on thexcl-pso-wholepath, instead of smaller pieces. That can delay that pipeline the first time it is used; it is the same cost as beforee7f68192, and only for the few shaders in point 2.main
5eaadb54:this PR
790f252f(clean checkout):verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4090 24 GB, driver 621.40; Intel Core i9-13900K, 32 GB; Windows 11 build 26300; rustc 1.100.0; tests debug, smoke release. Claude Code, Claude Opus 5.5 read the diff, ran the build, the suite and the smoke pair, and wrote this check.
Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-12-02T17:13:10Z.
Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on
790f252Merged onto
main5eaadb54(clean merge) and compared withmainrun twice on the same machine.Setup
v3.1-83-gcae8353edand DXVKdxgi.dllfrom GE-Proton11-16, DXC 1.9.2609.5x86_64-pc-windows-msvcwithcargo-xwin; test binaries run under WineTested:
cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4 --skip <31 tests>main5eaadb54main: none.multi_wave_1d_wave_ops_decline_split).About the failures on
mainand the 31 skipped tests (same for every PR in this batch)main's 177 failures under Wine come from #175: once a test has set up the real device, vkd3d-proton refuses the command allocators XCL adopts (d3d12_command_list_Reset: Invalid command allocator), and later tests getE_INVALIDARG(0x80070057). Running vkd3d-proton master with its vtable check taken out,hle::d3d12x::sparse::testsgoes from 106 passed / 38 failed to 144 / 0.std::terminate()(Cannot reliably convert LLVM pointer type, we cannot differentiate between Function and Private), which kills the whole test binary. They are the split-wave64, dispatch-chain and bridged-mask GPU tests,gpu_compute_mode_dispatch_abi,gpu_compute_thread_limits_leave_the_lanes_past_them_out, the twogpu_mesh_mode_*tests, andconsole_wave64_compute_through_the_pso_hook_dispatch_and_read_back, plusserialize_root_signature_strips_console_flags_and_preserves_pc_flags, whose null descriptor vkd3d-proton dereferences. The dxil-spirv ones crash the same way with vkd3d-proton master (f8c1cae8, dxil-spirv93ab44c5).mainwas run twice: same counts, same failure set.SKIPPEDlines (same asmain): no heap windows (2), no D3D12 debug layer (2-3), driver cache control not implemented in vkd3d-proton (1).Not tested: Windows, NVIDIA, a retail title /
scripts/smoke.ps1, a review of the diff. This is a test report, not amerge-check.AI use: omp (Claude Opus 5.5) merged, built and ran the suites on this machine, compared the results with
main, and drafted this report. The user asked for it to be posted.Imported from ivall/xcl. Originally posted by tiagonleal on 2026-12-02T21:42:24Z.
merge-check
base:
5ad98adbc3head:
790f252f22merge: clean (merge commit a933f1f8dd2cea8ef14498a2c3aa9d62d511ac02;
git diff --checkclean)build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3006 passed, 0 failed, 52 ignored; SKIPPED: 24 (22 no wave64, 2 no heap windows); failing: none
title run: Newer Retail Game, release build of this merge, Series S settings (
XCL_DEVICE_TYPE=lockhart,XCL_COHERENT_MB=512,XCL_UMA_WINDOWS=16,XCL_SPARSE_LAZY=1), scripted A presses, 240 s planned: into the world at 80 s, 159 s there with 89 frames presented, no crash, no device removal; ran to the 240 s limit.review: none. The rule only keeps 1-D multi-wave wave32 shaders whole when they use live wave or quad ops; I did not measure compile time or size of the larger whole shaders.
performance: the affected shaders compile as one larger DXIL; not measured. World frame rate not compared: on this 32 GB PC the runs of main and of the PRs end 30 to 150 s into the world (RAM guard or time limit).
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB (driver 617.42), Ryzen 7 9800X3D, 32 GB, Windows 11 Pro 26300 / Claude Code with Claude Opus 5.5
Same settings on main
5ad98adb, two runs: into the world at 94 s with 145 s there and no frame presented (ran to the 240 s limit); into the world at 80 s with 59 s there and 90 frames, then stopped by our RAM guard (free RAM under 1 GB). "In the world" here means the first 2 s window of the activity log with 5,000+ draws and dispatches.AI use: Claude Code (Claude Opus 5.5) ran the build, tests and title runs and wrote this; a Claude Sonnet subagent read the diff and I checked its points.
~Tiago
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.