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)
This commit is contained in:
1 parent
8a407884d0
commit
5b451a6508
9 files changed
+360
-19
No files matched your search
+6
-1
@@ -3895,7 +3895,12 @@ each item named states the rule in full.
|
||||
- **A render execution records its pass at commit**, from the records as they stand then, as
|
||||
Metal's does.
|
||||
- **A command's refusal is one typed error wherever it is recorded**: the CPU's records are checked
|
||||
as `commit` records them, and `commit` returns what a command refuses.
|
||||
as `commit` records them, and `commit` returns what a command refuses; but for a buffer the
|
||||
command buffer made resident for writing, as a route met after the commit may still write the
|
||||
records before they run (another queue's command buffer the work waits for through an event,
|
||||
whose writes Metal runs), the host step records them once the work before it completed, and the
|
||||
command buffer fails at that batch's submission only where they are still refused
|
||||
(`WorkCounts::commit_refusals_held`).
|
||||
- **A render execution's range read from a buffer is read before its pass**
|
||||
(`execute_commands_in_buffer_indirect`).
|
||||
- **An indirect command's buffer outside the resident resources misses**: its Metal address
|
||||
|
||||
Reference in new issue
Block a user