A dispatch whose region's own key is still being made takes the key's
residual form at once (dispatch_making.rs, begin_region_pipeline). compute.rs
then kept the pipelines it recorded in its encoder's memo entry
(DispatchMemo::made) whatever they were; only Planned::made checked that
they were the keys' own. A later dispatch of the same inputs takes the
memo's pipelines first, so it stayed on the residual form after the own
key's making landed, for the rest of the command buffer (the memo goes on
with the live state to the command buffer's next compute encoders).
The own-form check (Variant::made_as for each region) now gates both: the
memo entry and the plan keep the pipelines only where every region took
its own key's. A dispatch that took a residual form keeps nothing, so the
next dispatch of its inputs asks its regions' pipelines again, takes the
residual form again (counted) while the making runs, and its own key's
once made.
Cost: the check is one look in the variant's pipeline memo a region, on
the path that asks the pipelines (no pipelines kept for the dispatch). It
used to be skipped there where the plan already held pipelines (another
grid of its class); the memo-hit path and the plan's path look at nothing,
as before. While a making runs, a repeated dispatch of the same inputs
asks begin_region_pipeline again instead of taking the memo's pipelines.
Docs: DispatchMemo::made, and render/residual.rs's dispatch sentence.
Test: tests::residual_memo (lavapipe, view facts fixed to
PushReadsLengthenThreadPayload) fails without this change (the second
dispatch binds no pipeline) and passes with it.
Test: tests::residual_memo (lavapipe, --cfg m2v_cpu_icd): with the pipeline pool held, a dispatch
whose key differs from its residual form takes the residual form; once the pool lets go and the
dispatch's own pipeline is made, a second dispatch of the same inputs in the same encoder takes
the first one's memo entry and must bind its own key's pipeline (cmd_bind_pipeline +1,
residual_form_draws +0).
Verified (photokernel lane, tip 6f606837ad on 64921c846a): m3-max-39676 (msi, lavapipe): the test
alone at 87089d16a4 (without the fix) FAILS at the second dispatch, (0, 0) against (0, 1); at the
fix, residual_memo, uniform_bind_offsets, set_zero_at_offsets, general_form, kept_across_calls,
unit_axes and every compute test 70/70; clippy -D warnings plain, m2v_gpu and m2v_cpu_icd 0 for
metal2vulkan-runtime and metal2vulkan; rustdoc 0. No new Degradation kind, WorkCounts field or
public signature.