Skip to content

Shaders: a test of lane-mask loops at a triangle edge (ignored: defect) - #3571

Open
kilolimaVI wants to merge 1 commit into
Marvisak:mainfrom
kilolimaVI:tests/helper-lane-defect
Open

kilolimaVI wants to merge 1 commit into
Marvisak:mainfrom
kilolimaVI:tests/helper-lane-defect

Conversation

@kilolimaVI

Copy link
Copy Markdown

On the console, whole-quad mode puts a pixel program's helper lanes in EXEC, so a loop that serves one value per pass (s_ff1 of EXEC, v_readlane, v_cmpx) serves them too, and a DPP quad read of a helper's result gives its value. The host's ballots leave helper lanes out (before shader model 6.7's WaveOpsIncludeHelperLanes), so a helper is never served and its quad neighbour reads 0. lower.rs describes this; nothing measured it.

Test (emit/helper_lane_tests.rs)

lane_mask_loops_serve_helper_lanes_at_a_triangle_edge: a hand-assembled wave64 pixel program runs that loop over a per-pixel key, then reads the x neighbour's result with quad_perm:[1,0,3,2], drawn as a triangle whose edge crosses quads (16x16, 136 pixels), on the hardware adapter and WARP. Neighbour results wrong:

Radeon 780M (RDNA3) WARP
main 63bcca4 8 18
#2373 at 58f0be9 (validation made non-fatal) 0 0

It is #[ignore = "defect: ..."], as semantics_tests marks an open defect, so CI is unaffected; run it with --ignored. Whichever fix lands (#2373 or another) can drop the ignore.

Only this new file and its mod line; no change in behaviour. cargo clippy -p victory-shader --all-targets [--all-features] -- -D warnings clean.

AI-assisted (Claude).

On the console, whole-quad mode puts a pixel program's helper lanes in
EXEC, so a loop that serves one value per pass (s_ff1 of EXEC,
v_readlane, v_cmpx) serves them too, and a quad read of a helper's result
gives its value. The host's ballots leave helper lanes out (before shader
model 6.7's WaveOpsIncludeHelperLanes), so a helper is never served.

helper_lane_tests draws such a loop over a triangle whose edge crosses
quads (16x16, 136 pixels) and reads each pixel's x neighbour with DPP
quad_perm. On main a neighbour reads 0 for 8 pixels on a Radeon 780M
(RDNA3) and 18 on WARP; with Marvisak#2373's wave operations over helper lanes
(validation made non-fatal) 0 on both. Ignored as a defect, as
semantics_tests does for an open one, until a fix lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oddmaniv

Copy link
Copy Markdown

Independent verification of the PR author's shader-package parser tests at 74ff14bb134ed017da3b01052c107bb8e0683ac8.

cargo test --locked -p victory-game --lib shaderpack::tests -- --nocapture

Tree Result
Unmodified PR head 3 passed, 0 failed, 0 ignored; native exit 0
Unmodified main 3 passed, 0 failed, 0 ignored; native exit 0
PR patch applied to pinned main 3 passed, 0 failed, 0 ignored; native exit 0

Main baseline pin: 63bcca43c6a00a758510398fa43096ce7e4f7df0.

Windows x86_64 MSVC native runs. Local and remote source snapshots matched before and after each check. The adaptation applies the PR diff without additional source edits.
This is focused regression coverage, not the full workspace suite, a gameplay test, or an independent validation of every behavior in the PR. No new fix is claimed.

AI-assisted verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants