Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3808"
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-02T01:05:51Z.
## Summary
Supports multi-wave compute threadgroups with a partial final wave (
threads > width && threads % width != 0) for both guest wave32 and wave64 in the native direct DXIL compute compiler (Part of #3224, #2935; listed under "No open PR" on #3224, 2 shaders / 9,070 dispatches).src/gfx1013_direct_compute.inl): pads the emitted DXIL[numthreads(host_threads, 1, 1)]to complete physical waves (ceil(threads / width) * width), ranks physical waves cleanly, reconstructs the original guest 1D/2D/3D thread coordinates, and computes per-wavevalid_exec_lo/valid_exec_himasks so padded tail lanes participate in barriers and wave64 half-exchange scratch without ever executing guest side effects or appearing active in ballots,v_readfirstlane_b32,lower_permlane, orlower_dpp(even after scalarEXECwrites).TG_SIZE_EN: allows converged multi-wave64 groups with partial final waves (including tails with <= 32 lanes wherevalid_exec_hi == 0), computes rounded-up guest wave count inTG_SIZE_EN, and keeps the runtime manifest on the original guest group shape.src/gfx1013_compute_native.cpp,src/gfx1013_direct_compute.inl): keeps single narrow wave64 (threads < 64), divergent barriers / divergent wave64 half-exchange on partial final waves,ds_append, DS lane permutations (ds_swizzle/ds_bpermute/ds_permute), and out-of-range or SGPRv_readlane_b32/v_writelane_b32selectors explicitly refused.Verification
Added source-built fixture suite
native_partial_final_wave_{ir,warp,hardware}(tests/native_partial_final_wave_check.py) covering 18 positive readback cases (48x1x1,70x1x1,10x5x1,5x5x2,80x1x1,96x1x1,100x1x1across ALU, masks/ballots,v_readlane/v_writelane, quad DPP, LDS+barrier, and wave64 half-exchange), a full-EXEC negative control catching unmasked tail count (32vs16), and refusal controls, plus updatednative_compute_implicit_lod_check.py(36x1x1positive,38x1x1refused).Tested on Windows 11 (
26200.9974), MSVC19.44, Ninja, Windows SDK10.0.26100.0, app-local WARP1.0.22, and NVIDIA GeForce RTX 5080 (driver32.0.16.2140; D3D12 debug layer unavailable on this host):dev):ctest --preset dev --no-tests=error -R '^(native_partial_final_wave_|native_compute_implicit_lod_|native_dpp_|native_permlane_)' -V— 13/13 passed (0 failed, 0 skipped).release):ctest --preset release --no-tests=error -R '^(native_partial_final_wave_|native_compute_implicit_lod_|native_dpp_|native_permlane_)' -V— 13/13 passed (0 failed, 0 skipped).git diff --check origin/main..HEAD: clean; zero new MSVC/W4warnings.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T01:56:19Z.
Please rebase this on the merged #3796 (
e0db3121). This head rewrites the sameTG_SIZE_ENexpression withguest_wave << 20, while current main encodes the wave ID in bits [11:6] and has a witness forTG_SIZE & 0xfc0. Please preserve that layout for both padded and full groups and includenative_compute_tg_sizealongside the partial-wave checks on the rebased head.Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-02T02:10:04Z.
@R0Y00 Rebased onto
main(3ecfbad7, including merged #3796e0db3121) asac3f1d5c:TG_SIZE[11:6](guest_wave << 6, bit 31 first-wave, rounded-up wave count) insrc/gfx1013_direct_compute.inlfor both padded and full groups.tests/native_partial_final_wave_check.py(70x1x1wave32 and80x1x1/96x1x1/100x1x1wave64entry_maskscases) anddocs/experiments/native-compute-partial-final-wave.mdto check the[11:6]encoding on padded partial waves as well.26200.9974), MSVC19.44(C++20 /#3794), app-local WARP1.0.22, and RTX 5080 (32.0.16.2140): 16/16 Debug and 16/16 Release passed (0 failed, 0 skipped), includingnative_compute_tg_size_{ir,warp,hardware},native_partial_final_wave_{ir,warp,hardware},native_compute_implicit_lod_*,native_dpp_*, andnative_permlane_*.AI-assisted.