indirect_commands: the plumbing only the deleted runtime drove goes
`bind::indirect_commands` kept entry points that the removed in-crate runtime used to execute
indirect command buffers. Nothing calls them now: not the runtime crate, not the command line,
not validation, conformance, harness, devtools or the translator, and not the consumer. Deleted,
each with its own tests, its re-export, its api_surface row, its api_signatures rows and its
docs/API.md sentence:
- `RecordField` (referenced by nothing at all);
- `records_address`, `RECORDS_ADDRESS_BASE`, `RECORDS_ID_LIMIT`, and the crate-private
`RECORDS_ADDRESS_SHIFT` that only `records_address` read;
- `written_flag_offset`, `WRITTEN_FLAG_BYTES`;
- `BufferBinding::resolve_buffer`, `RegisteredBuffer` (+ `new`), `ResolvedBuffer`, `AddressError`;
- `CommandRecord::resolve_bindings`, `ResolvedBindings`, `BindingError` (tests/inheritance.rs
tested only these and goes whole);
- `RenderDraws::PRIMITIVES` (its one user, a test, now spells the struct out);
- `RecordView::action`, `barrier`, `kernel_pipeline`, `buffer`, `writes`.
The fixed point inside the module adds `RecordError::Index`, which nothing constructs (its
Display arm alone named it; it was the error of `RecordField`'s indexed fields), and an empty
`impl CommandRecord {}`.
Kept, because a live path calls them inside the module (validation's `CommandBuffer::decode` and
`CommandDescriptor::validate_record`): `BufferStage::of` (descriptor.rs `validate_record`,
host.rs `decode`), `CommandDescriptor::holds` (`validate_record`), `validate_header` (`decode`),
and `RecordView` with the accessors `CommandRecord::decode` reads through `record_into`
(`pipeline`, `retained_pipeline`, `threadgroup_memory_length`, `stage_in_region`,
`imageblock_size`, `record`, `record_into`).
`Bindings::buffers` becomes private: only descriptor.rs and host.rs call it, and validation reads
a record's buffers through `buffers_mut` only. The build at the stack's tip answers whether
anything else used it (an error would mean a user). `BufferBinding`'s doc no longer links it.
Docs that named the deleted items or the deleted runtime say what is true now: the
`bind::indirect_commands` module docs (validation's case model and Metal executor use it),
host.rs's module docs, `BufferBinding::address`, `RecordError`, provenance.rs's
`object_handle_load`, and docs/API.md's indirect-command-buffer section.
Zeros, outside crates/metal2vulkan/src/indirect_commands* and the facade, at metal2vulkan
733b14ed24 and the consumer reims-vgpu d0a7c9614 (whose Cargo.toml pins metal2vulkan 0c9db49765):
- `git grep -nw <name> 733b14ed24 -- 'crates/*.rs' 'docs/*.md'` (the facade and
tests/api_surface.rs excluded, comment-only lines dropped): 0 for RecordField,
RECORDS_ADDRESS_BASE, RECORDS_ID_LIMIT, WRITTEN_FLAG_BYTES, resolve_buffer, RegisteredBuffer,
ResolvedBuffer, AddressError, resolve_bindings, ResolvedBindings, BindingError.
`records_address`: only other items of the name (metal2vulkan-air intrinsics/objects.rs:449, a
predicate; provenance.rs:3251-3267, a local and that predicate) and provenance.rs:1831's
comment, rewritten here. `written_flag_offset`: only docs/API.md:1352, rewritten here.
- `git grep -nF <path> 733b14ed24 -- 'crates/*.rs'` (same exclusions): 0 for
`RenderDraws::PRIMITIVES`, `RecordView`, `RecordError::Index`.
- Consumer: `git grep -nw <name> d0a7c9614 -- '*.rs'` is 0 for every name above;
`git grep -nE 'indirect_commands::' d0a7c9614 -- '*.rs'` is 0; `git grep -nE 'metal2vulkan::bind'
d0a7c9614 -- '*.rs'` names only rt_platform/argument.rs and rt_platform/function_table.rs.
Tables: `scripts/api-signatures/signatures.py --bless` removed 47 rows and added none;
`scripts/refusal-surface/refusal_surface.py` leaves docs/REFUSALS.md unchanged. Build, clippy
and suites run at the stack's tip.
This commit is contained in:
1 parent
ab24c9617f
commit
a1b955eec9
12 files changed
+34
-642
No files matched your search
+1
-6
@@ -1346,12 +1346,7 @@ as its replay variant (`VariantKey::replay_bindings`), whose vertex and fragment
|
||||
each command's buffers from slot tables in memory, and as its merged variant
|
||||
(`VariantKey::merged_draws`), whose vertex function finds its command in one merged draw by a
|
||||
prefix of the commands' first vertices and runs the command's vertex,
|
||||
instance and buffers, in the commands' order. A buffer's records start at
|
||||
`bind::indirect_commands::records_address` of its ID, outside every Metal address; records may
|
||||
run past later IDs' starts, and a resident set keeps each records range whole. Storage may hold a written flag per command,
|
||||
a `u32` a command past the records (`bind::indirect_commands::written_flag_offset`): a consumer
|
||||
whose own writes of the records set the flags may reset only the flagged records of a run of
|
||||
commands, clearing each flag with its record.
|
||||
instance and buffers, in the commands' order.
|
||||
|
||||
## 7. Caching
|
||||
|
||||
|
||||
Reference in new issue
Block a user