The write routes marked a buffer at its command buffer's commit. An execution's segment is cut
into a part of its own, which waits for the work before it, as it is encoded
(`Segment::host`, from `gpu_written` then), so an execution encoded after the writer in the same
command buffer, in its encoder or a later one, was recorded with the writer's part and ran the
CPU's records: indirect_host_steps' commands_a_kernel_writes_run_after_it and 19 other lanes
drew nothing.
The routes now mark at the call that completes the pair: a write use where a state that may
encode, or an execution whose records may name one, was met in the command buffer; such a state
set, or such an execution encoded, where a write use was. An encoder opens with what its command
buffer's ended encoders met (`Routes::carried`), so a later encoder's execution is encoded as one
the GPU may write, as it was when a write use marked the buffer at its call. The commit still
decides again from what the records name then, and still leaves the followers.
The command buffer's routes held each buffer made resident for writing or executed until the
command buffer itself dropped, past its completion: a released buffer's range and resource ID
stayed taken (indirect_command_buffers' buffer_identifiers_follow_metal_s_encoders,
resource_ids' an_indirect_command_buffer_s_id_is_held_as_metal_holds_it). The commit now clears
them once it decided; what it leaves unmarked is held until completion, as before.
Docs: the gpu_written contract, write_routes.rs, docs/API.md and the runtime README say when.
Verified with the lane commit after this one (debug, --cfg m2v_gpu, this M3 Max on MoltenVK):
the 39 lane modules that execute indirect command buffers, 479 tests, all pass, where B alone
failed 35; the runtime's written_commands, degradation, degradation_catalogue and
degradation_sites unit tests pass; fmt; clippy -D warnings of the runtime and validation crates,
all targets and features, under --cfg m2v_gpu.
(cherry picked from commit e8e85c6936ecc731fa557440033ac9d3e40953e2)
(cherry picked from commit 106af168144e7a76fcc5366e39fec10a3693611c)
(cherry picked from commit 38605155f851abdf697c818c5387c1980af6a0bd)