`crates/reims-vgpu/src/runtime/metal_draw/` -> `runtime/draw/`. Tier-A motion
plus one test-fixture fix the motion made necessary; no product behaviour
changes.
WHY THE NAME WAS WRONG, MEASURED
The module is 20,894 lines. Its gated Vulkan half, `vulkan.rs`, is 8,471 of
them -- the largest file in the tree by a wide margin, and larger than the
Metal-side `metal_icb.rs` (987) and `depth_stencil.rs` (255) put together by a
factor of seven. The three backend-independent halves -- `texture_view.rs`
(991), `render_target.rs` (1,144) and `mod.rs`'s own bind materialization --
carry no gate at all and run on both arms on every draw. A reader arriving at
`metal_draw` to find the Vulkan draw path had no reason to look here, which is
the whole cost of a name that lies.
The module doc lied in the same direction and is rewritten: it opened "Attempt
Metal draw encode" and described only the Metal encode call. It now names both
encode calls, states the composition above, and says which submodules really
are Metal-side.
WHAT WAS *NOT* RENAMED, DELIBERATELY
The fail-log event names emitted from this module (`metal_draw MissingPipeline`,
`metal_draw mrt_request fail`, `metal_draw writeback fail`,
`metal_draw guest_attachment_fallback_seed`, the `metal_draw_*` decline slugs)
and the counters that count them (`metal_draws_ok`, `metal_draws_fail`) keep
their spelling. They are operator-facing vocabulary that appears in readings
already recorded in this tree's module docs and journals; respelling them would
silently invalidate every one of those without changing anything a reader of
the source needs. The module path and the log vocabulary are two different
names and only one of them was wrong. That reasoning is written into the module
doc so the next reader does not "finish the job".
Consequently the rename was done as four targeted substitutions
(`metal_draw::`, `metal_draw/`, `pub mod metal_draw;`, and the backticked prose
form) rather than a blanket one. A blanket `s/metal_draw/draw/` would have
rewritten all of the above, and would additionally have hit `metal_draws_fail`
(which `\bmetal_draw\b` correctly does not match) while missing nothing.
THE TEST THIS EXPOSED
`runtime::mapper::tests::resolve_builds_page_entries` went red on the first
full serial run and passes in isolation. The rename is why: libtest sorts, and
`runtime::draw::*` sorts *before* `runtime::mapper` where `runtime::metal_draw::*`
sorted after it. `draw::tests::type11_sample_resolves_geometry_before_reading_it`
and that mapper test both build a one-arm64e-page mapping with `mid == 3` and
both used PFN `0x1e88c`, so both compute the same `span_first_sight_key` and
contend for one entry in the process-global `first_sight` latch behind
`SPAN_SEEN_MAPPER`. Whichever ran first claimed the footprint; the other's
`mapping_gpa_span` line was never emitted and `cap.one("OFF")` found nothing.
That is a latent defect, not a rename artifact -- the suite was green only
because of the alphabet. The mapper test asserts on the PFN it names
(`pn_lo=`); this one only needs a page, so the distinct value went here, with a
comment stating the collision rule. `mapper.rs`'s own sibling test already
documents this convention ("a PFN of this test's own"); this fixture predated
it. A follow-up commit removes the need for hand-picked values.
VERIFIED
- `cargo fmt --all --check` clean (run bare).
- `cargo check` both arms; `--lib` on the cross-compiled Metal target.
- All three clippy arms with `-D warnings`, run one at a time: Metal via
`--target aarch64-apple-darwin`, Vulkan host, Vulkan `x86_64-unknown-linux-gnu`.
Zero from each.
- Full serial suite, Vulkan+host-window: 22 binaries, 1500 passed / 0 failed /
6 ignored -- identical to the pre-rename baseline, including the 6 ignored
wire-fixture tests that are absent on a non-Apple checkout.
- `a_level_span_is_measured_the_same_way_everywhere`'s `WIDE_SPAN_EXEMPTIONS`
carries two of these file paths as data; both were repathed and the test is
green, which is that gate doing its job.
NOT VERIFIED
- No boot. This is pure motion plus a test fixture; no product code path
changed, so there is nothing a driven boot could measure that the compiler
did not already decide.
- The Metal/arm64 pathway cannot be run from this host. It was compiled and
clippy-checked only.