Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3793"
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 R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-01T22:54:47Z.
Part of #2413, #3416.
Lowers lane-varying _readfirstlane_b32 sD, vS in the C++ direct mesh frontend (src/gfx1013_direct_mesh.inl) when EXEC is full and control flow is provably threadgroup-uniform, using a per-guest-wave groupshared lane-0 broadcast instead of WaveReadLaneFirst.
Summary
emember_scalar), never falsely group-uniform or carrying root-constant provenance.
Verification (source-built fixtures only)
Environment: Windows 11 (26200), MSVC 19.44, Ninja, Windows SDK 10.0.26100.0 DXC.
elease): ctest --preset release --no-tests=error -R 'native_direct_mesh|native_direct_container' -V — 2/2 passed (21.17 s).
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T02:09:37Z.
The DXIL controls cover the broadcast shape and convergence refusals. Please add a source-built GPU readback that reaches this barrier and checks distinct lane-0 values from at least two guest waves in one group, ideally on host wave32 and wave64. That would exercise both the slot indexing and barrier behavior on the actual mesh path.
Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T03:04:20Z.
@R0Y00 Rebased onto
origin/main(2b870868->ee96f6cc) and added a source-built multi-wave GPU readback fixture (tests/native_mesh_readfirstlane_check.py, registered intests/cmake/native_mesh_readfirstlane.cmakeand included in theprpreset).What the readback exercises
compile_dxil(gfx1013-raw-ms) for both guest wave64 (2 guest waves per group,mesh1 128 128 4 2 128 64) and guest wave32 (4 guest waves per group,mesh1 128 128 4 2 128 32), asserts the groupshared broadcast + barrier DXIL shape (assert_readfirstlane_broadcast), and renders a 32x32 target viaoffscreen_check --mesh-multi.v6 = flat_tid + 1and executesv_readfirstlane_b32 s18, v6, then exportss18throughPARAM0to a pixel shader that writesvalue / 255.0to the red channel.32..35(guest wave 0) and96..99(guest wave 1) for guest wave64, and16..19(guest wave 0) and48..51(guest wave 1) for guest wave32 — so every rendered vertex sits in a different host wave from its guest wave's lane 0 on narrower hosts (proving the groupshared barrier and slot indexing across host waves), while the guest wave32 case also separates two guest waves within lanes0..63on a host wave64 GPU.v6 = (flat_tid ^ wave_size) + 1) for both wave sizes, confirming 1024/1024 pixel mismatches against the original reference and 0/1024 mismatches against the swapped reference (65/1for wave64,33/1for wave32).Verification (Windows 11
26200.9974, MSVC19.44, SDK10.0.26100.0)Both Debug (
dev) and Release (release) passed 8/8 (native_direct_container,native_direct_mesh,mesh_multi_draw_{warp,hardware},native_mesh_readfirstlane_{warp,hardware},standin_exports_check,startup_stubs_ci_check; 37.07 s in Release, zero/W4warnings in changed files):1/65, swapped65/1)1/33, swapped33/1)10.0.26100.9818min=4, max=4(mesh_shader_tier=0xa)32.0.16.2140min=32, max=32(mesh_shader_tier=0xa)(Note: this host has WARP wave4 and RTX 5080 wave32 adapters, no native wave64 GPU; D3D12 debug layer unavailable on this Windows build.)
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T05:24:37Z.
Review: APPROVED
Thanks for adding the multi-wave readback. At
194abbb2on Windows 11 build 26300.9974,ctest --preset dev --no-tests=error -j 1 -R '^(native_mesh_readfirstlane|mesh_multi_draw)_(warp|hardware)$' --output-on-failurepassed 4/4. WARP (10.0.26100.9818, host wave4) and RTX 4060 Laptop (32.0.16.1656, host wave32) matched 1024 pixels for both guest wave sizes with the debug layer enabled. The swap control mismatched all 1024 original pixels and matched the swapped reference. Physical host wave64 coverage remains open.