Files
metal2vulkan/crates
Anees Iqbal bf504a4a57 identity: test a ragged grid on the partial-threadgroups variant
The runtime lane dispatches a ragged dispatchThreads of a threadgroup-observing kernel as the
partial-threadgroups variant (LoweringInputs::partial_threadgroups). It runs ceil(grid / L)
threadgroups at the whole size L, with the pushed region flagged NONUNIFORM in region[1].w.
Under the identity domains that variant reads its region as every kernel now does, from
DispatchRegion with no MultiRegion constant. Nothing tested it there.

The new test, a_partial_threadgroups_variant_answers_the_edge_threadgroups_of_a_ragged_grid,
uses a generated kernel that stores its threadgroup's size at its position in a 7-wide grid.
Under the identity domains on lavapipe and moltenvk-m3, with L = (4, 2, 1) over a 7x5 grid in
2x3 threadgroups:
- it passes L3;
- on the CPU interpreter each thread stores its own threadgroup's size: 4 or 3 along x and 2 or 1
  along y, at the edges;
- the 13 invocations past the grid store nothing. A store past x = 6 would land on the next
  row's first word, and one past y = 4 past the 35 words.

Verified:
- m3-max-41249 (msi, check commit 5a049d99ad: this test file on step 3's tree, whose translator
  files equal cacac84273's): clippy -p metal2vulkan --all-targets --all-features, rustdoc
  -D warnings, and nextest of tests::engine_identity, 6 of 6 passed.
2026-11-17 08:30:35 -08:00
..