Recompiler: direct-DXIL Wave64 native ms_6_6 mesh translator and packed PS ISG1/MS OSG1 #3656
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3656"
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 Kalmarv on 2026-12-02T04:08:48Z.
Adds direct RDNA2 →
ms_6_6DXIL lowering for 1-pass Wave64 console mesh shaders (64/128 threads, up to 128 vertices and 128 primitives, zero HLSL and zero DXC compilation) plus console-register-preserving PSISG1/ MSOSG1signature packing, wired behind #3327's opt-inXCL_NATIVE_MESH=1flag.What is in it
ms_6_6translator (1ed29f44b—crates/xcl/src/gpu/dxil/native_mesh.rs,native_mesh_tests.rs,mask_exchange.rs,kernel.rs,lanes.rs,lower.rs,lower_gfx.rs,lower_mem.rs,graphics.rs,mod.rs):2 x wave32) mesh group (1or2waves), keeping lane-owned vertex/primitive exports in private storage (MeshTarget::Native) and sharingGS_ALLOC_REQcounts viaxcl_counts[6]within the 28 KiBms_6_6TGSM limit and 32 KiB vertex+primitive output budget (including12 * max_primitivesindex bytes).Partner::Barrier,4 * xslotwords, 1GroupMemoryBarrierWithGroupSyncper exchange, zero spin loops, lazyxcl_xsallocation) with forward half-divergence taint analysis integrated withmask_exchange::plan_for_barrier(plain whole-live demand + compare batching withoutidioms::local_votesoridioms::uniform_reads, which assume half-localEXECZbranches / non-barrier-gatedread_first_lane_uniformand are unsafe underPartner::Barrier).agree_condbarriers; divergent barrier-reaching branches agree withCondAgree::All(EXECZ/VCCZ),CondAgree::Any(EXECNZ/VCCNZ/loop-cap), orCondAgree::Half0(SCC0/SCC1).is_barrier_insttracksV_DIV_SCALE_F32alongside other mask-producing ops while excluding scalar-onlymask_exchange::uniform_compare(which lowers assel(cond, exec, 0)without exchanging and propagates scalar +EXECtaint intaint_step).check_unplanned_barrierruns unconditionally (debug and release alike), returningErrso anyBarrierPlanmismatch fails closed to two-pass rather than emitting an untracked barrier.GS_ALLOC_REQepilogue prefers wave 0's nonzero allocation and falls back to wave 1 instead of zeroing the meshlet on wave-1 mismatch; omits unusedSV_PrimitiveIDwhen the linked PS does not declare it, guardsnv == 0 => np = 0beforeSetMeshOutputCounts, and limits the string-table name-offset signature tiebreaker ingraphics.rstoStage::Meshand explicit.at(...)(PixelPacked) signatures so defaultStage::Vertex/Stage::Pixelsignatures keep the original(register, mask.trailing_zeros())sort.packed_user_layoutshared byEntry::PixelPackedandnative_mesh::translate_with_packingso console-shared registers pack into dense rows1..=Kgrouped by(register, type_class)separatingU32,I32,F32, andF16/other, while keeping standardStage::Pixel/ VS / two-pass / HLSL paths unpacked. Maps MS→PS element lanes directly by element offset and adjustslower_gfx::interp_gfxforstart_chanoffsets and typed zero on OOB channel reads.XCL_NATIVE_MESH=0) is unchanged:TRANSLATOR_VERSIONstays12andmodule/opt.rshas zero diff vsmain(on the runtime side,bind.rsalso runsnonzero_window_vainprepare_two_pass_stage, appends two zeroedslice_base/total_capwords toSCALE_ARGS_HLSL, and binds slotu5toconstsinemit_scaled_args_rewrite_from).e2a4128c6—crates/xcl/src/gpu/recomp/pso.rs,crates/xcl/src/hle/d3d12x/bind.rs,crates/xcl/src/hle/d3d12x/real.rs):Stage::NativeMeshandStage::PixelPackedin RAM and on disk isolated from two-passStage::Meshand unpackedStage::Pixel.TwoPassPso::nativewithNativeMeshPso { pso, rs, linear_gid }so Wave64 native mesh PSOs carry combined PS+MS static-sampler root signatures and linear group IDs (directDispatchMeshslicing viaIO_MESH_GROUP_BASE, and indirectExecuteIndirectslicing across multiple 65,535-groupSCALE_ARGS_HLSLslices withIO_MESH_GROUP_BASE = k * 65535instead of clamping and dropping upper meshlets, flushing deferred two-pass draws before stage and scratch preparation on Direct lists and tracking per-slice scratch state across block rollovers), while preserving #3327's single-wave32 path and draw-time two-pass fallback.ExecuteIndirectdirectly on the rewritten scratch buffer with(0, 0)for the count buffer (matching two-pass, sinceSCALE_ARGS_HLSLalready applies any count buffer through the UMA window andemit_scaled_args_rewrite_fromalready transitionsscaledfromUNORDERED_ACCESStoINDIRECT_ARGUMENT, avoiding redundant transitions on the globalARGUMENT_ORDERbuffer across concurrent queues), binds all 6 root UAVs (u0..u5) ofabi_root_signature(dev, false)inemit_scaled_args_rewrite_from, and filters zero window VAs inprepare_two_pass_stage.native_mesh.rs,native_mesh_tests.rs,lower_gfx.rs,pso.rs,bind.rs):ms_6_6,Partner::Barrier,ds_bpermute, barrier-safe mask planning (local_votesdisabled,uniform_readsdisabled,uniform_comparetaint propagation), releasecheck_unplanned_barrierfail-closed rejection, uniform vs divergent barrier agreement (CondAgree::Allon taintedEXECZ),V_DIV_SCALE_F32, mixedU32/I32/F16/F32packed signature separation,12 * max_primitivesoutput-budget rejection, cache isolation, linear slicing, per-slice scratch state rollover, and 6-slot ABI views.Partner::Barrier+ packed PS (gpu_direct_dxil_native_mesh_wave64_matches_two_pass), half-1-only taintedEXECZbranch + wave-0/wave-1GS_ALLOC_REQmismatch + mismatched MS/PS element lane packing (gpu_direct_dxil_native_mesh_half1_branch_wave_alloc_and_mismatched_lanes), and sliced indirect native mesh past 65,535 groups (gpu_native_mesh_indirect_slices_past_65535).Tested
rustc 1.99.0 (b940084d7 2026-09-28), DXC1.9.2609.5.cargo build --release -p xclandcargo test --workspace --no-runone2a4128c6: succeeded..\scripts\test.ps1(full workspace build, bench compile-check, and test suite one2a4128c6): 3,031 passed, 0 failed, 52 ignored across 44 test binaries (all 24native_meshtests passed; GPU tests skipped on this wave32-only adapter: 24 total — 22no wave64, 2no heap windowsopt-in).direct_dxil_native_mesh_history_censuson07e3c32f3(identical barrier-analysis / lowering logic):9,374/9,887mesh shaders translated and validated withval_errs=0and0debug assertion failures (507rejected on output budget,6rejected on LDS).SCALE_ARGS_HLSL→ExecuteIndirectwith shader-visible descriptor heaps bound (0D3D12 errors,0GBV errors, no device removal).078358a05vse2a4128c6: default run matched base (1,695vs1,695frames,17,231vs17,123MB peak commit, 0 removals, 0 crashes); opt-inXCL_NATIVE_MESH=1ran cleanly with1,707frames (PresentX 1707),60 60 61presents per 2 s,16,689MB peak commit, 0 removals, and 0 crashes.Regression run
Base (
origin/main078358a05):PR default (
XCL_NATIVE_MESHunset):PR opt-in (
XCL_NATIVE_MESH=1):Not tested
try_native_meshgates on wave32 hardware (so wave64 adapters never exercise the runtime native path), while wave32 adapters (this RTX 5070 Ti) skip the 22 wave64-only GPU tests and 2 opt-in heap-window tests — neither adapter alone covers both the runtime native path and the wave64 test suite.gpu_profilevs two-pass), in-world visual comparison against two-pass, and RTX 5090 re-test ate2a4128c6(pending @KDenKC).AI use
d10821a30(origin/main078358a05), implemented the Wave64 direct-DXIL native mesh translator, review fixes, barrier-planning / sliced indirect fixes (e2a4128c6), and 72-column wrapped 2-commit stack (1ed29f44b+e2a4128c6), added regression unit/DXIL/GPU tests, and ran build, corpus audit, GBV, test, and base+PR smoke verification.Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-02T06:07:54Z.
@Kalmarv thanks for #3656 (and #3662). Here's what we're running on the RTX 5090 right now and what we'll report back.
What we're testing. Both of your PRs together on our tree (our window/alias fixes plus our diagnostics), with
XCL_NATIVE_MESH=1, on the 16-window layout (XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16), each arm on its own fully prepared shader cache plus a warm-up, so the numbers aren't compile stalls. Before that, a straight A/B of #3656 against #3327 as you rebased it (0ccba721vseafe8ae8), same env and length; arm A is done, arm B is running.Why #3662 matters to us. It matches what our measurements showed: in our runs the title's builder dispatches run in full (hundreds of thousands, none on a stand-in), yet a GPU-side counter we added to the node test reads 0 node tests for the whole run, and the top-level headers the traversal reads never show a node. "Builds land outside the 64 KiB the views map" fits that exactly, and the same counter should tell us directly whether rays start testing nodes with your hook.
What we'll report (on #3656 for the mesh side, on #3662 for the builder side), from the same runs:
If there's a metric you'd rather see, or a switch you want set for these runs, say so and we'll include it.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-02T06:11:57Z.
@Kalmarv first A/B result for #3656 on the RTX 5090: native mesh is active (371 of 394 mesh pipelines) and runs without removals, but it breaks the picture in our test scene and is ~4–5 % slower than the two-pass path.
Setup. Arm A
0ccba721(#3327 rebased, as in your stack) vs arm Beafe8ae8(#3656), both withXCL_NATIVE_MESH=1,XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16,XCL_SKIP_CS=95cc13288a27a96e(the known compact-form fault, skipped in both arms), each on its own fully prepared shader cache plus a 4-minute warm-up, then one measured run of ~531 s uptime (same save, same scripted input, same world time). RTX 5090, driver 621.24, Windows 11.GPU time (our per-call timestamps, 16 frames each; not the same scene moment, so treat it as a profile, not a like-for-like frame): summed over the top-ranked calls, mesh work was 16.6 ms/frame two-pass in A vs 25.8 ms/frame native (+2.4 two-pass) in B; compute ~15–16 ms in both. Top native MS calls in B:
0196b0801.90 ms/frame (24 calls/frame),7f9e22f11.89 ms/frame (72 calls/frame),0b802b4c1.49 ms/frame (90 calls/frame); top two-pass in A:71161c3b1.41 ms/frame (126 calls/frame).Picture: a clear regression with #3656. In arm B all 43 saved frames of the first interior scene (every 61st present, 1850 to 4412) show the same damage: a large solid black area over the centre of the view where the window frame, the building outside and the character should be, and big diagonal black/grey triangles across the left wall and the lower right. Arm A, same scene and frames, draws the window frame, the lit sliver of the building and the character's outline normally (its window is dark only because that tree lacks the separate window fix). It looks like native mesh groups emitting a few huge wrong triangles that cover the screen, rather than missing ones; the two-pass path on the same shaders draws them correctly. On top of that, the native wave64 MS currently cost more GPU time than the two-pass pair for the same work on Blackwell.
Possible reasons, from reading the diff (hypotheses, not measured): for speed, a 128-thread console MS seems to run its two waves one after the other inside one 64-thread group (half the parallelism of the two-pass compute pass), every cross-half exchange is a group barrier, and the per-lane export staging array may spill. For the picture, we're checking whether it's the case where the two waves' GS_ALLOC_REQ counts disagree, or the indirect path past 65,535 groups (no split there, while the direct path slices); a short code review with those points follows separately.
Next on our side: the same stack with #3662 on our tree (with the node-test counter), results on #3662. If you want a specific switch or a per-shader timing for the native MS, tell us which.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-02T06:24:40Z.
A note for later, so it doesn't get lost (not a request for this PR): once #3656 draws correctly and is tuned, a natural next step we'd like to work on is running a 128-thread console mesh program's two 64-lane waves in parallel on the native path. As we read the diff (unconfirmed, correct us), wave 0 and then wave 1 run one after the other inside one 64-thread D3D12 group; launching the group at 128 threads instead (each console wave as two 32-lane warps, exchanging through group-shared memory only where the program needs it) fits the 128-thread / 128-vertex / 128-primitive shape every mesh program of this title has, and should recover the parallelism the two-pass compute pass has today. Happy to take it on with you when the time comes.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T08:36:17Z.
Review (head
eafe8ae8, diff read, not a merge-check):783e94c6a,1b3bdfa1c,0ccba721e) are #3327, still open. This PR's own commits aref0518e855(+1863/-31) andeafe8ae82(+984/-75), about 2,850 lines, well past the ~800 where CONTRIBUTING asks why it cannot be split; the description doesn't say. Possible split along the commits: (1) the two shared DXIL changes below, each with a test; (2) plumbing nothing calls yet:Partner::Barrier/agree_cond(lanes.rs),MeshTarget::Native(lower.rs,lower_mem.rs),Lw::new_native_mesh(kernel.rs); (3) the translatordxil/native_mesh.rswith its CPU/DXC tests (the*_censustests in a later diagnostics PR); (4)packed_user_layout,Entry::PixelPackedand thePixelPacked/NativeMeshcache entries (lower_gfx.rs,kernel.rs,pso.rs); (5) the runtime wiring:NativeMeshPso, the wave64 branch oftry_native_mesh(real.rs), linear group slices withsplit = 1(bind.rs), and the GPU parity test.XCL_NATIVE_MESH.module/opt.rs~112:createHandleFromHeapandannotateHandlecalls are now merged only within a block (Cse::Block) instead of across blocks (Cse::Dom), for every direct-DXIL shader on every GPU, compute included. It matches the RDNA4 rule already on main atopt.rs~736, so it may be a real fix, but no test fails without it.graphics.rs~617:sig_partnow sorts the signature rows of every VS, PS and MS by (stream, register, order of first name appearance) instead of (register, first column); by reading this matches DXC's order, but no added test fails on main's order. The description presents both as part of the native mesh work rather than default-path changes; they need their own tests and their own PR.try_native_meshrefuses any adapter unlessWaveLaneCountMin == 32 && WaveLaneCountMax == 32(real.rs~9873), soXCL_NATIVE_MESH=1does nothing on AMD RDNA (32-64) and Intel. The only GPU test comparing the output with the two-pass path skips whenever wave64 is supported (native_mesh.rs~1475), so the maintainer's RDNA4 merge run exercises none of it. The claim that the halves cannot deadlock at a barrier (Partner::Barrierplusagree_cond, both halves taking half 0's branch decision) rests on one 60 s run on an RTX 5070 Ti; no test feeds the two halves differing branch conditions.XCL_NATIVE_MESH=1the smoke shows 1698 frames vs 1708 with it off (both 60/60/60): no visible benefit for ~2,850 lines. With the feature off the PR's run shows 1708 vs main's 1387 (+23 %), which the description doesn't explain; it may be cache warm-up or the default-path changes above.Fine (by reading): the feature is off by default (
XCL_NATIVE_MESH=1, wave32-only adapters, skipped while DXC compiles are deferred or pipeline libraries are built). Every failure returnsErrand keeps the two-pass pipeline (translation errors, translator panics caught at join, packed-PS failure falls back to unpacked PS + unpacked MS, PSO refusal, draw-time bind failure). MS outputs and PS inputs get their packed layout from the same function on the sameISG1. The new watch ring kinds 9 and 10 fit the 4-bit field, and the cache keys keep packed/unpacked PS and native/two-pass MS apart. Textual conflict with #3655 (kernel.rs,real.rs).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 Decodere on 2026-12-02T08:49:13Z.
Diff review (head
eafe8ae82, read-only code review — not a test report):Impressive engineering bringing direct-DXIL Wave64
ms_6_6and packed PS/MS signatures to 371/394 native pipelines with zero device removals. Reading the full diff (+3231/-98across 22 files) turned up 6 concrete issues that help explain both the rendering artifacts and the mesh GPU-time regression reported on RTX 5090:[CRITICAL]
agree_condforces half 1 to take half 0's branch decision AND inserts extra barriers on every barrier-reaching branch/loop (crates/xcl/src/gpu/dxil/lanes.rs:774-786,crates/xcl/src/gpu/dxil/native_mesh.rs:375-386,:908-910):agree_condcomputesagreed = self.sel(self.upper, o, v)(lanes.rs:784). Whenever half 0 and half 1 disagree on a branch condition, half 1 silently discards its own condition and follows half 0 — which can skip half 1's vertex/primitive exports (leaving zeroed(0,0,0,0)positions) or execute with mismatchedEXEC.analyze_barriers(native_mesh.rs:375-386) marks every branch whose post-dominator region reaches any barrier (including already-uniformS_CBRANCH_EXECZ/S_CBRANCH_SCCsynchronized bymask_exchange), adding redundantGroupMemoryBarrierWithGroupSync()exchanges inside hot branches and loops. Combined with serial wave 0 -> wave 1 execution in 64 threads and a thread-privateallocarecordarray (native_mesh.rs:680) that spills to local memory, this directly contributes to the ~55% mesh GPU-time regression (16.6->25.8 ms/frame).[CRITICAL]
is_barrier_instomitsV_DIV_SCALE_F32(crates/xcl/src/gpu/dxil/native_mesh.rs:83-137,:665;crates/xcl/src/gpu/dxil/lower_valu.rs:1078-1081;crates/xcl/src/gpu/dxil/kernel.rs:855):is_barrier_instlistsV_DIV_SCALE_F64(native_mesh.rs:117) but omitsV_DIV_SCALE_F32, which callsself.write_mask(&sdst, f)(lower_valu.rs:1081) and emits a cross-half exchange wheneversdstis whole-live. If a shader hasV_DIV_SCALE_F32as its only exchange,needs_barrierstaysfalse(native_mesh.rs:665) andlw.partnerstaysPartner::Missing(kernel.rs:855, silently returning0); if inside an un-agreed branch, it can deadlock the barrier.[CRITICAL]
GS_ALLOC_REQwave-0/wave-1 mismatch drops entire meshlets (crates/xcl/src/gpu/dxil/native_mesh.rs:939-957):When both wave 0 and wave 1 execute
GS_ALLOC_REQwith differing(nv, np)counts,agree(native_mesh.rs:952) evaluates tofalseand line956forces(nv, np) = (0, 0), dropping the entire meshlet.[CRITICAL] Indirect native mesh silently drops groups past
65,535(crates/xcl/src/hle/d3d12x/bind.rs:3171,:3182,:3737-3745):Direct
dispatch_meshslices draws >65,535 groups vianative_mesh_slices+IO_MESH_GROUP_BASE, whereasexecute_indirect_snapshothard-capslinear_gidindirect draws atcap = 65_535(bind.rs:3737) viaSCALE_ARGS_HLSL(min(raw_n, cap)atbind.rs:3171), silently truncating any indirect mesh draw exceeding 65,535 groups.[CRITICAL] Packed signature bugs in
lower_gfx.rs:110andnative_mesh.rs:592-600:packed_user_layout(crates/xcl/src/gpu/dxil/lower_gfx.rs:110) keys rows by(e.register, e.component_type == 3). Becausegct()(lower_gfx.rs:46-50,native_mesh.rs:65-69) maps1 => U32,2 => I32, and_(including6/F16)=> F32,U32/I32andF16all evaluatecomponent_type == 3tofalseand can be packed into the same DXIL signature row with incompatible integer/float component types.native_mesh.rs:596-598(alloc_stage(k, start_chan + cols)+s.rotate_left(start_chan as usize)) indexesms_slots[k].mask(native_mesh.rs:546-556) with the PS'sstart_chan: if MSOSG1and PSISG1place a matched semantic in different component lanes (e.g..xyvs.zw), the rotated offsets land onNone(native_mesh.rs:996-1003) and the attribute silently reads as all zeros.[HIGH] Global side effects & output-budget / scope:
native_mesh.rs:626-628(output_bytes) omits primitive index bytes (12 * max_primitives, unlikecrates/xcl/src/gpu/recomp/native_mesh.rs:59).XCL_NATIVE_MESHdefaults OFF,crates/xcl/src/gpu/dxil/kernel.rs:41bumpsTRANSLATOR_VERSION12 -> 13(invalidating every user's translated DXIL disk cache) andcrates/xcl/src/gpu/dxil/graphics.rs:617changessig_partsorting globally.+3231/-98(22 files), splitting#3327, packed PS/MS signatures, and direct-DXIL Wave64 native MS into separate PRs will make validation and bisecting much cleaner.AI use: Antigravity (Gemini 4 Neon) audited the full diff against
mainand drafted this review.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T11:09:39Z.
merge-check
base:
1c8b551475head:
eafe8ae825merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2927 passed, 0 failed, 51 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 by one reviewer at this same head; the review is at https://github.com/xcl-dev/xcl/pull/3656#issuecomment-7339675684 and its findings stand. Most serious: about 2,850 own lines on top of open #3327, with two untested changes on by default and no measured gain.
performance: 60 s smoke of a retail title, main
1c8b5514vs this merge (eafe8ae8): 1652 -> 1675 frames shown (101 %; last presents per 2 s: 60 60 60), peak commit 18228 -> 16929 MB, 0 device removals, 0 crashes.verdict: not yet: about 2,850 own lines on top of open #3327, with two untested changes on by default and no measured gain (see the review)
hardware / 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 Kalmarv on 2026-12-02T13:52:27Z.
Huge thanks @KDenKC for the RTX 5090 A/B and @Decodere / @Foniass for the line-by-line diff reviews!
Moving #3656 to Draft while we rebase onto
main(post-#3655) and fix the exact bugs you pinpointed:agree_conddiscarding half 1's branch condition + over-barriering uniform branchesis_barrier_instmissingV_DIV_SCALE_F32GS_ALLOC_REQwave-0/wave-1 mismatch zeroing entire meshletslinear_gidat 65,535 instead of slicingcomponent_type == 3conflating U32/I32/F16, androtate_left(start_chan)misalignment)output_bytesmissing12 * max_primitives, removing default-path side effects (TRANSLATOR_VERSION,sig_part,opt.rs), and splitting cleanly.Also @KDenKC, launching 128-thread native mesh groups (2 parallel 64-lane waves instead of serial wave 0 -> wave 1) is an awesome next step once the correctness bugs are fixed!
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-02T13:55:59Z.
@Kalmarv thanks, and agreed on the order: correctness first. We'll wait for your rebase and the six fixes before touching the parallel form.
One thing we want to settle before building it: whether it's needed at all. In our A/B the heaviest mesh programs ran 1.6 to 3.1 times slower on the native path than on two-pass, which fits the two waves running one after the other. But the GPU may already hide that wait by running other groups, so we'll first time the same program as one 128-thread group (wave 0, then wave 1) against one wave per group. If the two match, parallel waves won't help, and we'll say so here.
We have drafted ideas for it in the meantime: a 128-thread group where each half-group runs one console wave, its two 32-lane halves pairing through #3655's spin helpers instead of a group-wide barrier, so the two console waves never wait on each other's barrier counts. We'll bring the numbers and the design once your new head is up.
Your loyal testing minion stands by for the rebased head.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-02T15:14:46Z.
Rebased onto
origin/main(5eaadb54c, preserving #3327's 3 commits intact below this stack) ate1c7be060with fixes for all 6 findings from @Decodere and @Foniass — ready for @KDenKC's RTX 5090 re-test. Keeping #3656 in Draft pending the re-test and planned split once #3327 lands.Fixes in
e1c7be060agree_cond+ half-divergence scoping (lanes.rs,native_mesh.rs): replaced half-0-only agreement withCondAgree::{Half0, All, Any}(EXECZ/VCCZAND both halves;EXECNZ/VCCNZ/loop-cap OR both halves) and added forward half-divergence taint analysis integrated withmask_exchange::plan_ofso uniform branches emit zeroagree_condbarriers.is_barrier_inst+ lazyxcl_xs(native_mesh.rs): addedV_DIV_SCALE_F32toproduces_maskand removed eagerxcl_xsallocation so unused TGSM globals are never emitted.GS_ALLOC_REQepilogue (native_mesh.rs): prefers wave 0's nonzero(nv, np)allocation and falls back to wave 1's nonzero allocation instead of zeroing the meshlet when wave 0 and wave 1 disagree.bind.rs): extendedSCALE_ARGS_HLSLwithslice_base/total_capand slicedlinear_gidindirect dispatches into 65,535-groupExecuteIndirectslices withIO_MESH_GROUP_BASE = k * 65535instead of clamping and dropping upper meshlets.lower_gfx.rs,native_mesh.rs): keyedpacked_user_layoutby(register, type_class)separatingU32,I32,F32, andF16/other; fixed MS→PS channel mapping to index exact element offsets (ms_first + i -> (ps_first + i) - start_chan) instead ofrotate_left(start_chan).native_mesh.rs,kernel.rs,module/opt.rs): included+ 12 * max_primitivesinoutput_bytes, revertedTRANSLATOR_VERSIONto12, and removed themodule/opt.rsdiff (zero diff vsmain). Keptgraphics.rs::sig_part's deterministic name-offset tie-break for shared registers (verified required by DXC 1.9 for packed signatures and a no-op on unpacked shaders).Verification (RTX 5070 Ti, DXC
1.9.2609.5,rustc 1.99.0)cargo build --release -p xcl: 39 warnings (0 new vsorigin/main39).cargo test -p xcl --lib native_mesh -- --test-threads=4: 20 passed, 0 failed, 0 ignored (includes new CPU/DXC 1.9 and GPU parity tests for tainted half-1EXECZ, wave-0/wave-1 alloc mismatch, mismatched MS/PS packed lanes, mixedU32/I32/F16/F32packing,V_DIV_SCALE_F32,12 * max_primitivesbudget, and sliced indirect dispatch past 65,535 groups)..\scripts\test.ps1: 2,995 passed, 0 failed, 52 ignored across 43 binaries (24 GPU testsSKIPPEDon this wave32-only adapter: 22no wave64, 2no heap windowsopt-in).ea3b5e4d, 0 device removals, 0 crashes):origin/main5eaadb54c: 1,698 frames,60 61 60presents/2s, 15,798 MB peak commit.e1c7be060default (XCL_NATIVE_MESHunset): 1,702 frames,60 60 60presents/2s, 16,453 MB peak commit (0 native mesh log entries).e1c7be060opt-in (XCL_NATIVE_MESH=1): 1,683 frames,60 60 60presents/2s, 17,039 MB peak commit (185 / 186 nativems_6_6PSOs eligible, 1 / 186 cleanly routed to two-pass by the12 * max_primitivesoutput-budget check, 0 errors).Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-03T00:46:13Z.
@Kalmarv re-test of #3656 at
e1c7be06on the RTX 5090: withXCL_NATIVE_MESH=1the device is removedin the world, three runs out of three, always in the same place: a native-mesh
ExecuteIndirect. WithXCL_NATIVE_MESH=0the same builds run to the end of the session.Runs (the retail title, same save and scripted input, release builds, RTX 5090):
XCL_NATIVE_MESHe1c7be06e1c7be06+ other open PRs and local fixes (no mesh changes)The first run is your tree alone, so the fault is in the native-mesh path, not in the other changes.
The parallel-waves form is not it either (m2b and m2c fault the same way).
DRED, raw (the operation marked
>is the one in flight; 5 = ExecuteIndirect, 15 = Barrier):(
window N + 0x0is only the log's label for address 0; the heap windows were off in m2b/m2c.)What the shape says. Every time, the list repeats the native-mesh indirect sequence from
bind.rs'sExecuteIndirectpath: XCL's argument-rewrite compute pass (emit_scaled_args_rewrite: the"stand-in, or not translated" pipeline is XCL's own rewrite PSO, which DRED cannot name) → Dispatch →
Barrier → the native mesh pipeline (
emit_native_mesh_stage: the native PSO and root signature, thenSetGraphicsRootUnorderedAccessViewfor each record view) → ExecuteIndirect on the scaled argumentswith the title's count buffer → Barriers → the title's own ms/ps bound again. The fault is in that
ExecuteIndirect, under the native PSO. In nm-native-only the same sequence ran many times earlier in
the same list (3835 operations done), so it depends on the program or its records, not on the
path as a whole:
ms 154e358fddd643a6(native PSO key e57924ee) in nm-native-onlyms fb0ef97acb468f9a(native PSO key 0d75c92f) in m2b and m2c, both times 34 operations into a listBoth were logged as
native mesh …: eligible.Things worth checking, from reading the path (not proven):
stage.viewscan be 0 when it is bound as a root UAV, e.g. a record view thatprepare_two_pass_stageleaves unset for these programs. The shader reading it would fault exactlylike this.
split = 0the rewrite keeps valid dimensions andzeroes inactive ones, but a record whose mesh-pass arguments are left over from a previous use of a
reused buffer would not.
One caution: on NVIDIA, DRED often reports VA 0 when the driver doesn't know the faulting address, so
"VA 0" may mean "unknown" rather than a null pointer.
Picture with native mesh off on the combined tree (m2d/m2e): the best interior frames we have had
(the character solid, lit window, yard and tower, no tan blocks). That is the two-pass path, so it says
nothing about native mesh's picture. We can't compare native's picture, because it doesn't get far enough.
Logs, DRED blocks and frames are kept locally; we can pull more (for example the records of
154e358f/fb0ef97a) on request.Your loyal testing minion stands by for the next head.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T03:18:20Z.
@KDenKC Thanks for the detailed DRED report and bisection against
eafe8ae82— that isolated the regression window immediately.Pushed
07e3c32f3on top ofe1c7be060(preserving #3327's 3 commits intact below this stack) fixing four regressions introduced betweeneafe8ae82ande1c7be060:idioms::local_votesonPartner::Barrier(mask_exchange::plan_for_barrier,native_mesh.rs): rebasing ontomainpulled in #3655, wheremask_exchange::plan_of(&cfg, false, true, false, ...)runsidioms::local_votes(strippingEXECdemand from forwardS_CBRANCH_EXECZcompares) without populatinglocal_branch. BecausePartner::Barrierstill tests(lo | hi) == 0atS_CBRANCH_EXECZ, any inverted half-local mask (S_XOR_B64 -1/S_ANDN2_B64) turned the stale zero word for the other half into0xFFFFFFFF, breaking skip branches and feeding uninitialized/wrong lanes into subsequent address/export paths. Hit 6,685 / 6,685 unique mesh shaders in our local pipeline corpus.idioms::uniform_readsconditional barrier deadlock (mask_exchange::plan_for_barrier,native_mesh.rs): #3655'splan_ofalso populateduniform_reads, which lowersV_READFIRSTLANE_B32viaread_first_lane_uniform— puttingdx.op.barrierinside a per-halflonebranch. WheneverEXECis half-divergent, one half enters the barrier and the other skips it, guaranteeing a GPU hang (DXGI_ERROR_DEVICE_HUNG). Hit 967 / 6,685 mesh shaders in the corpus. Addedmask_exchange::plan_for_barrier(plain whole-live demand + compare batching, skippinglocal_votesanduniform_reads) fornative_mesh.rs.uniform_comparetaint and barrier tracking (native_mesh.rs): #3655 lowers scalar-onlyV_CMP_*directly assel(cond, exec, 0)with no cross-half exchange or barrier, butnative_mesh.rsstill counted it inis_barrier_instand cleared half-taint on its destination. Hit 3,844 / 6,685 mesh shaders in the corpus; fixed to excludeuniform_comparefromis_barrier_instand propagate scalar +EXECtaint to the written mask.bind.rs): inexecute_indirect_snapshot,flush_two_passnow runs beforeprepare_scaled_args, and each slice tracks its exact scratch-blockbeforestate across block rollovers (slice_scratch_before).Local verification (RTX 5070 Ti, DXC
1.9.2609.5,rustc 1.99.0)cargo build --release -p xcl: 39 warnings (0 new vsorigin/main39).cargo test -p xcl --lib native_mesh -- --test-threads=4(with local registered pipeline corpus): 22 passed, 0 failed, 0 ignored (new regression tests forlocal_votes,uniform_reads,uniform_comparetaint, and slice scratch-state rollover; 9,374 / 9,887 mesh shaders translated and validated withval_errs=0and0debug assertion failures)..\scripts\test.ps1: 2,997 passed, 0 failed, 52 ignored across 43 binaries (24GPU testsSKIPPEDon wave32-only adapter: 22no wave64, 2no heap windows).ea3b5e4d, 0 device removals, 0 crashes):XCL_NATIVE_MESHunset): 1,678 frames,60 61 61presents/2s, 16,276 MB peak commit.XCL_NATIVE_MESH=1): 1,653 frames,62 62 60presents/2s, 16,990 MB peak commit (93/94 eligible, 1/94 routed to two-pass on output budget, 0 errors).Not covered locally
XCL_DIRECT_DXIL_SOURCE_IDautomatically invalidates priorStage::NativeMeshcache entries frome1c7be060). If the hang/fault still reproduces on RTX 5090 at07e3c32f3, those faulting pipeline records/logs you offered would be the fastest way to narrow down any remaining data-dependent case.Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-03T03:23:39Z.
@Kalmarv thanks for
07e3c32f. One thing before we re-test: #3327 is now rebased onto currentmain(078358a0) asd10821a3(same three commits; build, native-mesh tests and suite pass, description updated). Could you restack #3656 ond10821a3? Then we'll run the 5090 world test on your restacked head (native mesh on, in the world where it faulted) and report back here.Your loyal testing minion, warming up the rig.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T03:46:29Z.
@KDenKC Restacked #3656 cleanly onto #3327
d10821a30(main078358a05) atf722bcdc5(zero conflicts; keeping #3327's 3 commits intact below our 3 commits) and updated the PR description. Ready for the RTX 5090 world re-test!Verification on
f722bcdc5(RTX 5070 Ti, DXC1.9.2609.5,rustc 1.99.0)cargo build --release -p xcl: succeeded, 39 warnings (0 new vsorigin/main39)..\scripts\test.ps1: 3,029 passed, 0 failed, 52 ignored across 44 binaries (all 22native_meshtests passed; 24 GPU testsSKIPPEDon wave32-only adapter: 22no wave64, 2no heap windows).ea3b5e4d, exit0x0, 0 device removals, 0 crashes):XCL_NATIVE_MESHunset): 1,690 frames,60 60 60presents/2 s, 15,813 MB peak commit (0 native mesh log entries).XCL_NATIVE_MESH=1): 1,699 frames,60 60 60presents/2 s, 16,905 MB peak commit (106 / 107 nativems_6_6PSOs eligible, 1 / 107 routed to two-pass on output budget, 0 errors).Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-03T04:41:07Z.
@Kalmarv results for the restack at
f722bcdcon the RTX 5090: withXCL_NATIVE_MESH=1the device isstill removed in the world, on the plain PR head and on a combined tree alike, in the native mesh's
indirect path. The new detail: on the plain head, the operation in flight is the argument-rewrite
Dispatchbefore the nativeExecuteIndirect, not theExecuteIndirectitself.1. The plain PR head (
f722bcdc, nothing else; the retail title, same save and input as our earlierruns,
XCL_NATIVE_MESH=1, DRED on; 284 mesh programs loggedeligible):2. A combined tree (
f722bcdcplus other open PRs that don't touch mesh code: #3517, #3089, #3282 withits pair-pages index, #3094, #3748, #3662; 331 programs
eligible), world entry +28 s:(The operation marked
>is the one in flight: 5 = ExecuteIndirect, 6 = Dispatch, 15 = Barrier. The"stand-in, or not translated" pipeline is XCL's own argument-rewrite PSO, which DRED can't name.
window N + 0x0is only the log's label for address 0.)What the two say together. Both lists repeat the native-mesh indirect sequence: the rewrite
Dispatch(emit_scaled_args_rewrite), then the native PSO with its record views, then theExecuteIndirecton the scaled arguments. In the combined tree it is the sliced form: the same native PSO(
e8d47e79) alternates with the rewrite several times, and the fault comes in a later slice afterearlier slices completed. In the plain run the fault comes one step earlier, in the rewrite
Dispatchitself. That pass reads the title's indirect commands (
src) and, with a count buffer, the count(
cnt) through root views. A VA-0 fault there points at one of those addresses being 0 for this draw(or at the slice's rewrite writing past its scaled-argument buffer), rather than at the native mesh
program. What to look at: how
commands_at/count_atresolve for the faulting draw (the title'sargument and count buffers through the GPU views), and what changes per slice (
group_base, theslice's
dstoffset). Same caution as before: on NVIDIA, DRED's VA 0 can mean "address unknown", andthe operation shown in flight is the first one not completed, which may lag the fault by one.
With
XCL_NATIVE_MESH=0the combined tree ran clean to the end (no removal, 5.6 fps).Your loyal testing minion stands by for the next head.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T06:16:43Z.
@KDenKC Thanks for the detailed DRED logs and A/B against
XCL_NATIVE_MESH=0— that narrowed this down quickly. Pushed86f25b22don top off722bcdc5(fast-forward, keeping #3327's 3 commits intact below this stack) with three fixes targeting the indirect-dispatch / VA-0 path.What we checked locally
ex_over = 0,ex_under = 0, zero missinguses_ops, zero untrackedglcsites). The 1-slice indirect MS+PS pipeline from the plain-PR DRED has zero loops, stores, images, LDS,agreed_branches, oruniform_comparesites, and ran cleanly on RTX 5070 Ti under the D3D12 Debug Layer + GPU-Based Validation (GBV) through multi-sliceSCALE_ARGS_HLSL→ExecuteIndirectwith 0 D3D12/GBV errors and no device removal.window 10 + 0x0/window 11 + 0x0label isreal.rsmatchingva == 0against the first unopenedUMA_WINDOW_VAS[k] == 0slot (WindowKind::None).Fixes in
86f25b22dcount_bufin native-mesh PCExecuteIndirect(bind.rs,execute_indirect_snapshot): pass(0, 0)instead of(count_buf, count_off)to PCExecuteIndirect, matching two-pass (SCALE_ARGS_HLSLalready reads any count buffer through the UMA window and zeroes commands past the live count, whereas the title's PC buffer state is unknown here).abi_root_signature(dev, false)inemit_scaled_args_rewrite_from(bind.rs): previously onlyu0..u4were bound; two-pass pre-populatedu5viatp.compute, whereas native-mesh lists have no prior two-pass compute bind, leaving root slot 5 at0x0afterSetComputeRootSignature.buf == 0/va == 0) (real.rs,uma_window_buffer_gpu&uma_va_of;bind.rs,prepare_two_pass_stage): returnNone/ fall back to a nonzero VA instead of handing out0 + offset.Verification on
86f25b22d(RTX 5070 Ti, DXC1.9.2609.5,rustc 1.99.0)cargo build --release -p xcl: succeeded, 39 warnings (0 new vsorigin/main39)..\scripts\test.ps1: 3,031 passed, 0 failed, 52 ignored across 44 binaries (all 23native_meshtests passed; 24 GPU testsSKIPPEDon wave32-only adapter: 22no wave64, 2no heap windows).ea3b5e4d, exit0x0, 0 device removals, 0 crashes):XCL_NATIVE_MESHunset): 1,694 frames,60 60 60presents/2 s, 17,721 MB peak commit.XCL_NATIVE_MESH=1): 1,698 frames,60 60 60presents/2 s, 17,072 MB peak commit (201 / 202 nativems_6_6PSOs eligible, 1 / 202 routed to two-pass on output budget, 0 errors).Not covered locally: we cannot reproduce the RTX 5090 in-world save directly here (only the 60 s smoke and synthetic GBV runs). If
86f25b22dstill hits a VA-0 page fault in-world on RTX 5090, the most useful next signal would be the faulting indirect draw'scommands_at/count_atUMA window + args and whetherXCL_HEAP_WINDOWS=1vs0changes the fault address/window.Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T07:35:12Z.
merge-check
base:
078358a058head:
86f25b22d0merge: clean
build: ok
tests: 3031 passed, 0 failed, 52 ignored; 28 skipped, the same as on main
review: 1 high, 8 medium, 2 nits (below)
performance: 60 s smoke run: 1669 → 1659 frames (99 % of main), peak commit 17577 → 17338 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 227 s there, 0 device removals, 0 crashes, 4.5 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: 1 blocking finding (critical or high, below); also
PR descriptionis redhardware / 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 push adds one commit (
86f25b22) on top off722bcdc: native-mesh ExecuteIndirect no longer passes the title's count buffer, the scale-args rewrite binds all six root UAVs, and UMA lookups reject windows with no buffer. These changes look correct, but none of the findings from my earlier review is fixed, and the UMA guards change shared default-path helpers in a native-mesh PR. The carried #3327 draft commits still block merging.High
b9365b466,e1c7bf4ff,d10821a30) are #3327's current headd10821a30, and #3327 is still an open draft. Merging this PR would merge #3327's unreviewed draft work with it. Wait for #3327 to land and rebase onto main, or take those commits out.Medium
86f25b22changes uma_window_buffer_gpu and uma_va_of (real.rs ~565-580). Default-path code calls them: buffer copies and writes (list_x.rs ~3941, ~4203, ~4261, ~4345), the indirect count guard (indirect_guard.rs ~306) and title compute binds (bind.rs ~5524). The logic is right, but it only matters when sparse::init (sparse.rs ~3411) failed to open the sparse and view windows. It has nothing to do with native mesh. The tests cover only the two new helpers, not the functions. Move it to its own PR with a test that drives uma_va_of / uma_window_buffer_gpu with an unopened window.5eaadb54cand 17,721 MB at86f25b22with XCL_NATIVE_MESH unset (112 %, under the 125 % limit), while the description says the default path is untouched. The main run is on a commit 76 commits older than the PR's base078358a05, so the gap may come from main. Compare main and the PR on the same base before calling the default path unchanged.86f25b22with #3681's headb0819749("bound scratch for sliced indirect mesh draws") conflicts in crates/xcl/src/hle/d3d12x/bind.rs. Both change the sliced indirect mesh scratch handling. Coordinate which lands first and rebase the other.Nit
maxcommands at UMA addresssrc..." still sits above slice_scratch_before, run together with its own comment. Move it back above make_scaled_args_buffer (~3342).Checked and fine
86f25b22, and the only change sincef722bcdcis one commit on top of it; the six commits below are unchanged86f25b22merges into current main without conflictsHow 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 Kalmarv on 2026-12-03T08:11:15Z.
@Foniass Thanks for the thorough merge-check! Pushed
938b9e311on top of86f25b22d(fast-forward) addressing the actionable review findings and re-ran the base smoke on078358a05:Addressed in
938b9e311& updated PR descriptioncheck_unplanned_barrierinnative_mesh.rsnow runs unconditionally in release builds too (checking bothstart_b[insts_before..]and newly created blocks) and returnsErrso any mismatch fails closed to two-pass instead of shipping an untracked barrier; addedunplanned_barrier_is_rejected_even_in_release. (Kept DXCvalidate::validateat line ~1473 undercfg!(any(test, debug_assertions))matchingkernel.rs:963so release builds do not requiredxil.dll;CreatePipelineStatealready rejects invalid DXIL to two-pass.)#3339overlap):sig_partingraphics.rsnow gates the string-table name-offset tiebreaker onstage == Stage::Mesh || p.iter().any(|e| e.e.place.is_some()), leaving all defaultStage::VertexandStage::Pixelsignatures (including#3339's auto-packedSV_ClipDistance/SV_CullDistance) on the exact original(register, mask.trailing_zeros())sort.real.rsdefault-path UMA helpers): Reverted theuma_window_buffer_gpu/uma_va_ofchange from#3656so this PR does not modify shared default-path UMA helpers (will open a separate small PR with a test drivinguma_va_of/uma_window_buffer_gpudirectly). Kept thebind.rsindirectcount_buf/ 6-slot ABI /nonzero_window_vafixes.5eaadb54cbase block with a fresh 60 s smoke on exact base078358a05(1,695frames,17,123 MBpeak commit vs PR default1,711frames,17,033 MBpeak commit —-90 MB).Not testedwave64 coverage) & #11 (misplaced doc comment): Clarified the wave32/wave64 coverage split under Not tested, and movedmake_scaled_args_buffer's doc comment back abovemake_scaled_args_bufferinbind.rs.Still open / Draft status
#3327draft commits & ~4k size) & #9 (#3681conflict inbind.rs): Keeping#3656in Draft stacked on#3327while@KDenKCre-tests on RTX 5090; once#3327(and#3681) land, we will rebase ontomainand split into smaller PRs.PR descriptioncheck:pr-check.ymlis currently hitting repo-widestartup_failureacross PRs onmain(e.g. runs47048824583,47060767515);python scripts/pr_check.py --localpasses withdescription ok.Verification on
938b9e311(RTX 5070 Ti, DXC1.9.2609.5,rustc 1.99.0)cargo build --release -p xcl: succeeded, 39 warnings (0 new vsorigin/main39)..\scripts\test.ps1: 3,031 passed, 0 failed, 52 ignored across 44 binaries (all 24native_meshtests passed; 24 GPU testsSKIPPED: 22no wave64, 2no heap windows).ea3b5e4d, exit0x0, 0 device removals, 0 crashes):078358a05: 1,695 frames,60 60 60presents/2 s, 17,123 MB peak commit.XCL_NATIVE_MESHunset): 1,711 frames,60 60 60presents/2 s, 17,033 MB peak commit.XCL_NATIVE_MESH=1): 1,697 frames,60 60 60presents/2 s, 17,521 MB peak commit (447 / 469 nativems_6_6PSOs eligible, 22 / 469 routed to two-pass on output budget, 0 errors).Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T08:35:16Z.
merge-check
base:
16c2fd082ahead:
938b9e3118merge: clean
build: ok
tests: 3037 passed, 0 failed, 56 ignored; 28 skipped, the same as on main
review: 1 high, 5 medium (below)
performance: 60 s smoke run: 1683 → 1657 frames (98 % of main), peak commit 18505 → 17695 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 232 s there, 0 device removals, 0 crashes, 4.3 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: 1 blocking finding (critical or high, below); also
PR descriptionis redhardware / 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 push adds one commit (
938b9e31) on top of86f25b22. It fixes the debug-only barrier check, limits the signature sort to native mesh, reverts the shared real.rs UMA change and moves the misplaced doc comment; the author's same-base smoke also clears the peak-commit concern. The carried #3327 draft commits still block merging, and the size, speed, RTX 5090 and conflict findings from my last merge-check are still open.High
b9365b466,e1c7bf4ff,d10821a30) are still #3327's headd10821a30, and #3327 is still an open draft. Merging this PR would merge #3327's unreviewed draft work with it. The author's reply says they will rebase once #3327 lands; until then, wait for #3327 or take those commits out.Medium
86f25b22adds open_window_buf / open_window_va and their test in real.rs, and938b9e31("Address review findings on PR #3656") removes them again. It also carries bind.rs and graphics.rs fixes under a Recompiler subject. CONTRIBUTING.md asks for review fixes to be squashed into the commits they fix, so that each commit is one logical change. Squash938b9e31into the commits it fixes and drop the real.rs add/revert pair from the history.86f25b22, and938b9e31has since reverted part of86f25b22(the real.rs uma_va_of / uma_window_buffer_gpu guards). So the 5090 re-test has to run on938b9e31itself. Nothing yet shows that the opt-in picture matches two-pass. Add the 5090 result at this head and a visual check against two-pass.938b9e31with #3681's head61408de0still conflicts in crates/xcl/src/hle/d3d12x/bind.rs (sliced indirect mesh scratch). With #3339's head62d53267it conflicts in graphics.rs (both add the name-offset tiebreaker to sig_part ~615), lower_gfx.rs and core_tests.rs. #3339 itself also conflicts with main. Agree which lands first and rebase the other; the sig_part tiebreaker should end up in one place.Checked and fine
078358a05: 17,123 MB on main against 17,033 MB with XCL_NATIVE_MESH unset, 1,695 against 1,711 frames938b9e31merges into current main16c2fd082without conflictsHow this was tested
16c2fd08, thencargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4.scripts/smoke.ps1: 60 s of a retail title on main16c2fd08and on this merge; presents per 2 s at the end: 61 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 Gevroska on 2026-12-03T08:45:28Z.
I ran six focused checks on
86f25b22with my RTX 3080, driver32.0.16.1692, and DXC1.9.2609.5. All six passed with zero skips.The native-mesh and two-pass paths produced the expected triangle color and matched across the full texture readback. The separate test for the upper half of the split wave and the packed pixel-shader input signature also passed. The other four checks covered adapter selection, sliced and counted indirect arguments, and the six expected CPU-side binding slots.
This qualifies those paths on Ampere. I haven’t run a parent comparison or a retail game regression for this head.
AI disclosure: OpenAI Codex GPT-6.1 Terra ran the tests. GPT-6.2 Sol independently checked the source, executable, and saved results. GPT-6.2 Astra drafted this comment.
I reviewed and approved this comment before posting.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T08:53:19Z.
@Gevroska Thanks for the RTX 3080 (Ampere) verification across all six checks!
@Foniass Squashed our 5 commits above #3327 (
d10821a30) into 2 clean logical commits addressing Finding #3 (0-byte tree diff vs938b9e311, keeping #3327's 3 commits intact below our stack):a1c56128eRecompiler: add direct-DXIL Wave64 native ms_6_6 mesh translator(allgpu/dxil/*changes, verified standalone withcargo check -p xcl --tests).a44f86d3eD3D12.X: wire Wave64 native mesh PSOs and sliced indirect dispatch(pso.rs,bind.rs,real.rs, with thereal.rsadd/revert pair removed from history).Verification on
a44f86d3e(RTX 5070 Ti, DXC1.9.2609.5,rustc 1.99.0)cargo build --release -p xcl: succeeded, 39 warnings (0 new vsorigin/main39)..\scripts\test.ps1: 3,031 passed, 0 failed, 52 ignored across 44 binaries (all 24native_meshtests passed; 24 GPU testsSKIPPED: 22no wave64, 2no heap windows).ea3b5e4d, exit0x0, 0 device removals, 0 crashes):078358a05: 1,695 frames,60 60 60presents/2 s, 17,123 MB peak commit.XCL_NATIVE_MESHunset): 1,716 frames,60 60 60presents/2 s, 17,213 MB peak commit.XCL_NATIVE_MESH=1): 1,699 frames,60 60 60presents/2 s, 17,333 MB peak commit (201 / 202 nativems_6_6PSOs eligible, 1 / 202 routed to two-pass on output budget, 0 errors).Remaining open items (#1/#2/#6 stacked on #3327, split/rebase after #3327 + #3681/#3339 land; #4/#5 in-world GPU-time gain, visual comparison, and RTX 5090 re-test at
a44f86d3epending @KDenKC) are unchanged.Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-03T09:07:30Z.
@Kalmarv before this lands: on the RTX 5090 the fault is not gone at
86f25b22(same code asa44f86d3). Plain PR head,XCL_NATIVE_MESH=1, 16-window layout, the retail title: the device is removed 9 s into the world, at 77 s, now on a nativeDispatchMeshrather than the indirect path:Op 42 in flight is a
DispatchMeshunder the native PSO1fc0ecf7. A lead from reading the code (not yet proven): this run opened 10 UMA windows (3 sparse + 1 coherent + 6 view, so 0..9), and the heap slots for windows 10..15 hold null UAVs; native mesh programs are translated for 16 windows (16 | HEAP_WINDOWS), so a program whose address resolves to window 10+ selects a null slot, which fits a VA-0 fault. If that holds, bounding native-mesh addressability to the windows actually open (and keying the translation on it) would fix it; we're testing that on our side and will post the result. WithXCL_NATIVE_MESH=0the same build runs to the end of the session.Your loyal testing minion, still on it.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T09:32:19Z.
@KDenKC Thanks for testing
86f25b22/a44f86d3on the RTX 5090 and narrowing it to a directDispatchMesh— standing by for your window-bound test result!Two quick local data points from inspecting that pipeline and testing on our RTX 5070 Ti while you run that check:
DispatchMeshpipeline (under16 | HEAP_WINDOWS): bothms_6_6and two-passcs_6_6emit the exact same 47 window< 16checks, 72rawBufferLoads, 56createHandleFromHeaps, 5textureLoads, 2sampleLevels, and IO dword offsets ([3, 16..24, 112, 118]), withps_packed = falseandvalidate = Ok(())on DXC 1.9. Both paths also receive the samewindows_for_stage(mem_windows(), ...)(pso.rs:1601/1687).ms_6_6readingResourceDescriptorHeap[MEM_HEAP_BASE + 10]populated withconsole_heap.rs:620's null UAV (Noneresource,raw_window_uav(MAX_SIZE)) completed cleanly (WAIT_EVENT(0),GetDeviceRemovedReason() = Ok(())) on our RTX 5070 Ti, so a null window-10 descriptor alone did not reproduce a VA-0 fault in isolation here.Curious to see whether bounding open windows changes the RTX 5090 result — if it does not, another place worth checking on the native
DispatchMeshpath is whether one of the shader's 2agreed_branches(CondAgree::Any) or ignoredS_BARRIERs diverges from two-pass on live in-world inputs, or whetherensure_view_heaprunning beforeflush_two_passinbind.rs:3506-3509ever interacts with deferred draws on that list.Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T09:58:47Z.
merge-check
base:
16c2fd082ahead:
a44f86d3e6merge: clean
build: ok
tests: 3037 passed, 0 failed, 56 ignored; 28 skipped, the same as on main
review: 1 high, 4 medium, 2 nits (below)
performance: 60 s smoke run: 1683 → 1667 frames (99 % of main), peak commit 18505 → 17253 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 221 s there, 0 device removals, 0 crashes, 3.2 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: 1 blocking finding (critical or high, below); also
PR descriptionis redhardware / 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 push re-squashes the author's commits above #3327 into two (
a1c56128translator,a44f86d3runtime wiring); the tree is the same as938b9e31, so no code changed since my last merge-check. That fixes the review-fix history finding, but #3327's draft commits are still carried, and the size, speed, RTX 5090 and conflict findings are still open. KDenKC has since reproduced the RTX 5090 device removal on the same code, now on a native DispatchMesh.High
b9365b466,e1c7bf4ff,d10821a30) are still #3327's headd10821a30, and #3327 is still an open draft. Merging this PR would merge #3327's unreviewed draft work with it. Wait for #3327 to land and rebase, or take those commits out.Medium
a1c56128eis +3,312/-79 (native_mesh.rs alone is about 2,500 lines) anda44f86d3eis +564/-87. The squash made the commits cleaner but no smaller, and the total is far past the ~800-line point where CONTRIBUTING.md asks for a reason it cannot be split. Split it before merge as planned: translator behind the flag with its tests, packed PS/MS signatures, then the runtime wiring.86f25b22with XCL_NATIVE_MESH=1 on the RTX 5090. The device was removed 9 s into the world, with a page fault at GPU VA 0 (window 10 + 0x0) on a native DispatchMesh (PSO 1fc0ecf7). Earlier runs faulted only on the indirect path.86f25b22is not quite this head (938b9e31later reverted its real.rs UMA guards), but nothing since938b9e31changes the native path. KDenKC's lead is that native mesh programs are translated for 16 windows while only 10 are open, so an address that resolves to window 10+ reads a null slot; this is not proven yet. Nothing yet shows the opt-in picture matches two-pass either. Add the 5090 result at this head and a visual check against two-pass.a44f86d3with #3681's head61408de0conflicts in crates/xcl/src/hle/d3d12x/bind.rs (sliced indirect mesh scratch). With #3339's head62d53267it conflicts in graphics.rs (both add the name-offset tiebreaker to sig_part ~615), lower_gfx.rs and core_tests.rs. Agree which lands first and rebase the other; the sig_part tiebreaker should end up in one place.Nit
a44f86d3echanges code the default two-pass path runs. prepare_two_pass_stage now filters zero window VAs through nonzero_window_va (bind.rs ~3115). SCALE_ARGS_HLSL gains slice_base/total_cap words and binds six root UAVs in emit_scaled_args_rewrite_from (bind.rs ~3287, also reached from prepare_scaled_args ~3330). These look harmless (see the fine lines) but the description should list them.a1c56128eanda44f86d3eare paragraphs and bullets of 200-500 characters on single lines. git log in this repo wraps bodies at about 72 columns.Checked and fine
a1c56128e(only gpu/dxil files, Recompiler subject) anda44f86d3e(pso.rs, bind.rs, real.rs, D3D12.X subject). The real.rs open_window_buf / open_window_va add/revert pair is gone from the history, and the tree is the same as938b9e31(tree5d728532).a1c56128euses nothing that onlya44f86d3eadds: the native-mesh references outside gpu/dxil at that commit (emit.rs, recomp/mod.rs, bind.rs, gpu_profile.rs) all come from #3327's commits, which fits the author's standalone cargo check of that commit938b9e31: nonzero_window_va keeps the fallback for None and Some(0) and is tested (bind.rs ~8303), and default SCALE_ARGS_HLSL callers pass 0, 0 for the slice wordsa44f86d3merges into current main16c2fd082without conflicts86f25b22(comment 7372699251) passed with no skips, so the parity, half-1 branch, packed PS signature and sliced-indirect tests have now run on wave32 Ampere. That run had no retail-title regression check.How this was tested
16c2fd08, thencargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4.scripts/smoke.ps1: 60 s of a retail title on main16c2fd08and on this merge; presents per 2 s at the end: 60 60 61.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 KDenKC on 2026-12-03T11:22:14Z.
@Kalmarv follow-up on
a44f86d3, RTX 5090, the retail title,XCL_NATIVE_MESH=1. First a correction: my "window 10" lead above was wrong.window 10 + 0x0is only the log's label for address 0 (that window's base reads as 0); restoring the unopened-window guards from86f25b22'sreal.rschanges nothing (run nm-abg below).1. The
DispatchMeshfault at world entry is your own42bd1090. Ona44f86d3the shared heap's null-window step runs beforefill_nulls, soMEM_NULL_LOAD/MEM_NULL_STORE(slots 20 and 21) end up asTexture2Dnull views while the translated PS reads and writes them asRWByteAddressBuffer(ps3169caf0d1a3f218: 73 slot-20 + 4 slot-21 raw-buffer ops). Cherry-picking42bd1090on top (null window views afterfill_nulls, so those slots stay raw-buffer null UAVs) removes it: the run now gets 80-100 s into the world instead of losing the device at entry (the frame dumps up to then still show the loading art; the lit cell isn't reached yet). It isn't in the PR head yet.2. A second, separate bug (fixed on our side, harmless to the fault):
native_mesh.rsalloc_stage/matched(around L943-1010) prune MS output components by the MS's ownOSG1mask. For mse1fbdad48510b7bcthat's0x3onTEXCOORD0, while the linked PS declares0xFand reads.zw, so the PS gets 0.0 there (the two-pass emitter keeps all 4). Our fix keeps every component the linked PS declares unless a sibling MS output owns it on the same register, with a test for both cases. Happy to put it up as a commit for you to pick.3. What's left: a hang on a native
ExecuteIndirect, the same in three runs, ~80-100 s into the world:a44f86d3+42bd1090real.rsguardsOp 5 =
ExecuteIndirectunder the native PSO0d75c92f, 34 operations into the list, with device state 3 this time. It is the same PSO as theExecuteIndirectfault in our earliere1c7be06runs, so the arguments or count fed to thatExecuteIndirectare next on our list. WithXCL_NATIVE_MESH=0, the86f25b22tree ran to the end of the session.Direct native
DispatchMeshholds. With fixes 1+2 and a local switch that sends only the native-eligibleExecuteIndirectdraws down the two-pass path (directDispatchMeshstays native), the run went to the end: 309 s in the world, no removal, frame GPU span 154 ms, picture the same as the native-off run of the same tree. So what's left is only the nativeExecuteIndirectpath.Your loyal testing minion, three removals further along.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T11:47:11Z.
@KDenKC Huge milestone — thank you for tracking down the world-entry fault to
42bd1090and verifying that direct nativeDispatchMeshholds for the full 309 s in-world run with matching output!On your three points:
DispatchMeshfault (42bd1090): makes complete sense —a44f86d3is still stacked on#3327's older base without42bd1090.OSG1vs linked PSISG1mask pruning (native_mesh.rs:943-1010): great catch —lower_mem.rsalready forwards every enabledEXP PARAMchannel intostaged_comp, so keeping PS-declared components not owned by a sibling MS output on the same register is the right fix. Happy to cherry-pick your commit (with tests) into our next push once the indirect hang is narrowed down.ExecuteIndirecthang (DRED device state: 3= hung): while you check the live arguments/count on that draw, we audited the faulting indirect pipeline's translated nativems_6_6DXIL and thebind.rs:3792-3858indirect path locally:ms_6_6DXIL is clean: DXC 1.9validate = Ok(()); all 12 RDNA2 loops are single-level (4 exchanged-mask waterfall loops with barriers + 8 barrier-free loops), and every one of the 38 barrier-guarding conditional branches in the emitted DXIL traces either to anagree_condbarrier (16 sites), an exchanged 64-bit mask, a loop counter, or a dispatch-invariantu1IO load.ExecuteIndirectcaps a cold command to ~1,455 groups (INDIRECT_RECORDS = 32 MiB, max ~5.8k at128 MiB), whereas nativeExecuteIndirect(bind.rs:3804) allows65,535groups per slice (and passes allmaxcommands in a singleExecuteIndirectatbind.rs:3847vs two-pass's per-commandmax = 1loop atbind.rs:3929). If the title's indirect buffer feeds a large or uninitialized group count (or largemax), native runs ~45x more groups of that heavy shader than two-pass before capping.Holding off on pushing any speculative changes while you check the live indirect arguments/count on the RTX 5090 — let us know what shows up there and feel free to drop the commit/branch for fix 2 whenever convenient!
Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-03T12:10:11Z.
@Kalmarv checked your group-count lead on the RTX 5090; it isn't the cause. A local switch clamped every native
ExecuteIndirectcommand to at most 1,455 groups (the two-pass cold cap for that record size), with nativeExecuteIndirecton and everything else as in the run that held:ExecuteIndirectpipelines loggedup to 1 commands, somaxis 1 everywhere,0d75c92fincluded, and nothing passes a large command count;So one command of at most 1,455 groups of that pipeline still hangs, which points at what a single group does (its records/views, or a wait inside it) rather than how many run. We didn't count how often the clamp actually cut a command (no counter in that build), so a count above 1,455 isn't fully ruled out, only made unlikely.
Fix 2 (the
OSG1channel pruning) is on our fork for you to pick: branchfix/native-mesh-ps-channels(commit918dbd7d, ona44f86d3, with its tests).Your loyal testing minion, still poking the one draw that won't behave.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T12:29:58Z.
@KDenKC Thanks for testing the 1,455-group clamp and confirming
max == 1across all 322 nativeExecuteIndirectpipelines — that rules out both large command counts and >1,455-group saturation cleanly. Also reviewed918dbd7donfix/native-mesh-ps-channels— very clean, we'll cherry-pick it into the next push once we pin down this hang.A few more local checks on that faulting pipeline on our RTX 5070 Ti (same Blackwell arch):
ISG1(notablySV_IsFrontFacepacked into reg 7.yalongsideTEXCOORD5.x).CreatePipelineState(ms_6_6+ packedps_6_6+ 1 MS static sampler) produced 0 Debug Layer messages, andExecuteIndirect(DispatchMesh, 1)with zeroed buffers completed in 7.6 ms (WAIT_EVENT(0),GetDeviceRemovedReason() = Ok(())).S_BARRIER/ loop guards: bothS_BARRIERs sit right next toS_SENDMSGat the end of the shader (zero LDS / zero stores), and theicmp eqbarrier-free loops are explicitly zero-guarded before entry.Two quick splits that should separate the remaining hypotheses in one run on the RTX 5090:
ExecuteIndirectpipelines enabled):bind.rs's nativeExecuteIndirectpath is clean and the hang is specific to that shader pair (next check there would be disablingwant_packed_pson it in case packedSV_IsFrontFace/ reg-7 sharing misbehaves on live primitives, or checking whether its live inputs drive one of its loops to the 4,096 cap).ExecuteIndirectpipeline hangs next -> the bug is inbind.rs's nativeExecuteIndirectwiring itself. The only runtime differences left there vs two-passExecuteIndirectare:bind.rs:3847wrapspc(this, sig, ...)infresh_indirect_arguments(transitioning the globalARGUMENT_ORDERbuffer) even thoughscaledwas just transitionedUAV -> INDIRECT_ARGUMENTatbind.rs:3314(two-pass does not wrappcinfresh_indirect_arguments);bind.rs:3812runsnative_mesh_stage/ensure_view_heapbeforeflush_two_passatbind.rs:3818.Holding off on pushing
918dbd7duntil we see which side of that split fires so we don't churn your test base.Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-03T12:31:59Z.
@Kalmarv your split already has an answer from our side: it's not one pipeline. In the next run on the same tree (
a44f86d3+ fixes 1 and 2, nativeExecuteIndirecton) the device went at world + 14 s on a different nativeExecuteIndirectpipeline, before0d75c92fhad run even once:e8d47e79is also the pipeline an earlier run of ours lost the device on, and thee1c7be06runs above died undere57924eeand0d75c92f. So the same op-5 hang shows up under at least three native pipelines, which points at the nativeExecuteIndirectwiring inbind.rsrather than one shader pair. Your two differences (thefresh_indirect_argumentswrap at L3847, andnative_mesh_stage/ensure_view_heapbeforeflush_two_pass) are the right places to look.Running now: a readback of the rewritten arguments of the last 64 native
ExecuteIndirectcalls (any pipeline), logged at the removal, so the call in flight shows its dims, stride and address. I'll post what it shows.Your loyal testing minion.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-03T12:55:52Z.
@Kalmarv please hold off on cherry-picking
918dbd7d(fix 2): on our side it changes the picture. Same tree, native mesh on (nativeExecuteIndirectoff), same save and frames, one run each: with918dbd7da hard dark diagonal band cuts across a group of paper notes on a wall in all 3 compared frames; with it reverted the band is gone in all 3 (the rest of the frame matches). So keeping the PS-declared components there feeds something wrong into that program, maybe the sibling-output rule or the register it lands on. We'll look at which program draws the notes and report back before you take it.Your loyal testing minion, catching our own bug this time.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T13:04:06Z.
@KDenKC Copy that — holding off on
918dbd7dand waiting for both the indirect argument readback and what you find on that wall-notes shader.When you inspect that pair, two quick things worth checking:
XCL_NATIVE_MESH=0) matches native-without-918dbd7don those 3 frames (or also shows the band).OSG1and PSISG1on that register have different lowest set mask bits (ms_first != ps_first), or whether the MSEXPwrites nonzero data into channels outside itsOSG1mask that0.0was masking.Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-03T13:22:22Z.
@Kalmarv the native
ExecuteIndirectin flight at the removal, named (youra44f86d3stack with nativeEI on,
XCL_NATIVE_MESH_EI_CAP=1455; a local readback copies each native EI call's rewritten argumentsjust before it runs and marks the slot with
WriteBufferImmediate, the26in DRED's breadcrumbs):(in a GPU-memory window). The "title's args" are read on the CPU at the removal, after the title has
reused that record, so they aren't the values the GPU read and can't be compared. The rewritten
arguments are the ones that ran: across all 41 cut-off lists they're small, sane counts (0, 1, 2, 5,
31 groups), nothing like a garbage or huge count.
0d75c92fdo: its record orview reads (DRED's VA 0, on NVIDIA possibly "unknown"), not from the argument path.
0xb5da3d1a0(the crash report'slist of recent draws doesn't reach back to it).
Your loyal testing minion stands by for the next head.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T14:00:36Z.
@KDenKC Thank you for the readback —
[5, 1, 1]withmax = 1, stride = 12cleanly rules out bad/garbage indirect counts!We also audited all three hanging indirect pipelines from your DRED logs locally (both the packed-PS one and the two unpacked-PS ones):
ms_6_6shaders with 51–77 intrinsic barriers (4–8 inside waterfall loops) and 1 MS static sampler; all three pass DXC 1.9 validation cleanly, load the exact same 11 IO buffer offsets as two-pass, have all 36 loop back-edges bounded (4096cap / epilogue counts), and have all 84 barrier-guarding conditional branches provably group-uniform (0 divergent barrier paths).ExecuteIndirectand two-passExecuteIndirect:bind.rsnativeExecuteIndirectwiring — callingfresh_indirect_argumentsaroundpc(...)hammers the single globalARGUMENT_ORDERbuffer (COMMON -> INDIRECT_ARGUMENT -> COMMON) thousands of times per frame on the Direct queue concurrently with Compute queues even thoughemit_scaled_args_rewrite_fromalready transitionedscaledfromUNORDERED_ACCESStoINDIRECT_ARGUMENT, plusnative_mesh_stage/ensure_view_heapran beforeflush_two_pass.GroupMemoryBarrierWithGroupSyncconcurrency hang (#1727 pattern) — two-pass runs those three heavy shaders withPartner::Spin(0 exchange barriers), whereas nativems_6_6runs them withPartner::Barrier(58–96dx.op.barrier(9)calls per group) concurrently with async compute queues.Pushed updated head
e2a4128c6(stacked on #3327d10821a30; holding off on918dbd7das requested, and wrapping commit bodies to 72 cols per @Foniass):fresh_indirect_argumentswrapper on nativeExecuteIndirect(matching two-pass) and movesflush_two_passbeforenative_mesh_stageon Direct lists (crates/xcl/src/hle/d3d12x/bind.rs)..\scripts\test.ps13,031 passed, 0 failed, 52 ignored across 44 binaries (24 GPUSKIPPED: 22no wave64, 2no heap windows), plus paired 60 s smokes (default1,695frames /17,231 MB, opt-inXCL_NATIVE_MESH=11,707frames /16,689 MB, 0 removals, 0 crashes).If
e2a4128c6(+42bd1090) holds on the RTX 5090, suspect (1) was the cause; if it still hangs on>5underDRED device state: 3, we will have isolated it cleanly to suspect (2) (Partner::Barrierconcurrency on Blackwellms_6_6) and can target that directly.Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-03T14:40:38Z.
@Kalmarv thanks for both suspects. Results on the RTX 5090, the retail title, native mesh on with native
ExecuteIndirect:Suspect 1 (no
fresh_indirect_argumentswrap +flush_two_passbeforenative_mesh_stage), as two switches in our tree on top of youra44f86d3stack, both logged on: the device is still lost, at world+101 s, the same way as before:Your exact tree (
e2a4128c6+42bd1090, nothing else) hangs the same way, at world+94 s:Suspect 2 (group barriers hanging while async compute runs) doesn't fit what DRED shows: at every removal, every list on the other two queues is at
0 of N operations done, around: >46 …, and op 46 isBegin. Nothing on another queue was executing when the native draw hung:What all runs share: the same native program (
0d75c92f), alone on the GPU, in flight with a small group count. A local readback of the rewritten arguments just before each nativeExecuteIndirectshows 5 or 9 groups on the call in flight, with all six root UAVs valid. Sending only that pipeline down two-pass moves the hang to another nativeExecuteIndirectpipeline; with nativeExecuteIndirectoff and directDispatchMeshnative, the world holds. DRED's state is 3 (hung), and the VA 0 label may be NVIDIA's "unknown".So it looks like the native program itself stops on real data. Could you look at how the native translation places group barriers in
0d75c92f(and the indirect programs generally): a barrier that only some waves reach, or one inside lane-divergent control flow, would hang exactly like this, and only when the data takes that path.Your loyal testing minion stands by for the next head.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-12-03T15:06:49Z.
@Kalmarv a correction to my hold on
918dbd7d: it was wrong, fix 2 isn't what darkens the notes. Comparing more runs with the gamma raised shows the same defect with fix 2 reverted. In all 4 runs with native mesh on (directDispatchMeshnative, nativeExecuteIndirectoff, with and without fix 2), dark foreground geometry covers part of the paper notes: a horizontal band across them, one note fully hidden, and stretched grey ribbons outside the window in 3 of the 4. None of the 10 two-pass runs of the same scene has any of it. And a static check of all 560 recorded (ms, ps) mesh pairs from our runs finds 0 where fix 2's rule changes anything (the PS's mask equals the MS's on every matched semantic), so it can't be the cause here.So for native mesh as it stands on our side there are two separate things: the
ExecuteIndirecthang above, and some directDispatchMeshdraws (it looks like skinned foreground geometry) coming out with wrong positions or occlusion. Fix 2 is yours to take or leave on its own merits. We're narrowing down which mesh program draws the dark shapes and will report it.Your loyal testing minion, owning the misread.
AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T15:07:01Z.
@KDenKC Huge thanks for testing
e2a4128c6and catching that the other queues are all at>46(Begin) — ruling out bothbind.rsand multi-queue contention narrows this dramatically.Following your suggestion, we ran three independent formal verifiers directly on the final post-
optimize()DXIL IR of all three hanging indirect pipelines (the packed-PS one and both unpacked-PS ones):dx.op.barrier(9)calls sit in half-divergent or lane-divergent control flow across all 58 / 62 / 96 barriers in the three shaders, and 0@xcl_xsstores hold lane-tainted values. On the smallest of the three (which also uses the unpacked PS, identical PS DXIL to two-pass), there are 0 lane-divergent wave ops anywhere in the entire shader and only 2agree_condsites (bothor(Any)onS_CBRANCH_EXECNZ).ipdom): every conditional branch that can skip or repeat any barrier is covered by the audited uniform set (affecting - guard == []on all three).4096loop caps,wave_i < 2,recordzeroing,nv/npepilogue loops) leaves a 100% DAG on all three (0 nested loops, 0 unbounded or irreducible cycles); allResourceProperties, shader flags, and 11 IO offsets match two-pass identically; all 55 / 59 / 93@xcl_xsstore–barrier–load exchanges pair cleanly.Since every barrier in the emitted DXIL is provably uniform, every loop is bounded, and 5–9 groups still hang alone on the GPU with valid root UAVs, this points directly at how the Blackwell
ms_6_6compiler/hardware executes our[numthreads(64, 1, 1)]virtual-warp shader (specifically 55–93dx.op.barrier(9)calls, including 4–8 barriers inside waterfall loops alongsideCreateHandleFromHeap(..., nonUniformIndex=true)).Two sharp local splits on the RTX 5090 would pin down the exact trigger in 1–2 runs before we change the PR:
ExecuteIndirect), temporarily routeplan.stats.intrinsic_loop_barriers > 0(and if neededneeds_barrier) to two-pass — and check whether any of the directDispatchMeshpipelines that held for 309 s even hadintrinsic_loop_barriers > 0orneeds_barrier == true.Partner::Spinwith a low cap) instead ofPartner::Barrier(just checking hang vs no-hang, ignoring picture): if that stops the hang,dx.op.barrier(9)inms_6_6is proven as the trigger; if it still hangs,dx.op.barrier(9)is innocent and the culprit is non-barrierms_6_6lowering (alloca,nonUniformIndex,atomicrmwlane init, or epilogue).Holding the PR branch steady at
e2a4128c6while we isolate which side fires — and also checking locally if we can construct a minimal syntheticms_6_6repro on our RTX 5070 Ti.Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T15:25:07Z.
@KDenKC Thanks for the quick correction and the careful multi-run comparison (our posts crossed by a few seconds).
Good to know
918dbd7dis cleared and affects 0 of the 560 recorded pairs. Knowing that directDispatchMeshalso shows wrong foreground positions / stretched ribbons (in 4/4 native runs, ribbons in 3/4, vs 0/10 two-pass runs) is a huge clue — especially the intermittent 3/4 behavior, which points either at a race / non-deterministic wave-order interaction (e.g.xcl_xwwarp-order assignment,Partner::Barrierexchange /xcl_countsmulti-waveGS_ALLOC_REQ, orCondAgree::Half0/ barrier-freePartner::Missing) or at the same Blackwellms_6_6virtual-warp lowering issue behind theExecuteIndirecthang.Once you narrow down which direct
DispatchMeshshader draws the dark foreground geometry, let us know and we will audit its post-optimize()DXIL side-by-side against two-pass (and test a minimal repro on our RTX 5070 Ti). One quick sanity check if you happen to re-run that scene:e2a4128c6movedflush_two_passahead ofnative_mesh_stageon directDispatchMeshtoo, so worth noting whether the direct-draw defect is identical one2a4128c6. Holding the PR head ate2a4128c6until both findings land, and we can pick up918dbd7don its own merits once we're ready to push the fix.Assisted-by: Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T17:17:25Z.
merge-check
base:
16c2fd082ahead:
e2a4128c61merge: clean
build: ok
tests: 3037 passed, 0 failed, 56 ignored; 28 skipped, the same as on main
review: 1 high, 5 medium (below)
performance: 60 s smoke run: 1683 → 1676 frames (99 % of main), peak commit 18505 → 17902 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 233 s there, 0 device removals, 0 crashes, 3.9 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: 1 blocking finding (critical or high, below)
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: The PR adds a direct-DXIL Wave64 ms_6_6 mesh translator with packed PS ISG1 / MS OSG1 signatures and wires it into DispatchMesh and sliced ExecuteIndirect behind XCL_NATIVE_MESH=1. Since
a44f86d3only bind.rs changed (+35/-28): the native paths now run only on Direct lists, deferred two-pass draws are flushed before the native stages are prepared, and native ExecuteIndirect no longer goes through fresh_indirect_arguments. These changes read correctly and the two nits from my last merge-check are fixed, but the PR still carries #3327's open draft commits, which blocks merging, and the RTX 5090 native ExecuteIndirect hang is not shown fixed.High
b9365b466,e1c7bf4ff,d10821a30) are still #3327's headd10821a30, and #3327 is still an open draft. Merging this PR would merge #3327's unreviewed draft work with it. Wait for #3327 to land and rebase, or take those commits out.Medium
a44f86d3KDenKC reproduced a hang (DRED device state 3, op 5 = ExecuteIndirect) under at least three native pipelines (0d75c92f, e8d47e79, e57924ee) 14-100 s into the world. A readback showed sane rewritten arguments ([5,1,1], max 1), and runs with native ExecuteIndirect routed to two-pass held for 309 s. This push changes the native ExecuteIndirect path to chase that hang (bind.rs ~3796-3854), but no test covers the change and there is no 5090 run ate2a4128cyet. The world-entry DispatchMesh fault traced to MEM_NULL_LOAD/STORE null views is fixed by42bd1090, now open as #3349 (5dc64ea7). That fix is not in this PR or in maina815de93, so XCL_NATIVE_MESH=1 still needs #3349. Add the 5090 result at this head (with #3349) and a visual check against two-pass.e2a4128cwith #3681's head61408de0still conflicts in crates/xcl/src/hle/d3d12x/bind.rs (sliced indirect mesh scratch). With #3339's head62d53267it conflicts in graphics.rs (both add the name-offset tiebreaker to sig_part), lower_gfx.rs and core_tests.rs. Agree which PR lands first and rebase the other; the sig_part tiebreaker should end up in one place.Checked and fine
e2a4128c. The tree differs froma44f86d3only in crates/xcl/src/hle/d3d12x/bind.rs;1ed29f44bhas the same tree asa1c56128e, with only its message rewrapped1ed29f44bande2a4128care now wrapped at about 72 columnsa44f86d3(no test lines changed); check_unplanned_barrier still returns Err in release buildse2a4128cmerges into current maina815de93without conflictsHow this was tested
16c2fd08, thencargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4.scripts/smoke.ps1: 60 s of a retail title on main16c2fd08and 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 Kalmarv on 2026-12-03T17:28:05Z.
@Foniass Thanks for the thorough
merge-checkone2a4128c6(and the 233 s in-world default-path check on RTX 5070 Ti). Every point tracks cleanly with our current state:#3327draft stack), #2 (PR size/split), #6 (#3681/#3339conflicts): Agreed — keeping#3327underneath while#3327is still an open draft. Once#3327lands (and as#3349/#3681/#3339land), we will rebase ontomainand split into stacked PRs (translator + tests → packed signatures → runtime wiring).ExecuteIndirecthang + directDispatchMeshvisual check): Confirmed — @KDenKC already testede2a4128c6(+#3349) above (#issuecomment-7381844429, hang still present with other queues idle) and separately reported a directDispatchMeshforeground geometry/ribbons regression (#issuecomment-7382583982). Holding the branch ate2a4128c6while those two bisects finish so our next push lands the real fix + tests rather than churn.OSG1mask pruning): @KDenKC cleared918dbd7din#issuecomment-7382583982; we will include the PS-mask component preservation fix + regression test on the next push.ExecuteIndirecthang and the directDispatchMeshgeometry defect are fixed, we will add an uncapped in-worldgpu_profile(NativeMesh/IndirectNativeMeshvs two-pass) comparison alongside the visual check.Assisted-by: Antigravity (Gemini 4 Neon)
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.