Commit Graph
8109 Commits
Author SHA1 Message Date
Anees Iqbal b5cbdb2b4a Validation: the authored compile census compiles the mesh pipelines no candidate draws
Since the executor lost its runtime path, a run's preparation refuses an object or mesh case by
mesh_render_pipeline before it maps, so the census, which prepares through the same function,
refused the 15 committed object and mesh cases too, and the candidate's mesh mapping and compile
(engine/mesh.rs, PipelineRequest::MeshDraw, variants::compile_mesh_for_shape, Mapped::Mesh) ran
nowhere. The census now prepares through engine::prepare_compile: the run's preparation, except
that mesh_render_pipeline alone does not stop it. So each object or mesh case's mesh render
pipeline compiles on every profile-leg again, as the candidate would build it, and keeps its
compile evidence. A run still refuses such a case device-free (prepare_case, in the parent and
in the device worker).

AUTHORED_COMPILE_CENSUS_VERSION 6: the compiles a mesh case's cell is made of changed. The
census table is re-blessed on development.

Test: the_census_compiles_the_mesh_pipelines_no_candidate_draws (integration): the committed
public mesh case and object case are refused by a run's preparation with mesh_render_pipeline
alone, prepared by the census's, list one compile of the case's own pipeline, and compile on the
lavapipe profile in a real compile worker. It fails without the change (the cell is refused).
2026-11-20 06:28:32 -08:00
Anees Iqbal 142ba1c50d Validation: delete the heap placement the deleted runtime path left unreachable
The engine executor's runtime path, deleted with the old runtime, was the only candidate that
placed out-of-bounds targets in a heap of their own. With it gone, every guarded target sits in
an allocation of its own (the executor's context), so what only the heap placement used goes:

- guards::Placement (Allocation and Heap): with_escaped takes no placement;
- EscapeCause (HeapBoundMemory) and ReadCause (HeapBoundRange), with TargetRun's escape_cause
  and read_cause fields, which the executor's context never set (both skipped when None, so no
  stored row changes);
- ReadRule::HeapWords and its read check; TargetRun::read_rule is its mechanism's rule;
- the three guard tests, each about the heap placement (its escape cause, its vertex-fetch
  read cause, and why no venue's verdict differed between the guards and the heaps).

No version moves: the executor's rows and their judging are unchanged.
2026-11-20 06:28:32 -08:00
Anees Iqbal e9d5240b77 rt counters: time each vkQueueSubmit2 call and the submit thread's wait for the queue lock 2026-11-20 06:27:19 -08:00
Anees Iqbal d56faccefb rt docs: the links whose label does not resolve in import.rs keep their target; memory, render_encoder and surface lose their redundant ones
68fb4a1545 dropped the target of five import.rs links whose label names an item that module does not import (m3-max-58629). They keep it; the four redundant targets m3-max-58629 named elsewhere go. Docs only.
2026-11-20 06:22:38 -08:00
Anees Iqbal 12aaf0292e rt docs: import.rs's remaining links whose label already names their target lose the explicit target
The previous commit's list came from a truncated log; m3-max-58622 named six more in import.rs. Docs only.
2026-11-20 06:22:38 -08:00
Anees Iqbal 15bc2e5cfa rt docs: links whose label already names their target lose the explicit target; surface.rs's step macro names the test-only steps module in plain code
rt's private Rustdoc (--document-private-items, -D warnings), whose CI ceiling is 0, failed on 13 redundant explicit link targets in block.rs, export.rs and import.rs and on surface.rs's link to the steps module, which exists only in device-test builds (m3-max-58617 at d19a5d3390). Docs only; checked by the job named in the hand-off.
2026-11-20 06:22:38 -08:00
Anees Iqbal 6049bb1dfb Conformance: the ledger's site check holds the divergent rows
The one ledger is rt's, and its refused rows name where rt's run stopped: a step of the case's
program, such as `case/write-program/renderCommandEncoder` or a label setter's `set-label-0`,
which Metal's transcript need not hold. On development the site check read only the old ledger,
so rt's 102 such rows were never under it; held to it now, the test failed on the first
(m3-max-58510). A divergent row is compared against Metal's value at its site, so the check stays
on those, and every one of rt's divergent rows passes it. The refused rows are held by the replay,
which on lavapipe held exactly the ledger's rows (m3-max-58510, replay --cpu exit 0).

Checked: a local walk of the committed recordings over known-gaps-rt.tsv finds 102 rows whose
site no recording holds, all refused; the compile gate runs on this sha as potluck jobs.
2026-11-20 06:19:03 -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 d19a5d3390 rt README: which devices take a texture over a dma-buf in place, and why the others copy
The imported-texture lines now say which of the devices run take each form, as the planner ruled:
- Imported blocks: the in-place form is taken on a device that offers a linear image for a
  dma-buf import without asking a dedicated allocation; of the devices run, lavapipe alone
  (rtimport's probes m3-max-58579, m3-max-58583, m3-max-58587, m3-max-58589).
- Known gaps of memory blocks gains a bullet for a dma-buf's one import:
  - Radeon 780M (RADV): the external image query refuses the dma-buf handle with linear tiling,
    and the DRM-modifier images it offers each ask a dedicated allocation, which
    VUID-vkBindImageMemory-image-01445 (quoted) forbids binding in the buffer's import.
  - Iris Xe (ANV) and RTX 3090 (NVIDIA): no guest dma-buf is imported, since the dma-buf rule
    takes only the fd query's first type where it is host-visible and coherent (import.rs's
    reason, NVIDIA's broken later allocations), and theirs is not; their pages take the
    host-memory import.
  - Each is a known gap, reopened only by a measured copied share above 5% of a frame on that
    card.
- The host-memory bullet names the Iris Xe's and RTX 3090's pages among those it covers, and two
  overlong lines are rewrapped.

Verified: the compile job is named in the hand-off.
2026-11-20 06:15:32 -08:00
Anees Iqbal 46b2dd93e5 Runtime-sources pin: back to the binder's digest, which validation's build script now hashes alone
c714748e14 re-pinned the digest from a replica of the build script that still walked the old runtime's sources; since a3ab27ce63 the build script hashes the listed files and the binder's sources only, which give a5d1cbcf (the value a3ab27ce63 committed). The replica now matches the build script and reproduces a5d1cbcf at this tip.
2026-11-20 06:13:42 -08:00
Anees Iqbal c714748e14 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-11-20 06:13:14 -08:00
Anees Iqbal a3ab27ce63 Validation: the tests that named the runtime path's answers expect its requirements
Job m3-max-58543 failed four tests the deleted path changed:
- the runtime guard's closure listed env_vars.rs, library/mod.rs and repro.rs as reached but
  not inputs; only the old runtime's sources reached them, so they leave the list (job
  m3-max-58562 named exactly these three);
- the census's and the triage's mesh rows now carry mesh_render_pipeline (3 rows, and the
  effect-free mesh rows carry it alone);
- the mixed-run template test now reads replayed_template_resources where the executor
  refused in prose before.

Verified: the compile gate on this commit; the landing note names its job and codes.
2026-11-20 06:11:06 -08:00
Anees Iqbal bbe17feb08 Validation: keep the fast probe case's rows, which a committed test holds the fast-trig sign-off to
fast_trig_within_apples_bound judges every committed Vulkan and MoltenVK row of the fast
math-library probe case (f6524207...) against Apple's fast-math bound, and needs at least 10 of
them (job m3-max-58543: it failed once the runtime path's rows were removed). All 12 of that
case's rows were the runtime path's (vulkan 10, moltenvk 2). Their words are the device's
arithmetic for the same translated module, which is what the test holds the sign-off to, so
they are kept, in their committed order, until the executor's own context records the case.

Verified: a scan of development's shards (df58c37402) counts 10 and 2 such rows of the case; the
shards hold them again and no other runtime-path row.
2026-11-20 06:11:05 -08:00
Anees Iqbal e7efdaf099 Validation: remove what only the executor's runtime path used
Job m3-max-58508 (clippy, all three configurations) named what nothing uses once the runtime path
is gone: candidate::device_facts::DeviceFacts (the facts the runtime path read through the
runtime device's raw handles) and, on every host but macOS with --cfg m2v_gpu, mesh_cases (whose
other user, the runtime path's mesh tests, is deleted; the Metal executor's mesh_draws tests
compile only there). DeviceFacts goes, and mesh_cases compiles under its user's cfg.

Verified: the compile gate on this commit; the landing note names its job and codes.
2026-11-20 06:11:05 -08:00
Anees Iqbal 8f3daf9be0 Validation: makes_layouts_past_support compares the product's driver id
DeviceDescription's driver_id is the product's vk::DriverId, not ash's, so the copied check
compared mismatched types (job m3-max-58487: E0308 at platform/device.rs:497). It now names
metal2vulkan::vk::DriverId::MOLTENVK, the driver the old runtime's defect table lists for
SetLayoutSupportUnderstated with no clean version.

Verified: the compile gate on this commit; the landing note names its job and codes.
2026-11-20 06:11:05 -08:00
Anees Iqbal 2d66d63b34 Validation README: the engine's candidate draws no object or mesh case
The executor's runtime path drew them and is gone (the previous commit's parent). An object or
mesh case now requires mesh_render_pipeline, which no candidate runs, so the README says that
and drops the runtime's mesh calls it named.

Verified: docs only (the README is not part of the crate's Rustdoc).
2026-11-20 06:11:05 -08:00
Anees Iqbal 8b53ba5357 Validation: remove the stored Vulkan observations the deleted runtime path made
The executor's runtime path is gone, so its rows are evidence of nothing current: every
candidate and refusal row whose environment's executor is engine-runtime-compute or
engine-runtime-render goes from corpus/observations/{vulkan,moltenvk} and
corpus/observations/refusals/{vulkan,moltenvk}. The executor's own context's rows and every
Metal row stay.

Removed: vulkan 21342 rows (285 kept), moltenvk 4408 (4814 kept), refusals vulkan 160 (28
kept), refusals moltenvk 45 (12 kept). No other member of any kept row names those executors.

Verified: a scan of every shard after the removal counts no row with either executor; the
compile gate on this commit's parent covers the code.
2026-11-20 06:11:05 -08:00
Anees Iqbal d7e8149521 Validation: the executor runs every case on its own context, without the old runtime
The old runtime goes at the cutover, so validation stops depending on it. What this removes:
the engine executor's runtime path (candidate/engine/runtime_run, candidate/runtime_case,
runtime_samples, the route between the two) and the code only it used: the runtime's bounded
command-buffer waits, the library loader (air_library) and its scratch test, the imageblock
helper test, and the runtime's degrade notices on a candidate row (observation's
runtime_degrades and announced_degradations, c3's reading of them and its test). Every case
now runs on the executor's own Vulkan context.

What only the runtime path ran becomes an unsupported requirement in the one vocabulary:
- mesh_render_pipeline: an object or mesh case. The executor-contract check raises it from the
  case's reflected stage, so classification and the checker see it. The requirement qualifies on
  Metal: the checker still admits the 15 committed object and mesh cases with no candidate
  (Metal-qualified, Vulkan side unsupported), so their Metal evidence stays.
- replayed_template_resources: a replayed pipeline template that binds more than the context
  replays. The executor raises it as it prepares the case (replay_templates), as it raises
  depth_outside_unit_range, so no committed case is deleted.

Moved into validation, as tooling: the VK_EXT_device_generated_commands entry points the device
replay records (candidate/platform/generated_commands.rs; the commands layout is always made for
explicit preprocessing, which runs right on every driver), the loader's ignored-driver reports
(candidate/platform/ignored_drivers.rs), and makes_layouts_past_support (MoltenVK's driver id).
program_instance_made and the profiles layer's runtime settings go.

The runtime guard no longer hashes the old runtime's sources (build.rs walks the binder alone),
and the product fingerprint no longer walks the old runtime's crate; their tests and the pinned
runtime-sources.sha256 follow. The unused m2v_system_alloc cfg goes with the lanes that set it.

Versions: RUNTIME_VERSION 2540, ENGINE_EXECUTOR_ABI vulkan-engine-v184, the structural-triage
analyzer v83. The census is re-closed on development after the landing.

Verified: the compile gate (fmt, clippy plain and under both device cfgs, workspace Rustdoc,
validation's suite on lavapipe) runs on this commit; the landing note names its job and codes.
2026-11-20 06:11:05 -08:00
Anees Iqbal 4f7a49c36e rt README: the dma-buf acquire's old layout, preinitialized, and why
The acquire of a texture over a dma-buf's import names preinitialized as its old layout: Vulkan's
note on an acquire into a new image over external memory says the transition's layout is the
image's true initial layout and the undefined creation layout a placeholder, and Vulkan implies no
layout for a dma-buf (Table 17 lists Direct3D 11 handles alone). Docs only.
2026-11-20 06:05:09 -08:00
Anees Iqbal 2be570428e rt: a texture over a buffer in a dma-buf's import is in place where the external image query takes it
Every texture over a buffer in an imported block was the counted copy: rt made no image in imported
memory, because an image made for an import's handle (VUID-vkBindImageMemory-memory-02989) must be
made undefined (VUID-VkImageCreateInfo-pNext-01443), and a move out of the undefined layout keeps
no bytes.

Over a dma-buf's one import (import_dma_buf), the texture is now in place, the same form as over a
Shared block of rt's own: the device's linear image, made for the dma-buf
(VkExternalMemoryImageCreateInfo), bound at the texture's place in the import's memory and memory
type. It needs three things. The external image query (vkGetPhysicalDeviceImageFormatProperties2
with VkPhysicalDeviceExternalImageFormatInfo for DMA_BUF; linear tiling, the plan's format, usage
and flags) must answer importable, compatible and not dedicated-only, at the texture's extent. The
image must pass today's layout, alignment, reach and feature checks. The device must enable
VK_EXT_queue_family_foreign. Its move home is the acquire from VK_QUEUE_FAMILY_FOREIGN_EXT,
preinitialized to general, of the image and of the buffer's range under it, in one barrier. Each
such acquire is counted in Metrics::external_acquires.

Why the acquire keeps the bytes: Vulkan's external resource sharing says "To make the contents of
the underlying memory accessible in the destination instance or API, applications must ...
Acquire exclusive ownership in the destination instance or API". Its note says the undefined
creation layout "is a placeholder", as "the layout specified as part of this transition will be
the true initial layout of the image". For linear bytes the host wrote, that layout is
preinitialized. A GENERAL-to-GENERAL acquire would define no transition and would need GENERAL as
the image's current layout (VUID-VkImageMemoryBarrier2-oldLayout-01197). The buffer's range goes
in the same barrier because an acquire of the image alone would leave undefined "the contents of
any portion of another resource which aliases memory that is bound to" it.

Host memory's import (import_host_memory) keeps the counted copy, by handle type: "Importing
memory from a host pointer shares ownership of the memory between the host and the Vulkan
implementation ... as defined in Host Access to Device Memory Objects". No release exists for an
acquire to match, and the host reaches a linear image only in a host-accessible layout, which
01443 rules out at creation. Imports over several dma-bufs (sparse buffer) and exported blocks
keep the copy too. The rt README states the gap by handle type, with the quotes, the hosts it
covers today (the Mac and Windows hosts, and Linux pages not folded into a dma-buf) and the Mac
walk's measured size.

Own::Import now records the import's handle and memory type.

Verified (potluck jobs, priority 5, agent=rtimport):
- Gate at this change (m3-max-58529, um790) and again with the README commit after it
  (m3-max-58548, um790), every step exit 0: fmt --check; clippy -D warnings plain, --cfg m2v_gpu
  and --cfg m2v_cpu_icd (workspace, all targets, all features); clippy for
  x86_64-pc-windows-gnullvm and x86_64-pc-windows-msvc (air, translator, rt, devtools); workspace
  Rustdoc -D warnings; the API signatures check; rt host nextest 140 passed; every rt test on
  lavapipe under the validation layer 1.4.363.0 (any layer message fails a test), 445 passed.
- lavapipe: both new tests (tests/import_overs.rs) take the form in place, 0 copies and 1 acquire
  each. A kernel reads the texture over the dma-buf exact, a kernel then reads the buffer under it
  by its address exact, and both read the CPU's next write exact. A render target over the
  dma-buf, cleared and drawn, leaves the draw's texels in the memfd and every other byte as the CPU
  wrote it. The layer reports nothing on the acquire (PREINITIALIZED to GENERAL from FOREIGN, image
  and buffer range in one barrier).
- Radeon 780M (RADV PHOENIX), m3-max-58547, layer on: 37 import and over tests passed. Both new
  tests take the counted copy there (2 copies, 0 acquires), exact. A probe (scratch, never landed;
  m3-max-58557) read why: RADV answers ERROR_FORMAT_NOT_SUPPORTED to the external image query for
  DMA_BUF with LINEAR tiling, for sampled, attachment and transfer usages.

The lane's own commit of this change ended its message with a placeholder for the jobs; this
commit is that change's tree with the message completed.
2026-11-20 06:05:08 -08:00
Anees Iqbal a9acc24aa0 Coverage map: rows rt and the translator answer through their own calls, per-row sizes, refusals by rt's names
The fast switch to metal2vulkan-rt marked missing every runtime row whose old counterpart rt
does not hold under the same name. rt's and the translator's Rustdoc answer more of them:
- 28 runtime rows are implemented: the 9-argument texture and buffer-to-texture copies and the
  options form with no option, `enqueue`, `commandBufferWithUnretainedReferences` (the same call
  as `commandBuffer`), every `withRange:` setter of both encoders (a loop of the single setter),
  `useResources:count:usage:` and `useHeaps:count:`, both encoders' memory barriers,
  `newBufferWithBytesNoCopy` (Device::import_host_memory and a buffer in its block),
  `MTLCreateSystemDefaultDevice` (Device::new), `MTLCopyAllDevices`
  (Instance::physical_devices), a texture's `storageMode` through its descriptor, and
  `renderPassDescriptor` (RenderPassDescriptor's Default);
- 23 translator rows are implemented: MTLLibrary and MTLFunction by the translator's Library
  and Function (from_metallib, function, functions, library_type, install_name, properties,
  function_constants_dictionary, reflection), and MTLFunctionDescriptor by FunctionDescriptor;
- maxBufferLength and a texture descriptor's resourceOptions are the consumer's;
- 53 missing rows take their own size and note: encoder calls (S for loops of existing calls and
  store action options, M for stride binds and indirect draws, L for vertex amplification),
  render pass fields, a texture buffer's descriptor and alignment, function options;
- refusals are named by rt's types: Gap::IndirectCommandBuffers, Gap::KernelInput and
  Gap::DrawInput for function tables, RenderPipelineKind::VertexAmplification and Tessellation,
  RenderPassKind::TextureType and NoAttachment, Gap::TextureBuffer;
- 629 notes no longer name the old runtime's items (RuntimeGap's variants, FeatureRow's rows,
  its compiled_reflection, function_handle, allocated_size, new_library_with_source and
  BlitOption).
coverage.py's group names follow (buffers, encoder calls, command buffer options, function
options). docs/METAL-COVERAGE.md and docs/CONFORMANCE-COVERAGE.md regenerated: implemented
593, missing 1118, out of scope 424.

Verified: every implemented row resolves by the test's own rules in its crate's sources (a
script run of them: runtime 237, translator 356, none missing); every `Type::name` a note names
is held by rt or the translator (14 checked; the same check over the table before this commit
finds 26 it does not hold). The compile job is named in the hand-off.
2026-11-20 06:02:37 -08:00
Anees Iqbal df58c37402 rt README: what the recorded streams push past the tail, and the M3 recording's refused imageblock states
The Parameters paragraph's tail-placement price gains what a states-only play of all 34
recorded streams on lavapipe measured (jobs m3-max-58471, m3-max-58477, m3-max-58478,
m3-max-58483): no recorded kernel keeps a field in its block (171 kernel stages push past 232
bytes, over 2,805,608 dispatches, with 0 fields in a block), and the room the tail takes moves
fields into a block for 41 fragment stages only (374 fields over 23,690 draws). The
wide_bindings loss is a harness row's, not a recorded guest's.

The explicit-imageblock refusal gains the M3 recording's count: 10 states refused as
Gap::KernelInput, the count of its explicit-imageblock makes, none dispatched (the same plays,
and m3-max-57983 for the count). The states are counted, not named, so the text says no more
than the count. The "(in ten states)" of the 34-stream sentence moves into that sentence.

Verified: the compile job is named in the hand-off.
2026-11-20 05:51:26 -08:00
Anees Iqbal dd31b42ede Identity domains: the two-plane in-place sample's refusal is its slot's, so the split keeps two texts
The two-plane texture's linear sample read in place (Routine::Quad) never reaches the sampler
refusals: under the identity domains its slot's PushField::YCbCrInPlace is refused first, as
"an encoder value the function reads as YCbCrInPlace(SlotRef { .. })" (job m3-max-58481 read
that text where the test asked for the Quad one). The Quad condition and its text were dead, so
they go; the test pins the shape to the text it gets. The rt README names the two bicubic texts.
2026-11-20 05:45:04 -08:00
Anees Iqbal f90a6b1d55 Identity domains: the bicubic refusal splits into three forms, each with its own text
The identity domains refused three different shapes under one text, "a bicubic filter of a
1D texture or at pixel coordinates, or a two-plane texture's linear sample read in place".
Each now has its own condition and text: a bicubic sample at pixel coordinates
(SamplerPlan::bicubic_pixel), a 1D texture's bicubic sample (Routine::Line), and a two-plane
texture's linear sample read in place (Routine::Quad). The identity bicubic test asserts the
pixel and 1D texts on bcu_address and bcu_forms; a new in-place test asserts the third.
2026-11-20 05:45:03 -08:00
Anees Iqbal 953d696ecb rt test: the push window's 24- and 30-buffer kernels push 22 addresses below their tail
0cd2ad765d places each floor push with its tail 24 bytes above its other fields. A kernel whose
bounds go to its block also pushes that block's address, so its window holds the region and 22
buffer addresses below the zero tail word, not 24: the 24-buffer kernel now rings its last 2
addresses with the zero range's address and its 24 bounds (2, 25), and the 30-buffer kernel 8
addresses with its 31 check fields (8, 31). The lavapipe leg of development's checks at
5aacf738f7 (m3-max-58439) failed on the old (0, 23) with (2, 25). The kernels' block and push
counts are unchanged: both rang one block a dispatch before. The test's name, its docs and the
rt README's push-window line now say what the placement gives.

Checked by the compile job named in the hand-off.
2026-11-20 05:43:37 -08:00
Anees Iqbal cf30ed6a80 Validation: remove the items only the deleted runtime lane used
The runtime lane's deletion left items nothing else uses, which the build denies as dead code:
the loader-word re-export for its present tests, the timeline wait of its commit-cost tests,
engine_render's run_mapped helper, the sink's every-message switch and its loader-message
re-exports, and the player's string argument reader (the old backend's).

Verified: compile job m3-max-58414 at 00c2c1bf44 named exactly these items.
2026-11-20 05:42:33 -08:00
Anees Iqbal 8871d40bdf Validation: delete the old runtime's lane, parity harness, player backend and old-only tools
The old runtime goes at the cutover, and validation's old-runtime-only parts go with it:

- runtime_lane/ (the old runtime's device tests) and the Metal predication probe that pinned
  its streams. Its one rt-based module, the replay player's rt device tests, moves to
  replay/rt_replay.rs with its three old-runtime comparisons cut (the census test on both
  runtimes goes; its rt half is its own test) and a pipeline cache directory of its own in the
  scratch root.
- parity/ (Metal programs compared with the old runtime alone) and its Metal records under
  corpus/observations/parity.
- The player's old backend (replay/old_runtime): command-replay always plays on the new runtime,
  and `--runtime` is gone.
- corpus-draw-ab and format-scout (old-runtime-only tools), scripts/making-bench (corpus-draw-ab's
  bench), and the eleven public fixtures only the deleted sources used.
- The nextest overrides of runtime_lane tests, the queue-plan test group and the few-channels
  profile; the matrix's device-test filter now names replay::rt_replay.
- VALIDATION.md, REPLAY-STREAM.md and validation's README lose the lines of what went.

The candidate executor's runtime path, and validation's dependency on metal2vulkan-runtime, go in
the next commit.
2026-11-20 05:42:33 -08:00
Anees Iqbal bdbcdd539d rt: under direct driver loading, an instance extension counts only where a given driver lists it, or the loader implements it
Instance::with_drivers gives the loader the consumer's drivers in its exclusive mode, so no driver a
manifest names is loaded. But the loader's vkEnumerateInstanceExtensionProperties still lists those
manifest drivers' extensions, and enabled() counted an extension as offered where the loader OR a
given driver listed it. On the Mac host, with KosmicKrisp loaded directly and MoltenVK's manifest
installed, a consumer asking for VK_EXT_headless_surface got it enabled because MoltenVK lists it,
and vkCreateInstance failed with VK_ERROR_EXTENSION_NOT_PRESENT: every rt test of reims's Mac leg
failed at the instance (its batch 329b, m3-max-58452).

Now, with drivers given, a consumer's extension counts only where a given driver lists it. The
optional floor extension VK_KHR_portability_enumeration, which the specification says "is
implemented in the loader", still counts on the loader's list. Without drivers nothing changes: the
loader's list is the system drivers'.

Verified: the floor test's new cases (a manifest driver's extension counted without drivers, left
out with drivers that do not list it, portability enumeration kept) beside the existing ones; the
compile job named in the landing.
2026-11-20 05:41:23 -08:00
Anees Iqbal f07c86db30 rt README: its measurements stand as rt's own facts, with no comparison against the old runtime; the tail placement's price
The old runtime is being deleted, so a figure stated against it means nothing to a reader of
rt's README. Each such passage now states rt's own numbers, or goes:
- the Iris Xe particle kernel: 31 instructions a loop and 1.26 times a native Vulkan program's
  time (502.0 against 397.0 µs); the old runtime's 24 instructions and 429.5 µs go;
- NVIDIA's host-visible memory: the import's cost (5.8 ms for 64 MiB, 5.4 ms of it the import) is
  stated as the cost of importing host pages, not as the old runtime's form;
- the submit groups: "as the old runtime's are" and "four, the old runtime's bound" go;
- long_4cb: the last command buffer's 97.2-97.5 ms stands alone;
- frame_5cb on the RTX 2080: about 2.5 submissions a run and 20-25 µs idle at each boundary stay;
  the old runtime's 2.0 submissions, the row's 8% and the replay stream's 1.5 times go;
- the job timeout: the pointer to the old runtime's known gap in docs/FAST-PATHS.md goes;
- isolation: the runtime does not isolate processes; the "measured" clause named both runtimes
  together and goes with the old one, leaving the structural statement;
- the fault: rt refuses a store through a pointer to an unmapped address and took a store 64 TiB
  past a buffer; the old runtime's six-GPU result goes;
- the UHD 630 create_state compile: medians of 6,680 to 6,853 µs, with the workgroup's, the tile
  decode's and the addresses' shares stated against the forms they stand for;
- the UHD 630 tiles: 93.6 and 79.7 µs in tiles, and the 8x8x4 descriptor form's 0.97;
- the RX 550 one-high grid: 2,380.8 µs in the first run; the 1.18 ratios and the matrix ceiling
  go; the Iris Xe's time is the same in every form measured;
- the render-target read: the table and paragraph of the old runtime's passes go;
- the UHD 630 shadow copies: the reads after a barrier and at a loading pass's first draw keep
  their times (4,836.4 and 3,849.6 µs).
Two history words go with them ("the sign-extended offset it replaced", "an earlier probe").

The push window's paragraph gains the tail placement's price, as the planner ruled it, with its
jobs (m3-max-58429, m3-max-58430, m3-max-58431).

Line 3 ("It replaces `metal2vulkan-runtime` and takes its name when it does") is left for the
cutover's doc step, which owns the crate names.

Verified: the compile job is named in the hand-off.
2026-11-20 05:36:21 -08:00
Anees Iqbal 220473aafd Coverage map: the runtime's counterparts are metal2vulkan-rt's, and the test reads rt's sources
The old runtime is being deleted, and the coverage map's 649 runtime rows named its items. Every
runtime row now names metal2vulkan-rt's counterpart or none:
- 180 rows whose counterpart rt holds under the same name keep it;
- 29 take rt's name for it: DeviceProperties fields that are Device methods, the heap placements
  that are Device::new_heap_buffer and Device::new_heap_texture, the lod-clamp and stencil
  setters, the dispatch type taken by CommandBuffer::compute_command_encoder, and a texture's
  getters through Texture::descriptor;
- 73 are out of scope as rt's README gives them to its consumer: labels, MTLHeap and its
  descriptor, MTLBinaryArchive and every descriptor's binaryArchives, a resource's options, a
  texture's parent and shareable getters, a library's and a function's device;
- 367 are missing, each with a group, a size and a note: indirect command buffers (71), function
  tables, handles and dynamic libraries (38), mesh (33) and tile (26) pipelines and their calls,
  encoder calls (59), argument encoders (24), libraries and functions as runtime objects (25),
  and smaller groups. Their sizes are the group's, to be refined.

coverage.py names metal2vulkan-rt as the runtime and gains the new groups;
metal_coverage.rs reads crates/metal2vulkan-rt/src. docs/METAL-COVERAGE.md and
docs/CONFORMANCE-COVERAGE.md regenerated from the table (implemented 542, missing 1171, out of
scope 422).

Verified: every implemented runtime row resolves in rt's sources by the test's own rules (a
script run of them over the tree: 209 of 209); the compile job is named in the hand-off.
2026-11-20 05:28:07 -08:00
Anees Iqbal e3b1cf3f0f rt README: the AMD push over-read's known gap goes, as the tail placement fixed it; the warm cache figures name their pipeline counts
0cd2ad765d places each stage's push with its tail 24 bytes above its other fields, so a load the
driver widens stays inside its upload: the known gap the previous commit wrote is no longer true.
The two warm figures of m3-max-58285 are of two recordings: the second session's 274 render
pipelines through rt's cache against past it, and the tessellation recording's 383 through the
cache alone; each now names its count.

Docs only; checked by the compile job named in the hand-off.
2026-11-20 05:21:03 -08:00
Anees Iqbal e639f89d25 rt README, API.md: the known gaps a user reads before the old runtime goes
What each line states, in the section that owns it:
- Known gaps of pipeline states: on RADV a stage's pushed values that the driver reads from its
  own upload can be read past that upload's end (a 12-word load widened to 16), which faults
  where the upload ends the driver's upload buffer and loses a Radeon 780M or RX 7900 XTX.
  Recorded as open: rt places pushed values with no regard to that widening.
- Known gaps of pipeline states: the pipeline cache's cold price per card (RTX 3090 5.8% and
  6.8% slower, Iris Xe 9.8% faster, Radeon 780M level) and its warm effect.
- Known gaps of pipeline states, the identity domains' list: in plain words, a buffer reached
  through a pointer member of an argument buffer or a stored gpuAddress, and a kernel that turns
  a buffer argument's pointer into an integer, each named; the texture behind a pointer member
  named as such.
- Known gaps of render pipeline states: each render content is one whole VkPipeline with no
  shared parts; the heaviest recorded content's cold driver time on two RTX 3090s (1,408 and
  1,335 ms), the dynamic states' share (under 1%), the warm figure, and the render records'
  warm saving on lavapipe.
- Known gaps of render pipeline states: mesh render pipelines have no call in rt and no mesh
  draw; a mesh or object function in a render descriptor's vertex place is the translator's
  refusal.
- Known gaps of queues: a texture or block not shared outside rt, released while an unsent
  upload holds it, keeps its memory until that upload is submitted, and with no later call until
  the device drops.
- Floor: Mesa's driver for Apple GPUs (KosmicKrisp, Mesa 26.3.1) meets the floor on macOS;
  MoltenVK is below it (no nullDescriptor, set 1 refused by its set-layout support query).
- docs/API.md section 5, at PushField::SlotBounds: the bounds check's measured cost (harness GPU
  rows on a 780M, an RTX 3090 and an Iris Xe; replay streams' GPU time a frame; cold pipeline
  makes on two RTX 3090s), and the rt README's check entry points to it.

Why: the old runtime is being deleted; these are the gaps of rt a user meets that the README did
not state, stated as what is true now with the jobs that measured each.

Verified: docs only; the numbers are read from the jobs each line names (the bounds check rows
recomputed from m3-max-56485, -56486, -56546 and -56641). Compile job named in the hand-off.
2026-11-20 05:20:15 -08:00
Anees Iqbal 5aacf738f7 harness: its device tests run the new runtime alone
The authored workloads' test on the old runtime goes. The described
workloads' test runs the new runtime alone: heaped and over stay
refused by name, a refusal is printed, and an answered workload's
outputs are held to the CPU references the test knows.
2026-11-20 05:18:41 -08:00
Anees Iqbal 3f19240087 harness: the old runtime's arm goes; the harness runs the new runtime alone
The cutover deletes the old runtime. The harness's old arm (old.rs, the
--runtime old choice) and its Cargo dependency on metal2vulkan-runtime
go; the harness runs rt's workloads against their CPU references, then
times them. The crate docs and usage name --runtime new alone.

scripts/matrix still names the old runtime's harness rows; the crate
deletion's commit adapts it.
2026-11-20 05:18:41 -08:00
Anees Iqbal 4109b82aed 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-11-20 05:18:27 -08:00
Anees Iqbal 0cd2ad765d Push placement: on the floor each stage's push ends with its tail, 24 bytes above its other fields
A driver that uploads a stage's push bytes up to the highest one the stage reads, and widens a
push load past its last byte by up to 28 bytes, read past the upload where a stage's last field
ended its push (RADV: 49 compute stages at tip). A read pinned past the fields (R7) cost the
stages a driver holds whole in registers those registers: the pin raised the used-word count past
the driver's limit (RADV keeps all 16 words of the harness's lcg_step in user SGPRs at tip, none
under R7). The tail adds no read where the stage has a field of a tail kind, and moves one.

- lower/push.rs: on PushWindow::Floor, place() lays the longest prefix of the kind order that
  fits with its tail: the highest field of a tail kind (SlotBounds or ZeroAddress, the two kinds
  whose value the consumer never pushes with every bit set) moves HOLE_BYTES (24) above the other
  pushed fields' end; where the pushed fields hold no tail kind, the zero tail word
  (PushField::TailWord at PushPlacement::tail_word) takes that place, with which push_range ends.
  One pushed field of one or two words has no tail. The guaranteed window is packed as before.
- tail(), check_floor(): the structural tail and the floor's bound, which select checks on every
  placement as an invariant error.
- emit: the stage reads its tail in its first block and returns where it holds the value the
  consumer never pushes there (emit_tail_guard): the word non-zero, bounds with both words all
  ones, the zero range's address all ones.
- PushPlacement::tail_word (public, serde default, codec), PushField::TailWord (codec, API
  table); SEMANTICS_VERSION 2201, ARTIFACT_FORMAT_VERSION 556; the old render descriptor key
  re-pinned at 2201.
- Tests: push.rs's floor placements at their tails, the bound's refusals; engine_identity's
  31-slot kernel spills 4 addresses to its block; engine_identity_render's vertex range ends at
  64. Docs: API.md section 5 (the tail and what the consumer pushes), rt README (24 addresses
  below the tail), the profile's window doc.

Verified at 855d973a38 (this change before development's c39f6e8350 and 1de18aa609, which
touch no translator file), m3-max-58299 on msi: the metal2vulkan and metal2vulkan-rt suites
3911 of 3911 passed; the old-path pins (golden hashes over Device::new and the old render key)
pass. Clippy failed there on four indexing lints in push.rs, fixed here with get().
RADV dump (m3-max-58310, Radeon 780M, Mesa 26.2.6): lcg_step keeps the same 16 push words in
user SGPRs with no push pointer, plus a 3-instruction scalar guard; the 18-word kernel keeps its
two loads (+0x20, 32 bytes; the second now at +0x58).
2026-11-20 05:17:29 -08:00
Anees Iqbal a507907bd8 rt: name the release trigger's condition: the object is shared outside rt
The condition that has a release send the pending uploads (Held::shared) is that the object is
shared outside rt: a surface plane's image, or an exported block. The README, the Metrics fields,
the submit module and Work::release now say so in those words. Docs only.
2026-11-20 05:04:22 -08:00
Anees Iqbal a354a246da rt: releasing a surface's planes or exported block sends the pending upload that holds them
On the Windows host (UHD 630), rt freed an imported Direct3D 11 surface's memory only at a later
import, not when the guest let go of it. The holder is the pending upload.
Surface::external_writes_done records each plane's acquire into the upload of the next commit and
holds each plane's image there (Held::Texture). That upload goes only with the submission of a
command buffer committed after the call, with a flush, or when a later upload call finds the
pending uploads past their bound (4,096 calls, or 64 MiB with the bytes released while they held
them). A command buffer with nothing for the GPU takes no submission. So a surface acquired and
then dropped with no later commit stayed alive until the next upload call: in the consumer's
round, the external_writes_done after the next import. Below 64 MiB it stayed until the device
dropped. Each import's VkDeviceMemory holds the Direct3D 11 texture's payload (Vulkan 1.4 section
11.2: "the imported memory object holds a reference to its payload"), so the payload stayed too.
rt keeps no Windows handle of an import.

The trigger is a property of the release: the pending upload holds what is being released. Both
release sites call Work::release:
- a texture whose image outlives it (TextureInner::drop). It hands the release to the reaper,
  because that drop may run under the work lock;
- a block given back (release_block).
Under the work lock it looks for an upload not yet submitted that holds the object. Where the
object is memory another API shares (Held::shared: a surface plane's image, in place or a Direct3D
11 texture's, or an exported block, the copy form's among them), every pending upload goes at
once, with no wait. The memory is then freed when that submission completes, with no later call.
Every other release keeps the bound as before. Widening the trigger to every texture and block
means removing the Held::shared condition, not adding a second mechanism.

New counters, at the same site and for every kind of object:
- Metrics::held_releases and held_release_bytes: each release, and its bytes, while a pending
  upload held the object;
- Metrics::held_release_starts: the first such release since those uploads came to hold the
  object, so the sends a trigger for every texture and block would start.
The player prints all three.

The old runtime has no Direct3D 11 or Win32 import. Its dma-buf imports acquire at the first
submission that uses them, and are freed by their last holder.

Tests: tests::surface::every_device_frees_a_surface_at_its_drop_with_its_acquire_unsent (exported
surfaces, every row the device exports) and
tests::d3d11::every_device_frees_direct3d_11_planes_at_the_surface_drop (Windows, m2v_gpu). Each
drops a burst of 32 surfaces that were acquired and never used, and waits with no later call for
the surface gauges to return to their values before the make or import: one submission and one
held release that starts a send. A surface whose acquire rode a read's submission drops with 0
submissions. One acquired again after a read drops with 1. Then 200 rounds of make, acquire, a
read on every other round, and drop, each freed before the next, with the gauges equal at rounds
100 and 200.
2026-11-20 05:04:22 -08:00
Anees Iqbal 1de18aa609 Tests: the stream device tests of the old runtime's queue plan run at most four at a time
What: .config/nextest.toml's default profile puts the validation crate's
runtime_lane::replay_streams tests, and the three runtime_lane::rt_replay tests that play
on the old runtime too (a_private_shown_texture_is_checked_through_a_copy,
a_tiled_texture_takes_its_buffer_s_bytes_and_levels_at_first_use,
the_address_census_is_the_same_on_both_runtimes), in a test group, queue-plan, of
max-threads 4. These are the tests of the GPU legs' filter (DEVICE_TEST_FILTER in
scripts/matrix/matrix) that open a lane device of the old runtime's queue plan (at_plan).
docs/VALIDATION.md's paragraph on a GPU of few channels says so. The few-channels profile
stays: the lane's other at_plan tests lie outside the group, so a whole lane run on such a
GPU still takes it.

Why: the RTX 2080's GPU leg (NVIDIA 620.70.06) failed 3 runs of 3 at b4058db961
(m3-max-58129, m3-max-58168, m3-max-58241), each at the same test:
tests::translate::on_device::every_device_removes_a_blob_it_cannot_take, "NVIDIA GeForce
RTX 2080: vkCreateDevice failed: Initialization of an object has failed". In the seconds of
the failure the kernel logged NVRM "kchannelAllocMem_GM107: Could not create Channel" (31
times in 58241), "kchannelAllocMem_GM107: Instance block allocation ... failed" and
"heapAlloc_IMPL: no free blocks" (39). 58241 sampled the card and the test processes every
0.3 s: at the first error 17 test processes were alive, 15 of them replay_streams tests,
whose devices take the queue plan's 18 VkQueues, each a channel on NVIDIA's driver (the 2080
holds 10 such devices). The card had 242 to 257 MiB of its 8,192 in use then, 1,458 MiB at
most over the leg, 393 MiB reserved: not its memory. The test alone passed (m3-max-58193,
0 NVRM lines), and so did it 18 runs of 18 beside the host-import timing test alone
(m3-max-58237). The lane's devices wait for room (runtime_lane/device_room.rs); the new
runtime's device tests take the driver's refusal as it is. Four devices of the plan are 72
VkQueues, which leaves room for six more: the leg's other 12 processes, whose new runtime
devices take at most 2 VkQueues each, and other programs' devices on the GPU.

Verified (archive m3-max-58111 at b4058db961; the nextest config of a commit whose tree is
this commit's, read from the workspace):
- m3-max-58271, exclusive on homelab-um790-xtx-1: the 2080's leg 506 of 506 passed, exit 0,
  0 NVRM lines, 0 refused channels, at most 4 of the group's tests alive at once; the replay
  tests' wall time 33.4 s; the leg 167.4 s (175.1 to 185.4 s in the three failed runs).
- The same job, the RX 7900 XTX's leg in turn before, after, after, before: 21.62 and
  21.44 s before, 21.57 and 22.09 s after (1.4% longer on the means); the replay tests' wall
  time 3.1 and 2.9 s before, 2.9 and 3.7 s after; at most 8 and 11 of the group's tests alive
  at once before, 4 after; every run 506 of 506, exit 0.
- m3-max-58260: the 2080's leg under --profile few-channels (3 test threads), 506 of 506,
  exit 0, 0 NVRM lines, 166.4 s, the replay tests' 22 runs 54.9 s in all (434.2 s in 58129).
2026-11-20 04:49:59 -08:00
Anees Iqbal c39f6e8350 rt: a render content's record in the cache directory names its two lowerings, so a later device makes the content with no decode or specialization of either function
A warm make, a new process on a cache directory a device before it filled, cost 1,215 ms for
glbench-3090-r4's 383 render contents on a 3090 against the old runtime's 448 ms. 1,099 ms of it
was the translator's key of each content's compile (Device::render_variant_key), which decodes and
specializes the vertex and fragment functions to learn the lowering inputs of each: per content
2.0 functions specialized, 1.0 module decode read (16,071 bytes, 1,046 instructions) and 0.4 decode
copies (24,955 bytes, 13.6 functions, 174 metadata nodes), 831 of the key's 874 ms. Only then did
the two lowerings load from the directory. The old runtime kept a record under the descriptor's
key that names the two lowerings, so a warm make there decodes nothing.

Now the same. After a content is lowered, its record goes into the lowered-function store, under
renders/, named by the translator's key of its descriptor (Device::queried_render_descriptor_key).
That key reads no function. It covers every field of the descriptor, each function by its AIR hash,
entry, constant values, linked functions and dynamic libraries, the profile's fingerprint and the
semantics version. The record holds the FunctionCompileKey digest of each lowering. A state of a
content the device does not hold reads the record first and loads the two lowerings it names. It
calls neither render_variant_key nor the specialization. The record is 122 bytes: a layout magic,
the translator's semantics and artifact format versions, the descriptor's key again, two tagged
stage digests and a checksum. A record of another version or another content, one cut short or one
changed is a miss, and the store removes it. A record whose lowering the store no longer holds is a
miss counted in the new Metrics::render_records_stale: the state takes today's path and keeps the
record again. Metrics::render_records_read counts the reads. Records go through the reaper's write
queue and the store's generations under the existing cap, as lowerings do. Only metal2vulkan-rt
changes: the translator's public API already had every item the record needs (PipelineKey::digest,
FunctionCompileKey::new, CompiledFunction::from_bytes_for_key, both versions). Device::new and every
translation are unchanged.

Compute keeps its path. A warm compute make decodes nothing: a kernel without a stage-input
descriptor is its own lowering inputs (kernel_inputs_read). gb-3090-r2's 126 compute contents and
15,299 compute states took 44.6 ms warm on ms01's Iris and 39.7 ms on the 780M, against 974.8 and
787.8 ms for its 274 render contents.

The tests:
- tests::cache: the fill-past-capacity test now fills with lowerings and records in turn, each a
  record's length. It reads a kept record back and finds a removed one gone. A new test reads a
  record only as its own content's: another content's key, a moved semantics or format version or
  layout (sealed again under the checksum), a bad stage tag, a digest beside none, one byte short or
  long, and every single bit flipped are each no record.
- tests::render, devices of the cfg's kind:
  - a second device on the directory takes the content by its record: records read 1, lowerings
    made 0 and read 2, and the stage entries count no read of either function's AIR. The negative
    control removes the record: lowerings read 2, both functions' AIR read again, and the record is
    kept again. With the fragment's lowering removed, the record is stale (1) and that function is
    lowered again.
  - each kind of input changed once misses the base content's record: the library's content (one
    constant of the fragment body, names kept), the fragment function, its constant value, and the
    colour attachment moved from index 0 to 1 (a field the fragment's specialization reads). The
    translator's keys of each compile show the change reaches a lowering key, and the base
    content's read on the same device shows the record is there to miss. The base record copied
    over the constant's content's record is no record of it. The device profile is checked where
    the host has two devices of the cfg's kind with different profiles, and skips visibly with one.

Verification: the lane's potluck jobs (clippy in three configurations, Rustdoc, the touched tests
on the host and on lavapipe), reported with their ids.
2026-11-20 04:32:47 -08:00
Anees Iqbal 090a70b6d2 rt: the block-maker thread waits out the submits its last memory call met before its next one
What: the wait moves from right after each of the block-maker thread's vkAllocateMemory and
vkFreeMemory calls to right before its next one, on the same mark: as a call returns, the
thread marks the vkQueueSubmit2 calls of rt's inside the driver then (SubmitCalls::mark), and
its next memory call starts once all of them have returned (SubmitCalls::call and ::free, through
memory::maker_call and memory::free). Every memory call the maker makes goes through them:
memory::allocate (the pool's units, the zero source, the ring's make-ahead block, the staging
region) and memory::free (idle and own frees, and the failure and race frees in fill, ring and
staging). The submissions-during-frees flag still spans the vkFreeMemory call alone, and the
wait before a free is outside it. Metrics doc wording follows (maker_memory_calls,
maker_yields: the calls that waited before they started); README's NVIDIA hold gap says so.

Why: with the wait right after the call, what the call made (a pool unit, a ring block a caller
may wait for) was handed on only once the submit inside the driver returned. Waiting before the
next call keeps the bound (no submit sits behind two of the maker's calls) and hands on what was
made at once; for calls made back to back the two forms wait the same. Planner: yes (main's
relay).

Verified: see the lane's check job (tests::maker_yield's 4 GPU-free tests rewritten for the
deferred wait, the negative control with the wait removed, the device test on lavapipe, clippy
plain/m2v_gpu/m2v_cpu_icd, rustdoc).
2026-11-20 03:44:34 -08:00
Anees Iqbal b4058db961 rt test: the import-time test ends its memfd mappings on Linux alone, so rt's device tests build for Windows
ff603a9212 gave import_time's Pages a Drop that calls libc::munmap for every mapping, outside the
Linux gate its mappings sit behind. rt takes libc only on unix targets, so rt's tests under
--cfg m2v_gpu stopped compiling for x86_64-pc-windows-gnullvm (E0433 at import_time.rs:122): the
Windows cross build of rt's device-test archive at development d6a8f8fc49 failed (m3-max-58057), and
with it the UHD 630 leg. The unmap now sits beside map_shared, gated as it is: Linux ends the
mapping, and elsewhere, where the test maps no memfd, it is unreachable.

Verified: see the compile jobs named in the landing.
2026-11-20 03:37:04 -08:00
Anees Iqbal 9e250379d3 rt README: the yield covers the block-maker thread's own calls, not a long take's
What: the NVIDIA hold known gap now names what the block-maker thread's wait covers (its
16 MiB unit makes, the fixed-size internals, the frees of idle allocations and of imported and
exported blocks) and what it does not (a take longer than a unit allocates its own length on
the consumer's thread with no wait, and that allocation is freed in one call of its whole
length); the standalone figure cited is the 16 MiB unit's row (75.3 ms back to back, 20.6 ms
with the wait), rt's unit, instead of the 64 MiB row. Why: the planner's scope note on
Pool::take/Pool::own (a long take is the consumer's single call). Docs only.
2026-11-20 03:25:39 -08:00
Anees Iqbal ef875741cc rt: the block-maker thread waits out the submits inside the driver after each memory call
What: after each of its vkAllocateMemory and vkFreeMemory calls, the block-maker thread
(memory::run, and each class's first unit in the device's making) waits until every
vkQueueSubmit2 call of rt's that was inside the driver as its call returned has returned;
with none inside it goes straight on. Every device, no query, no switch. Takes that allocate
on a consumer's thread make their one call with no wait. Unit lengths unchanged.

How: a new SubmitCalls (submit_calls.rs) counts each vkQueueSubmit2 in just before the call
and out as its guard drops after it, under a mutex held for an add; it wakes a waiter only
while one waits, so the submit thread never waits on the maker. The maker reads the count in
at its call's return and blocks on a condvar until that many returned. The thread-local that
marked the maker thread (ON_MAKER) now holds the device's SubmitCalls; memory::allocate and a
new memory::free (every free the maker makes: idle and own frees, and its make-failure and
race frees in fill, ring and staging) call passed() after the driver call. The
submissions-during-frees flag moved from the pool into SubmitCalls and now covers the
vkFreeMemory call alone, so the wait after a free is not counted as part of it (it also
covers every maker free, not only idle ones; the metric's doc says so). New metrics
maker_memory_calls, maker_yields, maker_yield_nanos (api_signatures blessed; the replay
player prints them). README: the NVIDIA hold known gap says what rt does now and what remains
(a single call still holds a submit for its own length).

Why: NVIDIA 620.70.06 holds a submit while another thread is inside vkAllocateMemory or
vkFreeMemory, and holds it through calls made back to back (rtsweep's standalone program on
the RTX 3090: giving back 1 GiB in 64 MiB frees back to back held the worst submit 216 ms,
with this wait 72 ms, 0.90-0.96 of the longest single call; on a quiet queue it adds no
wait). The planner ruled this form (a1).

Verified: see the lane's check jobs (GPU-free ordering tests in tests::maker_yield, the
device test on lavapipe and the RTX 3090, clippy plain and --cfg m2v_gpu, rustdoc).
2026-11-20 03:23:04 -08:00
Anees Iqbal 07710bf5ca conformance docs: the bicubic texel-classes module names its private texel and coordinate helpers in code spans, not links
cargo doc --workspace -D warnings refused the two intra-doc links from the public module's
documentation to private functions (rustdoc's private_intra_doc_links), so development's Rustdoc
step failed at a669dcff99 (tip check 57979, STEP doc EXIT=101). The helpers stay private; the
prose names them as code. Verified by a workspace Rustdoc job with -D warnings.
2026-11-20 03:21:13 -08:00
Anees Iqbal d6a8f8fc49 rt README: prepare_dispatch's measured effect at 1 and 4 threads on the 3090
The planner asked for the exclusive interleaved pair as the README's number. On an RTX 3090,
cold, exclusive (job 57987, um870), three plays at each width in turn of the player at
b506518794 (sha256 f0b1d8476ee3): a frame whose command buffers first use 66 compute pipelines
spent 1,729 ms in first-use waits at --prepass-width 1 and 613 ms at 4, the frame 3,565 and
2,430 ms; the resident memory rose at most 410 and 441 MiB in that frame.

Verified: the figures are the means of job 57987's three rounds; docs only.
2026-11-20 03:19:31 -08:00
Anees Iqbal 84b4f52e4b rt docs: a compute kernel with an explicit imageblock stays refused, as documented Metal on macOS has imageblocks for Apple silicon only and no recorded stream dispatches one; the pipeline-state gaps name prepare_dispatch
The refusal (Gap::KernelInput at interface()'s fact match) was met in an arm64 macOS 27 guest's boot. The planner's rule: built only if something uses such a kernel. replay2 counted GPU-free over 34 recorded streams (jobs 57931, 57944, 57983): the arm64 boot's default-runtime stream makes 2 explicit-imageblock kernels in 10 states and dispatches none; no stream records setImageblockWidth:height:. The MSL spec (5.6, 6.14) gives macOS imageblocks for Apple silicon only.

Two known-gap lines said no compile runs ahead of the dispatch; prepare_dispatch (b506518794) makes them when the consumer calls it, so they say so.
2026-11-20 03:07:48 -08:00
Anees Iqbal a669dcff99 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-11-20 02:55:51 -08:00
Anees Iqbal f7a833a939 conformance coverage: the ledger rows of bicubic-texel-classes; its sRGB rows name both notes
docs/CONFORMANCE-COVERAGE.md lists the ledger rows, so it is regenerated with the case's
35 old-runtime rows. The old runtime's sRGB rows say "the static notes ... and
srgb-texel-decode".

Verified: scripts/conformance-coverage/coverage.py --check reports the document as derived;
m3-max-57864 at 23dcb71cd6 failed only the coverage test this fixes, and its lavapipe
replays of both runtimes read the ledger rows clean (exit 0).
2026-11-20 02:55:02 -08:00
Anees Iqbal bafdd29f9c conformance: bicubic-texel-classes's rows on an RTX 3090; the note's figures with it
The 3090 answers as lavapipe does (its half results unnarrowed, RGBA16Unorm's largest
difference 2.16e-4), and the old runtime's sRGB row reaches 1.58e-3 there, so the
note's per-format figures in docs/API.md take it.

Verified: the rows are the replay's own ready-to-paste rows at 40bc6a759e on the 3090
(m3-max-57815).
2026-11-20 02:55:02 -08:00