Files
metal2vulkan/docs
Anees Iqbal 5b451a6508 Hold a commit's refused recording of a write-resident ICB's records for the host step
A commit that recorded an execution from the CPU's records and found a record it refuses failed
there, though a route met after the commit may still write those records before the work runs:
another queue's command buffer that the work waits for through a shared event, encoded and
committed after this commit. Metal runs what that route wrote (the new probe
crates/metal2vulkan-conformance/probes/icb_cross_queue_writes.m, M3 Max, macOS 27.0.1, validation
off: `written` completes both command buffers with the kernel's green triangle; `unwritten`
completes too, drawing the CPU's mismatched-format command as garbage). Dying there where Metal
runs breaks the owner's rule 2.

Now, where the commit's recording of a render pass's executions, or of a compute execution, is
refused and the command buffer made one of the executed buffers resident for writing
(Residency::writable_indirect_command_buffers), the segment is held for its host step
(Prepared::held sets Segment::host), prepared as a step's: settled variants and made-ahead
pipelines, its footprint bound. The step waits for the work before it, records from the records
as they stand then, and fails the command buffer at that batch's submission only where they are
still refused. A refusal of another buffer's records, and every valid recording, keep the
commit-time path. Counted: WorkCounts::commit_refusals_held (api_signatures row).

The lane test write_routes::a_refused_command_another_queue_writes_again_runs_what_it_wrote runs
the probe's `written` shape: both command buffers complete, the centre is green, and the counter
moved once. docs/API.md states the held refusal.

Verified: clippy -D warnings, all features, plain and --cfg m2v_gpu, for the runtime and
validation crates; api_signatures/api_surface 15/15. The lane test is not run on a device yet.

(cherry picked from commit 83a1365119f1563ce45f97941a335ea119bc9efc)
2026-11-05 02:08:23 -08:00
..