bvh_wave64_warp: WARP 1.0.22 misroutes non-uniform WaveReadLaneAt reads across lane blocks at forced widths above 8 #145
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#145
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@rasptum on GitHub · 2026-11-21 17:07 UTC · original
Reproduction
Windows 10 22H2 (19045.6466), build with the app-local Agility SDK 1.620.2 and WARP 1.0.22 (setup in #147):
Expected and observed behavior
With WARP 1.0.22 the forced wave64 check can run for the first time (SM 6.8, lanes 4 to 128), and it fails at field 25:
Field 25 is
WaveReadLaneAt(v, (nativeLane*7+3) % width)intests/bvh_reads_waves.hlsl(line 103), with all 64 lanes active. Each query value is0xf0000001 ^ (i*0x319db), so every result can be decoded back to the lane it came from. I dumped fields 8 and 25 for groups 0 and 1 with a temporary local print (not committed):7m+3 ≡ n (mod 64). That is the inverse of the requested permutation, not the permutation itself. Group 1's reversed lane order gives the same result.fromin the scan loop), the native mirror (field 30,63-n) and every other field pass.7n+3 ≡ 3-n (mod 8)is its own inverse, sobvh_waves_warpcannot show this. The RTX 3060 (32 lanes) passes the non-forced check.The current
WaveReadLaneAtdocumentation describes a non-uniform index as a shuffle and lists only inactive and helper lanes as undefined, so the fixture's expectation looks valid. I have not checked the normative DXIL spec, and I have not run WARP at a forced width of 16 or 32 to see whether the inversion depends on wave64.Open questions: is this a WARP 1.0.22 defect worth reporting to Microsoft, and should
bvh_wave64_warprecord it as a known WARP result rather than a failure in this opt-in configuration?Environment
D3D12Core.dll1.620.2.0.20261106.5), WARP 1.0.22 (d3d10warp.dll1.0.22.0.20261027.1), both Microsoft-signed NuGet packagesAI-assisted (Claude Code); run locally on the configuration above.
@R0Y00 on GitHub · 2026-11-21 17:18 UTC · original
Thanks for recording the shader, permutation and exact WARP/runtime versions. Keep the mismatch visible. Please add a minimal source-built shuffle and the forced-width 16/32 results where supported before attributing this to WARP or changing the expectation.
@rasptum on GitHub · 2026-11-21 17:33 UTC · original
Minimal source-built shuffle and forced widths, as requested: #151 adds
wave_shuffle_{warp,hardware}. One 64-thread group, and each thread stores its native lane, the width, a wave id and the group thread whose value came back fromWaveReadLaneAt(t, (lane*7+3) % width). Two controls run in the same dispatch: a self-inverse mirror (width-1-lane) and a broadcast (3 % width). Each shuffle result is classified as correct, exact inverse, or other.inverse_distinctsays whether the width can tell the two apart.Windows 10 22H2, Agility SDK 1.620.2, built from #151 with #147 applied locally for the app-local WARP:
inverse_distinct=noMirror and broadcast controls: 0 errors on every row.
[WaveSize]is not the trigger by itself. The RTX 3060 runs the same forced-32 shader correctly.A separate observation from building this: the Windows 10 in-box WARP (10.0.19041) removes the device (
0x887a0005) for anyWaveReadLaneAtwhose lane index is not a literal. I bisected it with local variants:3, a literal, passes.3 % width,width-1,lane ^ 1,WaveReadLaneFirst(lane)+3and(7*lane+3) & 3all remove the device. So the native variant iscs_6_5, likebvh_reads_waves, and skips there.AI-assisted (Claude Code); run locally on the configuration above.
@rasptum on GitHub · 2026-11-21 18:01 UTC · original
Independent confirmation from @Joacoorandom's stress fixture in #155 (now closed). It uses a different shader, nine groups of per-lane values and its own CPU oracle. I ran it on Windows as submitted (
e0eb2bb), since the PR notes Windows and GPU behavior were not yet measured. Windows 10 22H2, Agility SDK 1.620.2, debug layer enabled (Graphics Tools now installed):debug_errors=0 debug_warnings=0on every run. The first mismatch isthread=0 field=5 expected=f00c676dat each forced width. The extra mismatches beyond 576 come from the other non-self-inverse routes the fixture covers. In-box WARP 10.0.19041 skips the default probe at its SM 6.5 gate instead of removing the device. With #151, two independent fixtures now give the same width pattern on WARP 1.0.22.AI-assisted (Claude Code); run locally on the configuration above.
@MarlomMedeiros on GitHub · 2026-11-21 18:02 UTC · original
Second configuration, same pattern. Windows 11 build 26300, RTX 5070
(driver 32.0.16.2135), Agility SDK 1.620.2 with app-local WARP 1.0.22
(Microsoft.Direct3D.D3D12 and Microsoft.Direct3D.WARP NuGet packages),
local build of the app-local branch from #147 merged with main at
ccfa703. Debug layer enabled, zero errors, mirror and broadcastcontrols clean everywhere.
The inversion reproduces identically on a different OS and a different
host adapter, so it looks like a WARP 1.0.22 property rather than
something OS- or driver-adjacent (expected for a software rasterizer,
now measured). Two environment notes: the in-box WARP on this Windows
11 build is 10.0.26100.10068 and only reports a 4..4 lane range, so
forced widths all skip; and under the Agility runtime both runs print
the CheckFeatureSupport1 supersession notice twice, counted as
informational warnings.
@lambirou on GitHub · 2026-11-21 18:20 UTC · original
I ran the merged #151 fixture on an AMD Radeon RX 9060 XT as a hardware comparison for the WARP result. The physical GPU passed at native wave64 and at forced wave32 and wave64.
1e394fe61f70caf7a7c6a2283166c1c90dea8fe7, Release build26300.10075, with in-box D3D1232.0.32029.2010, lane range32..64, Shader Model 6.619.44.35228, DXC from Windows SDK10.0.26100, D3D12 debug layer unavailableForced wave16 was skipped because it falls outside the adapter's lane range. In-box WARP
10.0.26100.10068reported only wave4, where the test permutation is self-inverse. CTest skipped that case after the native check. The app-local WARP 1.0.22 was outside the scope of this run.After building the
offscreen_checktarget, I ran:AI-assisted report based on a local test run.
@rasptum on GitHub · 2026-11-21 19:55 UTC · original
A correction to my own description. The wrong reads are not the inverse permutation in general. That was a coincidence of
7n+3.I replaced the shuffle index with eight different expressions and dumped the source lane of every read on WARP 1.0.22 at widths 8, 16, 32 and 64 (Windows 10 22H2, Agility SDK 1.620.2, debug layer on, 0 errors).
(lane*7+3) % width(lane+1) % width(lane*5+2) % width(lane*3) % width(lane*lane+3) % widthlane / 2,lane & ~1,lane ^ 9Native width 8 is correct for every expression (
lane ^ 9is out of range there and is excluded). The RTX 3060 is correct for every expression at width 32.One rule matches all 952 defined lane reads. I derived it from four expressions and ran the other four as predictions:
lin blockbrequests indexi. The position inside the source block,i % 8, is right.i % 8of the reader's own block.So a read is correct whenever every lane of a block requests the same source block. That covers uniform reads, the mirror and a single-block wave, and it explains why the controls pass.
#272 adds a rotation read to
wave_shuffleand classifies wrong reads against this rule instead of the inverse. The test still fails on WARP 1.0.22. If this description is acceptable, I will retitle this issue to match.AI-assisted (Claude Code). The Windows results were measured locally; the rule is inferred from readbacks, not from WARP's code.
@R0Y00 on GitHub · 2026-11-21 20:27 UTC · original
Yes, please update the title to describe the observed cross-block lane misrouting on WARP 1.0.22. The rotation control from #272 is now on main and distinguishes it from an inverse permutation. Please keep the proposed block-selection rule identified as an inference from readbacks. A rerun on a different WARP version with the adapter version, wave width and
block_misrouted/othercounts would help narrow the affected versions.@rasptum on GitHub · 2026-11-21 21:02 UTC · original
Rerun of
wave_shuffleon other WARP versions, as requested. Ten versions of the officialMicrosoft.Direct3D.WARPNuGet package, each placed app-local beside the executable withOFFSCREEN_WARP_DIR. Thedriver=line of every run matched the intended package.c832696(main)D3D12Core.dll1.620.2.0), debug layer enabled,debug_errors=0 debug_warnings=0on every run that reached the forced variantsoffscreen_check.exe warp --wave-shuffleCells are
correct / block_misrouted / otherout of 64 threads, affine first, then rotation. "ctl" iscontrol_errorsfor native, forced 16, forced 32, forced 64.driver=)native_lane_rangeblockshader_model_capped_at_6_6=0x66shader_model_capped_at_6_6=0x66shader_model_capped_at_6_6=0x66shader_model_capped_at_6_6=0x66shader_model_capped_at_6_6=0x66shader_model_capped_at_6_6=0x66shader_model_capped_at_6_6=0x66shader_model_capped_at_6_6=0x66shader_model_capped_at_6_6=0x66shader_model_capped_at_6_6=0x66What this measured:
other=0everywhere: every wrong read is one the fixture's block model predicts, and the mirror and broadcast controls stay at 0 errors.native_lane_range=4..4, so the forced variants skip and the run exits 77. It is a capability skip, not a pass. 1.0.10 to 1.0.12 were not tested, so I do not know which version first accepted a forced width.The block-selection rule is still an inference from the readbacks. It predicts every value read back here, at two different block sizes, but I have not looked at WARP's code and cannot say that this is how WARP implements the read.
Not tested: 1.0.14.x, 1.0.16, 1.0.18, the 1.0.19 and 1.0.20 previews, 1.65535.20-preview, anything before 1.0.9, and the in-box WARP of newer Windows builds. The in-box WARP here (10.0.19041) is Shader Model 6.2 and skips the fixture.
AI-assisted (Claude Code). The Windows results were measured locally.
@triggered02 on GitHub · 2026-11-23 21:31 UTC · original
Reproducing the forced-width
WaveReadLaneAtlane-block check on this machine's WARP to see whether the WARP 1.0.22 misroute persists. Environment: in-box WARP (Microsoft Basic Render Driver 10.0.26100.9818) and NVIDIA GeForce GTX 1660 SUPER (driver 32.0.16.1074), Windows 11 build 26200,main@abdb8fb,devpreset. Running the existingbvh_wave64_{hardware,warp}andwave_shuffle_{hardware,warp}entries and the forced-width control if the built binary exposes it; will report observed vs expected lane reads.@triggered02 on GitHub · 2026-11-23 21:33 UTC · original
Checked whether this reproduces on the in-box WARP rather than app-local WARP 1.0.22.
Environment: Xbox2Windows @
1ccc326, Windows 11 Pro build 26200, in-box WARP 10.0.26100.9818 (Microsoft Basic Render Driver), NVIDIA GTX 1660 SUPER (driver 32.0.16.1074), existing dev build, no Agility SDK / app-local WARP, debug layer unavailable.Results (
ctest --preset dev -R '^bvh_wave64_(hardware|warp)$|^wave_shuffle_(hardware|warp)$' -V):bvh_wave64_warp: skip (77) — in-box WARP reportsnative_lane_range=4..4(SM 6.6 available), so the 64-lane fixture cannot run.wave_shuffle_warp: skip (77) — native width 4 passes cleanly (affine 64/64, rotation 64/64,block_misrouted=0,control_errors=0); forced widths 16/32/64 all skipped because the adapter advertises only 4 lanes.bvh_wave64_hardware: skip (77) — GTX 1660 SUPER reports 32..32 lanes.wave_shuffle_hardware: pass — native 32 and forced[WaveSize(32)]both 64/64 correct for affine and rotation,block_misrouted=0,control_errors=0; forced 16/64 skipped on capability.Conclusion: the lane-block misroute does not reproduce on in-box WARP 10.0.26100.9818 — the forced-width scenario is unreachable there (4-lane range), and native-width reads are all correct. The failure stays specific to app-local WARP 1.0.22 with the Agility SDK, which advertises 4..128 lanes. No runtime override exists in the fixture to force the in-box WARP above its reported range, so this is a capability skip, not a positive correctness proof at widths > 8 for the in-box build.
@triggered02 on GitHub · 2026-11-23 21:34 UTC · original
Recorded in #1020 (one paragraph after the open-question paragraph in docs/experiments.md).
@triggered02 on GitHub · 2026-11-26 03:32 UTC · original
Closing this as an external WARP defect that is already recorded, rather than an open item on our side. Evidence accumulated on the issue:
ative_lane_range=4..4, so the 64-lane fixture cannot run and the test correctly skips with 77 (vh_wave64_warp and wave_shuffle_warp). Nothing to compare on this host.
So there is no project change that fixes it: the failure is inside a specific WARP build's forced-width lane routing, and the harness behaves correctly on both WARP versions (skip where the width is unavailable, fail where the defect is present). Closing as external/recorded. If a later WARP or Agility SDK still reproduces it, reopen with the adapter string, WARP version and the same ctest -R '^bvh_wave64_warp$' -V line and it becomes actionable again.