Shader tests: WARP 1.0.22 Wave32 lane permutation returns seven incorrect lanes #2949
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#2949
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?
@steven-seagull27 on GitHub · 2026-11-26 01:21 UTC · original
On
mainat63bcca43c6a00a758510398fa43096ce7e4f7df0, the stockds_bpermute_b32test dispatches successfully on Microsoft Direct3D WARP 1.0.22 and returns seven incorrect Wave32 lanes. An independent DXC-compiled HLSL shader using a dynamicWaveReadLaneAtreturns the same seven incorrect values. I reproduced this while following up on the request in #1752.Reproduction in VIctory. Build the stock shader library tests with
cargo test --locked -p victory-shader --lib --no-run. From a separate directory containing the resulting test executable and the x64d3d10warp.dllfrom the Microsoft.Direct3D.WARP 1.0.22 NuGet package, run the executable with these arguments:In the default system environment the stock test passed, including an explicit skip for built-in WARP. With app-local WARP the same test binary failed its
warpassertion. An adapter-isolated diagnostic confirmed the DLL was loaded from the executable directory and captured all 32 words.Native control. The relevant shader from a separate run, compiled with Windows SDK DXC 1.9.2602.17 (
-T cs_6_6 -E main -O3), is below. Dispatch one group with a raw UAV of 32 dwords at heap index 2. All 32 lanes reach the wave intrinsic and every named source belongs to the wave. The selects implement the guest EXEC rule after the read.A control using 32 unrolled fixed-source reads followed by selection returned 32/32 on both the RTX and WARP 1.0.22. The native reproduction isolates the discrepancy from VIctory’s guest-shader decoder. The existing test correctly keeps its assertion when WARP supports the requested width. The separate short-wave case is covered by #1858.
AI-assisted with Codex. Synthetic shaders only.
@Marvisak on GitHub · 2026-11-26 03:45 UTC · original · edited 2026-11-26 06:49 UTC
Automated triage for the maintainers.
The native HLSL control (DXC-compiled
WaveReadLaneAtwith a varying source) returns the same seven wrong lanes, so this reads as a defect in WARP 1.0.22 rather than in VIctory's translation ofds_bpermute_b32. Onmainthe testpermutes_read_the_lane_named_and_zero_from_lanes_left_out(crates/victory-shader/src/emit/synthetic_tests.rs) runs awarparm whenever the WARP device accepts a 32-lane pipeline; the built-in WARP refuses it and the arm is skipped.Open PR #2997 works around it by reading within four-lane groups on a software adapter only, with separate shader-cache keys for software and hardware DXIL. New since the last triage: the WARP 1.0.22 run that was missing has been done on #2997's head: the original case goes from 7/32 wrong lanes to 0/32, and five dispatches including wave64 and partial-EXEC cases from 82/224 to 0/224 in three fresh processes, with an RTX 5080 matching on both builds (details on #2997). Whether to carry a WARP-only workaround or to skip the
warparm on that WARP version is the maintainers' call in review.Generated by Claude Code
@steven-seagull27 on GitHub · 2026-11-26 03:49 UTC · original
The requested WARP 1.0.22 check is complete. On the exact #2997 head the original case went from 7/32 wrong to 0/32. Across five dispatches including the Wave64 and partial-EXEC cases, it went from 82/224 wrong to 0/224 in each of three fresh processes. RTX 5080 matched all 96 Wave32 values on both builds. Windows’ built-in WARP skipped both widths. Results by case and adapter