Repository navigation
Conversation
DPP8, DPP16 row patterns and ds_swizzle_b32 bit-mask swizzles that stay within aligned runs of up to 16 lanes no longer stop mesh programs with "a cross-lane operation in a mesh shader". Mesh threads that use them are numbered by their host lane (as compute's console lanes are), so a run of console lanes is a run of host lanes on any host wave of 16 lanes or more, and each lane reads its source through waveReadLaneAt. AI-assisted.
|
Tested this head (72b8fa5) together with #2245 (2e26c46), from 940d32f. They conflict in the mesh emitter and test builders. Keeping both emitter fields and initializers, plus the two builders as separate helpers, let both sets of tests run. For the interaction test I extended Full combined |
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC, with dxil.dll validator):
cargo test -p victory-shader --lib mesh— 7 passed, 0 failed on both RTX 5090 hardware andVICTORY_D3D12_WARP=1cargo clippy -p victory-shader --all-targets— 0 warningscargo xtask policy— ok (183 files ok)
Clean lowering of mesh lane permutations within 8- and 16-lane runs, verified end-to-end on hardware and WARP. Looks great.
AI-assisted (Gemini 4 Neon).
catminou4
left a comment
There was a problem hiding this comment.
Tested locally: merged into main 940d32f, cargo test -p victory-shader --locked on macOS arm64 — 145 passed, 0 failed, 2 ignored (Windows-gated hardware execution tests not run here). Approving — mesh lane permutations within runs of 8/16, +1 test.
Offline measurement on a retail dumpResult: no count change against I merged head 72b8fa5 onto No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
|
Automated triage for the maintainers. Needs work. The change lets mesh programs use DPP8/DPP16 row patterns and bit-mask Generated by Claude Code |
|
Thanks for the triage, that's a fair call. I don't have a shader corpus to produce the before/after refusal counts, and from what I could see the game's mesh programs are wave64 and use cross-lane patterns outside these ≤16-lane runs, so this change wouldn't unlock any of them as-is. Extending it to the patterns actually used isn't something I can validate without the corpus, so I'm closing this rather than leaving it open. Happy to pick it back up if someone with the corpus finds a case it helps. |
Mesh programs using DPP8, DPP16 row patterns or
ds_swizzle_b32bit-mask swizzles beyond quads currently stop witha cross-lane operation in a mesh shader(seen in #293, #769, #778).Change
lane_blockgives the aligned run a permutation reads within: quad (4), DPP8 androw_half_mirror(8), row shifts /row_ror/row_mirror/row_share/row_xmask(16), bit-mask swizzles by the bits they touch.waveReadLaneFirstof the flat id rounded down toWaveGetLaneCount, plus the lane index), the same bijectionthread_iduses for compute's console lanes. A run of console lanes is then a run of host lanes, and each lane reads its source withwaveReadLaneAtinside its run.MESH_BLOCK); wider ones are still refused, since the translation does not know the host's wave size and the shader cache does not key on it. Mesh programs without such permutations are unchanged.Tests
mesh_permutes_in_runs_of_16_lanes_translate: six permutations (DPP8 reversed, row_mirror, row_half_mirror, row_xmask:9, row_ror:3, swizzle SWAP 8) translate and pass dxil.dll; SWAP 16 is still refused.mesh_permutes_read_the_console_lanes: a 64-thread mesh draw where each lane culls its triangle when it read the expected lane; nothing must be lit, and a control comparing with the lane's own index must light all 256 texels. Skipped on devices with waves under 16 lanes.RTX 4070 (driver 621.01, Windows 11), on 940d32f:
hardware: mesh permutes read the console lanes (waves of 32-32 lanes); WARP skipped (waves of 4 lanes).cargo test -p victory-shader --locked: 246 passed, 3 failed, vs 244 passed, 3 failed on 940d32f. The same 3 known NVIDIA failures on both (two stride_tests, gathers_at_a_level); +2 are the new tests.AI-assisted.