Commit Graph
30 Commits
Author SHA1 Message Date
Anees Iqbal 6a922c4ea2 CI: every nextest suite runs to its end (--no-fail-fast)
At da37e9e5df's macOS leg (run 46984549568) the validation suite stopped at its first failure,
with 831 of its 1326 tests not run; the failure before it had hidden that one for a whole cycle in
the same way. Every nextest step of both legs now passes --no-fail-fast: the three suites
(metal2vulkan and its sibling crates, validation, conformance) and, on Linux, the device tests
lavapipe-image runs in the image (its nextest command takes nextest's arguments after the
filters). A red step stays red; only how much runs after the first red changes. The CI replica
reads ci.yml, so it runs the same way.

Verified: the replica job named on the ready line runs these steps.
2026-12-02 16:24:22 -08:00
Anees Iqbal 9a89d5e25c CI: the lavapipe image's udmabuf decided by the node's presence, its downloads saved on fetch, its build step limited
lavapipe exports a dma-buf through /dev/udmabuf. The image's containers now get the host's node
wherever the host has one (docker's daemon opens it for them; rootless podman only where the
user may), with the node's group, and `lavapipe-image udmabuf`, which the build step runs, says
which. Where they get none, `nextest` skips the tests and `replay` (new: the conformance replay in
the image) leaves out the cases scripts/lavapipe-image/needs-udmabuf names, each named in the log:
those are measured, each failing without the node and passing with it. The workflow decides by the
node's presence alone; no test is loosened. LAVAPIPE_IMAGE_UDMABUF names another node, or none,
which is how the lab's replica shows what a runner without the node runs.

The downloads are restored before the build and saved right after it, keyed on the pin (the
tarball's sha256, the date and the packages' versions), so a job whose later steps fail still
keeps them. The build step's limit is 90 minutes: a cold fetch at the slowest rate measured from
the archive, one connection at 57 KB/s, of the 127 MB tarball and 135 MB of databases and
packages (262 MB) takes 77 minutes. A fetch that fails ends the build step with the URL and curl's
status, or pacman's, before any test runs; the fetches retry three times.

Measured at this change's parent plus the probe (job m3-max-79668, lavapipe on x86-64 AVX2, no
node passed in): of 807 device tests run, 806 pass and
replay::rt_replay::a_video_surface_is_waited_for_at_its_ready_point_once fails with "the device
exports no DmaBuf"; with the node (m3-max-79517) every one passes. The four surface-textures cases
are refused at replace-region without the node (m3-max-79408) and hold the ledger's expectations
with it (m3-max-79517).
2026-12-02 11:59:40 -08:00
Anees Iqbal 7687644485 CI: the device-executing steps run on lavapipe in an image of one Arch Linux Archive date
CI's lavapipe steps ran on Ubuntu's Mesa 26.0.8 (LLVM 21.1.8), whose llvmpipe faults in its JIT
code on the conformance case reconvergence-constructs' rc_break draw (a null load on its
rasterizer thread), while the ledger's llvmpipe rows were recorded on Mesa 26.2.4 with LLVM 23.1.1.
The device tests, the conformance replay and public case qualification now run in a container
image of exactly that Mesa and LLVM, and nowhere else.

scripts/lavapipe-image/pin names the image: the Arch Linux bootstrap tarball of 2026.10.01 and its
sha256, the archive date 2026-10-05 its packages come from, and each package's exact version
(vulkan-swrast 1:26.2.4-1, llvm and llvm-libs 23.1.1-1, vulkan-icd-loader and
vulkan-validation-layers 1.4.363.0-1, spirv-tools 1:1.4.363.0-1, vulkan-tools 1.4.363.0-1,
python 3.14.7-1). scripts/lavapipe-image/lavapipe-image builds it: the tarball by curl -A curl,
checked against the sha256; its root imported with docker or podman; then pacman, against that
date's archive repositories alone, fetching through curl -A curl (XferCommand), with signatures
required and checked by the bootstrap's own keyring. Its downloads stay under
~/.cache/m2v-lavapipe-image, which CI caches keyed on the pin, so a run whose pin has not moved
downloads nothing. `ensure` prints the pin, the packages the image holds and its device's name and
driver, and fails where any differs from the pin or from the ledger's new `# llvmpipe:` line,
which names the venue's Mesa, LLVM, loader and layers. That line holds upstream versions: the
image is Arch's build (mesa 1:26.2.4-1), and the rows were recorded on another distribution's
build of the same release (3:26.2.4-1).

The tests are built on the host and only run in the image, with no network, only the
environment named, and the checkout mounted read-only (qualification writes the corpus alone).
lavapipe exports a dma-buf through /dev/udmabuf, so a container gets the host's where the host's
user may open it, and offers the exports the host's lavapipe does. Each container is held to its job's memory (LAVAPIPE_IMAGE_MEMORY, else the host's) and CPUs
(CARGO_BUILD_JOBS, else the host's), since the container runtime runs it outside the job's
processes. The archive serves a connection slowly at times, so the build fetches the
transaction's packages eight at a time with the same curl command before pacman runs.
The device tests are the tests the --cfg m2v_cpu_icd build lists and the plain builds do not
(only_in.py): a test that opens a device compiles only under the cfg, and the plain builds' tests,
the .ll fixtures' test with Ubuntu's LLVM 21 among them, run on the host as before. They go into
the image as a nextest archive, which needs no toolchain there; the replay and qualification run
the binaries built in the checkout. The host keeps the Vulkan loader and no driver.

AGENTS.md and CONTRIBUTING say in one sentence each that the pin and the ledger's line move
together.

Verified in the lab's replica of CI's Linux job (job m3-max-79517, at this change on
e086e51c7e, docker 29.10.1, lavapipe on x86-64 AVX2): the image builds from the cached downloads
in 55 s and its check passes (every package equal to the pin; "llvmpipe (LLVM 23.1.1, 256 bits)",
"Mesa 26.2.4-arch1.1 (LLVM 23.1.1)"). The device tests: 810 listed, 809 run, 809 passed. The
conformance replay holds exactly the 4,712 open gaps the ledger expects on llvmpipe, with no fault.
Public case qualification passes. Without /dev/udmabuf (m3-max-79408) one device test met "the
device exports no DmaBuf" and the replay refused four surface-textures cases at replace-region;
with it both are as the ledger expects. The two red host steps of both runs, golden_hashes and
the pinned opened chains, are the tables the next pin blesses, not this change.
2026-12-02 11:50:03 -08:00
Anees Iqbal bd1f8c479d CI: the private intra-doc link count runs with colour off, so a broken link counts
The step counts the lines of `cargo doc --document-private-items` that begin `error: ` and holds
each crate at its ceiling. The workflow sets CARGO_TERM_COLOR=always, under which Cargo prints
each diagnostic with a colour code ahead of `error`, so the count was 0 whatever rustdoc
reported: the step could not fail.

Verified: m3-max-78564 (msi) plants one broken private intra-doc link in the harness crate and
runs the step's count over it: CARGO_TERM_COLOR=always counts 0 (the unresolved-link diagnostic
is in the log), never counts 1. The step now sets never.
2026-12-02 07:11:57 -08:00
Anees Iqbal 9a1c8fe6dc metal2vulkan-rt takes the runtime's name: metal2vulkan-runtime, published
The cutover's last mechanical step. The old runtime is deleted, so its name is free: the crate
moves to crates/metal2vulkan-runtime, its package is metal2vulkan-runtime and its library
metal2vulkan_runtime, and every reference in the tree follows (sources, tests, scripts, CI,
generated tables and docs).

It is now a published crate, as AGENTS.md said it would be once it took the name: version 0.2.0
with the other two, the translator pinned exactly (=0.2.0, as the translator pins the AIR front
end), documentation, keywords and categories, and copies of the repository's four license files,
which the published-crates test now holds equal to the root's for three crates. CI packages it
with the others. Prose that said it was unpublished, or counted two published crates, says three.

AGENTS.md: facts only. The crate table row, the published-crates and version sentences, and the
paragraph on the old runtime, whose name the runtime now carries (listed for the owner).

Made by one script run on this tip. Verified by the job
named in the landing note.
2026-11-20 09:10:02 -08:00
Anees Iqbal 4d3daeace8 Docs: the runtime is metal2vulkan-rt; HOWTO's sections on the deleted runtime give way to rt's README
metal2vulkan-runtime is deleted, so the user-facing docs name metal2vulkan-rt as the runtime:
- README.md: the crate table's runtime row is metal2vulkan-rt (not published yet); two published
  crates; the git dependency and both README links name it; the runtime needs a Vulkan 1.3 device
  with its README's floor; the sentence on the deleted runtime's repro bundles goes.
- CONTRIBUTING.md: the layout lists metal2vulkan-rt and metal2vulkan-conformance; the gate drops
  `-p metal2vulkan-runtime` and gains the conformance suite's line, as AGENTS.md's gate has it;
  two published crates for the signatures and the license copies; the refusal check reads the
  runtime's refusal enums (the deleted runtime's `Problem` is gone).
- docs/VALIDATION.md: the gate as CONTRIBUTING's; "the new runtime" is the runtime in the matrix
  rules and the command replay (the record keys and `harness --runtime new` keep their names).
- docs/HOWTO.md: the sections on the deleted runtime's shader cache, host memory (no-copy
  buffers, unmapping, copied host buffers, guest RAM) and exported memory described its API
  alone; each is now a pointer to rt's README (The cache directory, Imported blocks, Exported
  blocks and Exported surfaces), stating only what that README states. Section 4 loses the
  deleted runtime's repro bundles; section 8 loses its pipeline names, its start-up checks, its
  suspend-time measurements of its own calls and its exit-handler probe, keeping the driver facts.
- docs/ARCHITECTURE.md and the CI workflow's comment name the runtime as metal2vulkan-rt.

Left for the translator's commit (part 2): FAST-PATHS.md and the DevicePolicy text in README,
CONTRIBUTING and VALIDATION's golden-table paragraph ("The old runtime's translations do not
move"), which follows the matrix's old-path rule.

Verified: the compile job is named in the hand-off.
2026-11-20 07:58:56 -08:00
Anees Iqbal 5d725aeec7 Delete metal2vulkan-runtime, with every test and script that read it
The cutover deletes the old runtime: crates/metal2vulkan-runtime and its workspace member go.
Nothing in the workspace depends on it any more: the harness and conformance lost their old arms,
and validation dropped its dependency in its own commit.

Adapted in this commit, so no gate reads the deleted tree:
- CI and scripts/linux-gate-ci: the crate's per-feature clippy group, its `-p` in the Windows
  clippy and the test step, and its private-doc-links row go. Packaging needs no edit: the
  workspace's published crates are now metal2vulkan and metal2vulkan-air.
- The published-crates test lists those two; devtools' carried trees and the five nextest groups
  of the old crate's tests go.
- scripts/api-signatures: the crate leaves CRATES, FLOORS and the header, its self-test trees name
  rt (read by the same rules), and the table is re-blessed (the old crate's 4555 rows go);
  api_signatures.rs pins the three crates left.
- scripts/refusal-surface: the old crate's tree and its sections go (RuntimeGap, AppleOnly,
  Problem and the problem enums it forwards to), with their 87 reach rows, the `--delegations`
  verb and the test that counted the old Problem's delegations; docs/REFUSALS.md is regenerated.
  The basis check now holds rt's refusal enums alone, which it already required.
- scripts/api-cost-coverage goes: it measured only the old crate's surface.
- feature_vocabulary.rs: the old crate's two enable tables go; the Khronos and validation tables
  stay held to the vocabulary.
- The conformance coverage generator's by-hand roots read rt instead of the old crate, and
  docs/CONFORMANCE-COVERAGE.md is regenerated (MTLResourceOptions' row, which only the old crate
  modelled, gives way to rt's MTLCommandBufferError).
- scripts/matrix: the harness times the new runtime alone (`--runtime new`), so the rules that
  judged it against the old one go: the new-over-old budget with its floors (floors.tsv,
  gpu-floors.tsv), ceilings, card variance and status table (status.tsv), the frozen arm, the
  base spread and the timing once more it set off, the re-timed pairs, the five creation rounds
  and the old runtime's parked tests and records. A harness row's time is judged as a cross-GPU
  outlier, with its alone runs as before, and the frame and burst rows by their stored
  instruction counts; the creation rows run once, in their own process. docs/VALIDATION.md's
  matrix section says these rules.

Checked locally (python, no build): signatures.py --check and --selftest, refusal_surface.py
--check, --selftest and --missing-basis, coverage.py --check and --selftest, and scripts/matrix's
49 tests pass. The compile gate (fmt, clippy plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, Windows
clippy for gnullvm and msvc, workspace Rustdoc, packaging, the touched crates' suites on the host
and on lavapipe) runs on this sha as potluck jobs that the landing note names.
2026-11-20 07:01:01 -08:00
Anees Iqbal ac90becd94 Conformance: the old runtime's side goes; rt's side is the only one, held to one ledger
The cutover deletes metal2vulkan-runtime, so the conformance suite stops depending on it.

What goes: the old runtime's side (runtime_side.rs, runtime_work.rs, states.rs) and its runs in
run.rs, report.rs and the command; the cost verb, the timing-coverage verb, `times`' leg of ours,
the `--rt`, `--default-policy`, `--leg`, `--call` and `--cold-shaders` flags; the four split
binaries that drove the old runtime directly; coverage.rs; and the old side's ledger,
known-gaps.tsv. The harness half of the cutover landed separately.

What stays: rt_side is the only runtime side, and `conformance replay` runs it (CI's
`replay --cpu` now replays rt on lavapipe). Its ledger, known-gaps-rt.tsv, is the one ledger, with
the rows it held; a call rt_side does not answer yet stays Failure::unavailable on it, as before.
The cases keep every allowance: the old runtime's Degradation kinds become the suite's own codes
(degradation.rs, the same `metal2vulkan-degrade-<kind>` codes), and the old runtime's Metal value
enums the cases state become the suite's own (values.rs). The old side's descriptor helpers that
rt_side and its tests used move to rt_side/fields.rs. Recordings keep their `costs` and our times
as data; `deny_unknown_fields` still reads them.

The coverage generator reads rt_side alone, and docs/CONFORMANCE-COVERAGE.md is regenerated.
The README describes the suite as it now is.

Checked: coverage.py --check and --selftest locally. The compile gate (fmt, clippy plain,
--cfg m2v_gpu, --cfg m2v_cpu_icd and for aarch64-apple-darwin, workspace Rustdoc, the suite on the
host and on lavapipe, and the lavapipe replay) runs on this sha as potluck jobs that the landing
note names.
2026-11-20 06:19:03 -08:00
Anees Iqbal 9385f103ee rt docs: the Unix-only dma-buf import named in plain text, and rt's Rustdoc for Windows in CI
rt's documentation for x86_64-pc-windows-gnullvm and -msvc failed on unresolved links to
Device::import_dma_buf, which only a Unix host has: the docs of block.rs's Block, BlockInfo,
Error's NoImport, floor's OPTIONAL_EXTENSIONS, ImportHandle::DmaBuf, import_host_memory, the
over-copy metric, the imports gauge and Buffer::new_texture's texture forms linked it. Each now
names the call in plain text with its host ("on Unix", "(Unix)"), which resolves on both
hosts; no link or allow is left behind. d3d11.rs's links to import_d3d11_surface sit in a
Windows-only module, so they are documented on Windows alone.

CI gains the step: rt's Rustdoc, warnings denied, for both Windows targets, from Linux beside
the Windows clippy step.

Verified: see the job in the lane's report (cargo doc -p metal2vulkan-rt --target <both>
--all-features --no-deps with -D warnings, and the Linux doc).
2026-11-19 12:13:25 -08:00
Anees Iqbal dea5618aa7 conformance: the CPU clocks and host pages have a Windows form; Windows answers no load average
The conformance command did not build for Windows: `src/clocks.rs` read the two CPU clocks with
`libc::clock_gettime` and the load average with `getloadavg`, and `src/host_pages.rs` mapped a
no-copy buffer's pages with `libc::mmap`, none of which `libc` has on Windows. So the Windows host
(a supported metal2vulkan-rt host) could not replay the suite.

On Windows the thread's and the process's CPU clocks are `GetThreadTimes` and `GetProcessTimes`
(kernel plus user, in 100 ns units), and the pages are a committed `VirtualAlloc` released with
`VirtualFree`, the forms metal2vulkan-runtime already uses. Windows keeps no load average, so
`host_load` answers `None` there, which the timing report already reads as "this host answers no
load average" and the per-call gate already judges on what the host does answer. `libc` is now a
unix-only dependency and `windows-sys` a Windows-only one, as in the runtimes.

A new unit test holds both CPU clocks to answering and moving while the thread computes, so a host
form whose call fails or reads a constant is seen. CI's Windows clippy now names the conformance
crate, so the Windows build is held from Linux.

Verified: unverified at this commit; the compile check and the Windows run follow.
2026-11-18 23:36:38 -08:00
Anees Iqbal 374e29a988 metal2vulkan-rt: the floor's shader features, queue family, timestamps and memory types
The floor now also requires what the translator's shaders and the runtime's
core need of every device:

- shaderInt16, shaderInt8, storageBuffer16BitAccess (Vulkan 1.1 features,
  now read and enabled through Features::vulkan11), storageBuffer8BitAccess,
  scalarBlockLayout, vulkanMemoryModel and vulkanMemoryModelDeviceScope. The
  translator emits 8- and 16-bit access only in storage and physical storage
  buffers in practice (uniform views are u32 or uvec4, push fields are 32- or
  64-bit), so the uniform and push-constant 8/16-bit features stay out; it
  does use device scope.
- timestampComputeAndGraphics, and timestampValidBits of at least 36 on the
  first queue family with graphics and compute, which Capabilities names
  (queue_family). A device with no such family is Missing::QueueFamily.
- a host-visible, host-coherent, host-cached memory type (Shared storage)
  and a device-local, host-visible, host-coherent one (the parameter ring),
  each usable by a buffer of BUFFER_USAGE: every Vulkan 1.3 buffer usage plus
  device addresses. Vulkan answers buffer memory types only for a created
  device, so check() finds a type with each set of flags and carries the
  memory properties, and memory_types(device, &capabilities) chooses the
  first usable type of each with vkGetDeviceBufferMemoryRequirements.
  Missing::MemoryType names the flags.

Each shortfall is named in BelowFloor, with a unit case; the README's Floor
section states every item and tests::floor holds it to the code. The device
test now also creates each device with the floor's features and extensions
and chooses its memory types on it.

CI's lavapipe step (ci.yml and scripts/linux-gate-ci) runs the rt crate's
device tests too. refusal_surface.py reads metal2vulkan-rt and writes the
floor's Missing as section 10 of docs/REFUSALS.md; signatures.py pins
metal2vulkan-rt's public surface in api_signatures.tsv.

Verified: see the lane report (compile job, device legs on every lab GPU,
lavapipe and the Windows UHD 630).
2026-11-17 05:33:25 -08:00
Anees Iqbal 017ff31e2f wip harness crate 2026-11-17 05:22:15 -08:00
Anees Iqbal 28b6b0b9df metal2vulkan-rt: the new runtime's crate, and AGENTS.md's rules for one path on every device
What: a new, unpublished workspace crate, crates/metal2vulkan-rt, that will replace
metal2vulkan-runtime and take its name at the cutover. It has no public API yet. Its first test,
tests::one_path, reads the crate's product sources (line comments removed) and fails on:
- a vendor, device or driver identity name (vendor_id, deviceID, DriverId, driver_name ...);
- a GPU vendor's ID as a hex literal (0x1002, 0x10de, 0x8086 ...);
- an environment read (env::var, option_env!);
- a struct or enum named as a policy.
Two more tests prove the scan finds each form and passes prose and unrelated numbers.

AGENTS.md takes the owner's new rules, in priority order:
1. correct for documented Metal, with the device's arithmetic and static notes per operation;
2. one path for every device;
3. native-like speed;
4. small.
It also takes:
- the workaround ladder, the never-list and the thresholds;
- the matrix rules: every check fans out one leg per GPU at once, and the replay matrix runs on
  development after each merge with deterministic metrics and leak gauges;
- the freeze: the old runtime, DevicePolicy switches, driver-fact tables, device checks and
  docs/FAST-PATHS.md get regression fixes only until the cutover deletes them, and nothing new
  of those kinds is added;
- the scope rule: below the floor is a typed refusal, and a Metal feature no replay stream uses is
  a typed refusal until a stream needs it.
The crate table, the doc table, CI's crate lists and the gate commands in AGENTS.md,
CONTRIBUTING.md and docs/VALIDATION.md name the new crate.

Why: the owner's plan replaces the runtime with one that has no per-device code paths. These are
the rules every lane of that work follows from its first commit.

Verified: cargo fmt. Build, clippy and the crate's tests run on development after this lands.
2026-11-17 03:09:06 -08:00
Anees Iqbal 6267d10c6f CI: clippy of the published crates and devtools for Windows, on Linux
x86_64-pc-windows-gnullvm (the primary Windows target) and x86_64-pc-windows-msvc, with
--all-targets --all-features and warnings denied. Clippy links nothing, so the Linux job
needs only the two targets' standard libraries. AGENTS.md's CI paragraph names the step.

Verified: the same clippy lines ran in potluck jobs on Linux (msi) for both targets.
2026-11-15 05:49:35 -08:00
Anees Iqbal 8e65408e85 Resolve the runtime's broken private intra-doc links, and lower its ceiling to 0
CI's private intra-doc link step reported 148 for metal2vulkan-runtime on
macOS and 149 on Linux at 3b176b8bd4, against a ceiling of 70, so the step
was red on both runners:

- 119 links whose explicit target is the item their label already
  resolves to (`redundant_explicit_links`): 73 from the `degradations!`
  macro, one per precision-note kind's `PrecisionNote::<note>` link, and
  46 written by hand. The target is dropped; the rendered link is the same.
- 17 links to `RenderCommandEncoder::<method>` for methods that are the
  lowering's (`RenderLowering`) since the program's encoder was put in
  front of it: assemble, begin_current_draws, begin_inline_split,
  finish_replay, flush_inline, gathering, group_turn, inline_begin (2),
  inline_split, plan_one, replaying, settle_draw, settle_draws,
  snapshot_fallback, snapshot_wanted and watched. Each links
  `RenderLowering::<method>`.
- render.rs: `check_tile` (a `ShapeInputs` method) linked
  `Self::kept_imageblock_bytes`, and `kept_imageblock_bytes` (a
  `RenderLowering` method) linked `Self::pass_sample_length`; each links
  the other type's method by its type. The `plain_drawn` field linked its
  sibling field `replay_plain` by its bare name; it links `Self::replay_plain`.
- scheduler: `Order::behind` is `Order::is_behind`.
- event_timeline.rs: `Signal::after` is the `after` field of the
  `Signal::Kept` variant.
- pipeline/libraries.rs: `GraphicsContent` is linked by its path in the
  sibling module (`super::graphics`).
- Items built for tests alone are named without a link, as the translator's
  `DIRECT_ARGUMENTS_FROM_AIR` is: `Allocations::limit_to`,
  `patched_slot_uses` and `state_locks`.
- exit_guard.rs: the module docs describe both exits, but `end_at_once`
  and `AT_ONCE_NOTICE` are built on Linux with the GNU C library alone and
  `BOUND` and `MAKING_BOUND` everywhere else, so each runner failed on the
  other's; the four are named without a link.

Docs only; no behaviour changes, so no version moves. The runtime-sources
pin moves with these files; the stack re-pins it.

Verified (potluck): the counts before are from `RUSTDOCFLAGS=-Dwarnings
cargo doc -p metal2vulkan-runtime --all-features --no-deps
--document-private-items` on the M3 (macOS 27) and msi-laptop (Linux).

(cherry picked from commit b4d88f87c6d6fa4c1dfc3fa9774b2fc540c6b297)
2026-11-05 17:12:18 -08:00
Anees Iqbal 4515a9ab3b Resolve the AIR crate's last private intra-doc links, and lower its ceiling to 0
CI's private intra-doc link step reported 3 for metal2vulkan-air at
3b176b8bd4 (macOS and Linux alike), against a ceiling of 3:

- abi/keys.rs: `Key::parse` linked `KEYS`, the spelling table its test
  holds the matches against, which is built for tests alone; it is named
  without a link.
- abi/core_image.rs and abi/visible.rs: two `AbiError` links carried an
  explicit target the label already resolves to; the target is dropped.

Docs only; no behaviour changes, so no version moves.

Verified (potluck, M3 and msi-laptop): `RUSTDOCFLAGS=-Dwarnings cargo doc
-p metal2vulkan-air --all-features --no-deps --document-private-items`
reported 3 before; the count after this commit is in the next job's log.

(cherry picked from commit dde8a1cd07867b6fa9f71ac6c9cf8a7442f85b11)
2026-11-05 17:11:57 -08:00
Anees Iqbal 64b4e42d75 Build on nightly-2026-11-03 with rustc's parallel front end, kache and incremental builds
The owner asked for a nightly toolchain, -Zthreads, kache 2.0 with its incremental cache, and
Rust's incremental compilation on.

- rust-toolchain.toml pins nightly-2026-11-03 (rustc 1.101.0-nightly 1c3a65069), dated so every
  machine runs one rustc, clippy and rustfmt. The published crates keep rust-version 1.98, which
  this build no longer checks by itself (clippy's incompatible_msrv still flags newer std items).
- .cargo/config.toml passes -Zthreads=0 (a thread per core) through Cargo's profile rustflags,
  which add to RUSTFLAGS instead of being replaced by it, so `--cfg m2v_gpu` lanes and CI's
  -Dwarnings keep it.
- scripts/rustc-wrapper hands each compile to kache where kache is on PATH outside CI, and to
  rustc otherwise; `RUSTC_WRAPPER=` (empty) builds without it.
- CARGO_INCREMENTAL=0 is gone from scripts/device-lane, AGENTS.md and CONTRIBUTING.md.
- CI installs the toolchain the file names; both Dockerfiles take the same nightly.

What the nightly asked of the code:
- Its standard library containers take more trait-solver levels (Box -> BoxRaw, RawVec ->
  PhantomData), so proving a RenderCommandEncoder `Send` from a program's crate ran past the
  default recursion limit (tests/consumer_auto_traits.rs failed, a future-incompat lint that will
  become an error). The encoder now holds its own lowering in `OwnLowering`, whose `Send` impl is
  written out over a compile-time proof that `RenderLowering` is `Send`, as `LoweringSlot` already
  was. The runtime crate's own proofs need recursion_limit 256.
- New clippy lints: needless_range_loop, single_element_loop, new_instead_of_clear (a false
  positive on a moved-from Vec: the part's segments are now taken explicitly),
  needless_borrows_for_generic_args, redundant_closure, unnecessary_lazy_evaluations,
  manual_range_patterns; AtomicU64::fetch_update is deprecated for try_update (present in 1.98).
- Cargo warns that `homepage` equals `repository`: homepage removed from the manifests.
- nightly rustfmt formats ir_id! invocations one argument per line.

Verified on the M3 Max: `cargo clippy --workspace --all-targets --all-features -- -D warnings`
clean on the nightly; `cargo build -v` shows -Zthreads on every rustc invocation and
scripts/rustc-wrapper in front of each.
2026-11-03 23:41:19 -08:00
Anees Iqbal 7f3f0a2f36 Mend the private intra-doc links the round's deletions broke, and lower the runtime's ceiling
One work packet, landed as 2 commits (a206cc110f..951b13189a on archive/development-linear-2026-10-28), in order:

* Mend the private intra-doc links the round's deletions broke, and lower the runtime's ceiling

CI's private intra-doc link step holds each crate to the diagnostics
rustdoc --document-private-items still reports. At 7ec539ceb2 the
translator reported 6 against its ceiling of 0 and the runtime 75 against
73, links to items this round deleted or narrowed:

- the translator: DeviceProfile::edit (built for tests alone), the
  bicubic Span (gone; the packed line caller is gone with it),
  word_filters and Linear::words (gone with the device sampler), and
  StageInFetch::of (in pipeline::stage_io, linked by its path);
- the runtime: an unescaped [0,1] in ycbcr_device's quoted spec text,
  LARGE_SURFACE_TEXELS, Device::inform and Needs::AnyOf linked by their
  paths, and DIRECT_ARGUMENTS_FROM_AIR (built for device tests alone)
  named without a link.

Docs only; no behaviour changes, so no version moves.

Verified: --document-private-items with -Dwarnings reports 0 for the
translator and 70 for the runtime (the ceiling now says 70); the public
rustdoc build of both crates with -D warnings is clean.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.
2026-10-28 17:24:23 +02:00
Anees Iqbal f834dd21d0 Resolve the last private doc links in two crates, and the fourth over-claim
The steps this packet landed as, in order:
- Close the two ragged lines the move comments' rewording left

Content: the tree of `development` at 0d7bc7c25f, unchanged.
2026-10-26 13:19:19 +02:00
Anees Iqbal 07be4d219a Resolve the conformance crate's broken private doc links
The steps this packet landed as, in order:
- Say what the clipped-source move row's texels read, not more

Content: the tree of `development` at f3664abbb5, unchanged.
2026-10-26 13:19:19 +02:00
Anees Iqbal a863eb2a4c Resolve every broken private intra-doc link in the translator
Content: the tree of `development` at 74cdfcbda3, unchanged.
2026-10-26 13:19:19 +02:00
Anees Iqbal 6bd663c908 Check the private intra-doc links in CI and fix four of them
The steps this packet landed as, in order:
- Run the private intra-doc link step after the API reference
- Record the runtime sources' hash after the private doc-link fixes

Content: the tree of `development` at 2b630acfb4, unchanged.
2026-10-26 13:19:19 +02:00
Anees Iqbal 3d9d7c5885 Make the ledger hold a divergence and a venue, not refusals alone
The steps this packet landed as, in order:
- Adopt the fragment quad's lavapipe divergence, scoped to that venue
- Name the device's own gap where the vocabulary could not, and the notice in a notice-only difference
- Pin the sparse sample-count chain as the device's gap, with lavapipe's measurement
- Recompute the runtime-sources pin after the rebase

Content: the tree of `development` at fb88ec8599, unchanged.
2026-10-26 13:19:09 +02:00
Anees Iqbal ad6daa7a10 Run Metal twice, plain and validated, and let the second run justify a refusal
The steps this packet landed as, in order:
- Record both Metal oracles for the two rate-map cases
- Say what the validated oracle holds, including when nobody asked it
- Tie the committed recordings to the cases that rest on them
- A validated stop documents a refusal; it never excuses one
- Expect the refusals we have written down, in both directions

Content: the tree of `development` at 75a2f57331, unchanged.
2026-10-26 13:19:08 +02:00
Anees Iqbal a356129821 Add the conformance suite's core as its own crate
The steps this packet landed as, in order:
- Prove the conformance loop with two seed cases, recorded on this M3 Max
- Own the committed-AIR shader path, and three more exhaustive byte cases
- Compare a case's words in named columns, and keep the suite's two venues green
- Bump the runtime version and pin the runtime sources after the binding fix

Content: the tree of `development` at 4b4ecc5628, unchanged.
2026-10-26 13:19:07 +02:00
Anees Iqbal 13b279df1b Squash 11203 commits of translator, runtime, and validation work
Rolls up everything since 43c46ac8 into a single commit. Its tree is
identical to the tree of private master at
b3c77f2d2b20a432be10591a2129547c10b1c24b.

- A Cargo workspace of five crates under crates/: metal2vulkan (the
  translator and the metal2vulkan command), metal2vulkan-runtime (the
  Metal API on Vulkan), metal2vulkan-air (the AIR front end),
  metal2vulkan-validation and metal2vulkan-devtools.
- Dual license: GPL-2.0-or-later OR LGPL-3.0-or-later.
- docs/: API, architecture, fast paths, how-to, Metal coverage,
  refusals, runtime porting and validation guides.

Private-Commit: b3c77f2d2b20a432be10591a2129547c10b1c24b
2026-10-11 20:09:13 +03:00
Anees Iqbal 43c46ac8a2 Squash 680 commits of translator, validation, and corpus work
Rolls up everything since 9e0e99a4 into a single commit:

- src/native, src/passes, src/reflect, src/meta: AIR intrinsic lowering,
  access-chain and pointer handling, constant/composite dedup, storage
  and descriptor-slot fixes, function-constant folding.
- validation/: Metal and MoltenVK oracles, triage, observation contract,
  and the case runner.
- validation/corpus and fixtures: new authored cases and re-recorded
  candidate observations at the shipping fingerprint.
- tests/: module-level oracles for reflection, NonWritable, gated
  varyings/system values/descriptor slots, loop budget, and fallback.
2026-09-06 23:58:13 +03:00
Anees Iqbal 08970cacd2 Consolidate translation, linkage, and validation work
Squash 147 commits (2026-08-20 through 2026-08-31) into one change on top
of the exact-kernel-grid work. Covers native lowering and pointer/layout
construction, AIR intrinsic and funnel-shift coverage, BDA address
preservation across aggregate calls, CFG structurization, function-constant
and visible-function specialization, the 30-second translation ceiling, the
authored-case corpus and linkage validation suite, and refreshed byte-exact
MoltenVK evidence.

The kernel-grid lowering in this tree supersedes the 324-line variant in
the parent commit; that file is reduced to its current 139-line form here.

Resulting tree is identical to 7174c7b. Prior history remains reachable at
tag pre-squash-backup and branch backup/pre-squash-7174c7b.

Claude-Session: https://claude.ai/code/session_01D1u4vU7Mr5QNWrnnRHC8iS
2026-08-31 09:03:42 +03:00
Anees Iqbal 8b78eaca3b Expand macOS 26 AIR translation coverage
Overhaul the validation workflow around sharded authored cases, dependency-exact observations, incremental indexed corpus audits, bounded parallel translation, and native Metal/Vulkan comparison.\n\nExpand native AIR lowering, reflection, linked-function specialization, resource and stage-interface support, and structural CFG/pointer repair across the harvested macOS 26 corpus. Add exact intrinsic inventory, distributed 16x16x16 matrix lowering, explicit opaque tensor linkage, and regression coverage for the newly supported feature classes.\n\nThe final corpus verification accounts for all 88,819 indexed AIR modules under the current product fingerprint: 65,355 translate and validate directly, 23,464 require exact authored linkage, and zero fail or remain unresolved.
2026-08-13 21:46:27 +02:00
Anees Iqbal 3007485352 🆕 Open Source metal2vulkan 2026-07-22 13:15:24 +03:00