shader: cover wave64 and wave32 #1132
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1132
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1132/head"
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?
@lambirou on GitHub · 2026-11-24 01:37 UTC · original
lambirou:shader/wave64-coverage→main· +284 −0 · 6 files · 2 commits · merged 2026-11-24 02:25 UTCChange
Add a source-built wave-width fixture with native, wave32 and wave64 variants.
tests/shader_wave.hlslrecordsWaveGetLaneIndex,WaveGetLaneCount,WaveReadLaneFirst,WaveActiveSum,WaveActiveBallot,WaveActiveAllTrue,WaveActiveMin/MaxandWaveActiveCountBits.ballot bits, min/max, sums and guard words.
cs_6_6with[WaveSize(32)]and[WaveSize(64)]; DXC-dumpbinconfirms the recorded WaveSize. Tests are registered for WARP and hardware.Verification
cmake --build --preset dev --target offscreen_checkpassed.ctest --preset dev --no-tests=error -R '^(wave|bvh_wave64|shader_wave)' -Vshader_wave_warppasses;shader_wave32_warp,shader_wave64_warp, the three hardware variants and the existingwave_shuffle/bvh_wave64cases skip 77 with named reasons.wave64_emulate_hardwaretest fails only because the sandbox exposes noadapter and that main test has no
SKIP_RETURN_CODE; this PR does not change it. Its WARPcase passes.
Windows 11 26H2 build 26300, debug layer unavailable, native lane range 32..64, native width 64.
shader_wave_hardwarepassed native 64 (sum_ones=64, ballotffffffff/ffffffff/00000000/00000000,sum_lanes=2016).shader_wave32_hardwarepassed native 64 then forced 32 (sum_ones=32, ballotffffffff/00000000/00000000/00000000,sum_lanes=496).shader_wave64_hardwarepassed native 64 then forced 64.Native
shader_wave_warppassed width 4 (sum_ones=4, ballot0000000f/00000000/00000000/00000000,sum_lanes=6). Wave32 and wave64 WARP variantsskip 77 with named reasons because the adapter cannot force 32/64 lanes. No width is fabricated.
hardware results above are from the interactive run at the same commit content.
docs_links_check.py:Self-test passed.,Checked 15 Markdown files and 253 links..git diff --check origin/main...HEAD: clean.Evidence and follow-up
shader/wave64-coverage, head1f172a06(maintainer merge of main), based onedee8d07. The merge keeps both the existingwave64_emulateblock and the newshader_waveblock.wave_shuffleand BVH wave64 tests remain green on hardware; WARP keeps itsdocumented skips.
layer is unavailable on both adapters, so no debug error count is claimed.
docs/experiments.mdrecords the fixture, widths, CTests and skip reasons.used.
Checklist
@lambirou on GitHub · 2026-11-24 01:53 UTC · original
Rebased onto
edee8d07and kept both the existing wave64_emulate block and the new shader_wave block. The six XCL-17 cases behave as documented; the pre-existing wave64_emulate_hardware fails only in the no-adapter sandbox because that main test has no SKIP_RETURN_CODE, unchanged by this PR. WARP shader_wave passes at width 4; hardware 64/32/64 results are from the interactive run.@lambirou on GitHub · 2026-11-24 01:54 UTC · original
Adopted
1f172a06. The maintainer merge keeps main plus both wave64_emulate and shader_wave blocks; the local branch is reset to that head. No force push.@Toons29 on GitHub · 2026-11-24 02:04 UTC · original
Tested
1f172a06on an AMD Radeon RX 9070 (RDNA 4,1002:7550), driver32.0.32029.2010, Windows 11 build 26300,devpreset, debug layer unavailable: pass12 tests, now including
wave64_emulate_from main: 8 pass and 4 skip, with no failures. The adapter reportsnative_lane_range=32..64and runs at native width 64.shader_wave_hardwaresum_ones=64, ballotffffffff/ffffffff/00000000/00000000,sum_lanes=2016,mismatches=0shader_wave32_hardwarewaves=2 sum_ones=32, ballotffffffff/00000000/00000000/00000000,sum_lanes=496,mismatches=0shader_wave64_hardwaremismatches=0wave_shuffle_hardwarebvh_wave64_hardwarenative_wave_width=64,mismatches=0wave64_emulate_hardwarewrong=0shader_wave_warp,wave64_emulate_warpshader_wave32_warp,shader_wave64_warp,wave_shuffle_warp,bvh_wave64_warp10.0.26100.9818, width 4)I first ran it at
2f580b01, before the main merge, and the wave readbacks are the same at both commits.@tedin7 on GitHub · 2026-11-24 01:58 UTC · original · reviewed
Reviewed commit
1f172a06816809582f2e68eebcaf7fc446ac6b52on Linux x86_64 (Python 3.14.8; Windows MSVC/DXC/WARP/hardware execution relies on CI).Checks run:
python3 -B tests/gpu_report_format_check.py-> 10/10 OKDiff notes:
tests/shader_wave.hlsl+tests/shader_wave.cpp: clean wave-width-agnostic validation (lane uniqueness,WaveActiveSum,WaveActiveBallot,WaveActiveAllTrue,WaveActiveMin/Max,WaveReadLaneFirst,WaveActiveCountBits, and guard words) with no hardcoded wave32/wave64 assumptions.CMakeLists.txt+tests/offscreen_check.cpp:kGateShaderWave,kGateShaderWave32, andkGateShaderWave64properly gate SM 6.0 / SM 6.6 +WaveOps+ forced lane range withSKIP_RETURN_CODE 77, anddocs/experiments.mddocuments the measured hardware/WARP runs.