Recompiler: split native wave32 compute groups beyond [32, 1, 1] #2349
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2349
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@saintwolf on GitHub · 2026-11-25 16:15 UTC · original
saintwolf:dxil/split-wave32-groups→main· +221 −21 · 3 files · 1 commits · openExtends direct DXIL compute dispatch splitting beyond
[32, 1, 1]to all full-wave native wave32 threadgroup shapes without guest LDS ([8, 4, 1],[4, 8, 1],[4, 4, 2],[8, 8, 1],[128, 1, 1], etc.), and removes redundant@xcl_wt/ atomic / barrier setup on single-wave 2D/3D compute groups. Part of #1269, #2088.What is in it
crates/xcl/src/gpu/dxil/lanes.rs: skip allocating@xcl_wtand emitting the wave-index atomic and barriers for single-wave 2D/3D native wave32 compute groups (y * z > 1 && total <= lanes, wheretid == WaveGetLaneIndex()); skip the trailing barrier on multi-wave 2D/3D groups unless sharingxcl_lds[8191].crates/xcl/src/gpu/dxil/kernel.rs: enablesplit_computefor all full-wave native wave32 groups without guest LDS (total >= 32 && total % 32 == 0), passingsplit_tidfor multi-wave 2D/3D wave-ID prefixes.crates/xcl/src/gpu/dxil/module/split.rs: size per-group scratch bytotal = threads[0] * threads[1] * threads[2], permit@xcl_wtonly as the wave-ID prefix while gating the wave64xcl_xsexchange state machine onhas_xs(so guest barriers / shared-memory ops in native wave32 cleanly decline splitting), selectFlattenedThreadIdInGroup()for multi-wave 1D groups, recomputeFeature::WaveOpsper piece so pieces without wave ops validate, and add unit +dxil.dllvalidation + GPU bit-exact parity tests (including slabbeddispatch_split_by) across[8, 4, 1],[4, 4, 2],[8, 8, 1], and[128, 1, 1].Tested
32.0.16.2140), AMD Ryzen 7 7800X3D,rustc 1.100.0 (0ef1bc386 2026-11-09), DXC/DXIL1.8.2502.11..\scripts\test.ps1(cargo test --workspace -- --test-threads=4, debug): 1274 passed, 0 failed, 46 ignored across 23 test binaries, including all 10gpu::dxil::module::splittests (bit-exact whole vs split and slabbed GPU parity across[8, 4, 1],[4, 4, 2],[8, 8, 1],[128, 1, 1]).SKIPPEDGPU tests on this adapter (27 total): 21no wave64, 3 per-lane form#1426refusals (V_CVT_F16_F32,V_MUL_F16,V_PK_MUL_F16), 1cannot disable the driver cache (Windows Developer Mode is required)(0x887A002D), 1no xgameruntime.dll, 1no heap windows.2,689CS shaders,dxil.dll): 96 newly split native wave32 shaders ([8, 4, 1]: 86,[4, 8, 1]: 6,[4, 4, 2]: 2,[8, 8, 1]: 1,[128, 1, 1]: 1) produced 287 validated pieces with 0 validation errors (existing 806[32, 1, 1]shaders / 7,906 pieces also validated with 0 errors).CreateComputePipelineStateA/B benchmark (main06c9f55vs this branch, release builds, 4 UMA windows, warm 2nd calls1.33–8.52 ms) across the top 8 newly split native wave32 shaders:[4, 4, 2](56ddc92162fbb20f, 8 pieces) 25.80 s → 1.86 s (13.9×);[8, 4, 1](de83041b451429d1/0526ab24d5e0993b/d53818c323d15ea1, 6 pieces each) 13.18–14.27 s → 1.16–1.32 s (9.8×–11.4×);[128, 1, 1](14009b6da78ed223, 5 pieces) 11.52 s → 1.57 s (7.4×).Regression run
Not tested
[8, 4, 1]/[4, 4, 2]/[8, 8, 1]/[128, 1, 1]shaders are registered at startup and dispatched lazily on world load, so their runtime execution was verified via the synthetic GPU parity tests and corpusdxil.dll+ NVIDIA PSO compile benchmarks rather than in-world dispatches).AI use
@DarkPanda69 on GitHub · 2026-11-25 16:31 UTC · original
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.
@Aniseto on GitHub · 2026-11-25 16:37 UTC · original
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.
@SlopTart on GitHub · 2026-11-25 16:49 UTC · original
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.
@DavidM1911 on GitHub · 2026-11-25 18:25 UTC · original
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!
@FIJI1299 on GitHub · 2026-11-25 17:37 UTC · original · edited 2026-11-25 18:39 UTC
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).@raylitebull on GitHub · 2026-11-25 18:40 UTC · original
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.@saintwolf on GitHub · 2026-11-25 18:57 UTC · original
@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.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.