Commit Graph
28 Commits
Author SHA1 Message Date
Anees Iqbal 0ce2f39b71 Translator: the resident core deleted; every device compiles the one form, and the tests run it
Every device now compiles the identity domains, the one form: a kernel's
buffer arguments are bound as storage buffers of set 0 where the device
binds them (DeviceProfile::binds_kernel_buffers) and are reached at their
device addresses elsewhere, as every other stage's are; vertex attributes
are fetched by fixed-function vertex input; textures and samplers are
elements of the identity arrays of set 1, named by their resource IDs.
What the one form does not lower is a typed refusal,
Unsupported{IdentityDomains, NotImplemented} with the IdentityCause the
previous commit names.

Deleted, with everything only they reached:
- the device policy (device/policy.rs) that chose the resident-table
  domains, and the resident root table, handle table and their facts;
- the heap raw reads (lower/sampler/heap_raw.rs, lower/texture/heap_raw.rs),
  sampler footprints, bind/texel_parts.rs and bind/status.rs;
- the lockstep orders' barrier tiers, which no order key adds now
  (OrderKey::of orders nothing).

Tests: 274 tests that only the resident-table policy compiled (development's
DevicePolicy::RESIDENT_TABLES, which only tests built) are deleted, among
them 15 whole files (argument tables, cross-class, device replay, dynamic
roots, two extended-range files, image shapes, mesh barriers, profile F,
separate samplers, sparse unmapped, tile, wide, sweep and the footprint
tests); each deletion's reason is listed with the READY. The others are
ported to what the one form compiles and names today: census names,
push fields, refusals with their causes, and run values. A new interpreter
harness (tests/identity_harness.rs) binds a dispatch's buffers at device
addresses and its textures as identity-array elements. Census naming is
unchanged. The validation tests that read compiled modules (coverage,
companions, the authored compile census, specialization) assert the one
form's present strings. The extended-range levels and volume tests, whose
mip filters development built under the resident tables, become two tests
of the one form's answer, which is development's default policy's: a 2D or
3D sample of an extended-range slot texture is refused, TextureState
(lower::texture::identity_class holds no class for it); a padded form's 3D
sample stays the lowering's NotImplemented(Format). Development's new
thread-local test binds through the one form's harness, and its
handle-web test (every_handle_web_an_instruction_observes_is_refused)
compiles on the default profile.

SEMANTICS_VERSION 2355 and ARTIFACT_FORMAT_VERSION 607 (cached
translations and artifacts change). docs/REFUSALS.md is regenerated and
runtime-sources.sha256 is pinned at this tree.

Verified at the stack's tip, which differs from this commit only by the
five commits after it; the jobs and their results are named in the READY.
2026-12-03 09:15:33 -08:00
Anees Iqbal 333ae1b40f Translator: PrecisionNote::code states each note's stable degrade code
A precision note's stable code, `metal2vulkan-degrade-` and the note's
name in kebab case, was written only in the conformance crate
(degradation.rs), which is unpublished. So no published item gave a
caller the code to announce a note by, and README.md said the runtime
announces each note once with a stable code, which it does not: the
runtime records each state's notes when the state is made, exposes them
through its getters, and prints and sends none (docs/API.md section 9
says so).

- PrecisionNote::code (pipeline/artifact.rs) returns the code, one arm a
  note, as docs/API.md's catalogue names it.
- The conformance crate reads it from there: Degradation::code is its
  note's code, through Degradation::note, the inverse of
  from_precision_note. Each kind's doc names its note, not a second copy
  of the string.
- README.md's "Recorded differences" says what is true: the runtime
  records each state's notes at creation and exposes them with a stable
  code; the caller announces them. docs/API.md's catalogue lead names
  PrecisionNote::code.
- The signature table takes the method under both crates that export
  PrecisionNote.

The 83 codes are unchanged: each equals the conformance crate's string
before this commit (checked by script against its code() table), and
every_kind_is_a_catalogued_precision_note still finds each in the
catalogue. New tests: every_precision_note_code_is_its_name_in_kebab_case
(translator, serde feature: every variant read from the enum's source,
its code the kebab rule, no code twice) and every_kind_is_its_notes_kind
(conformance: note() takes from_precision_note back for every kind).
No translation, runtime or refusal changes; no runtime input changes, so
runtime-sources.sha256 stays.

Verified: rustfmt --check on the four .rs files; the job named in the
handover.
2026-12-03 01:35:25 -08:00
Anees Iqbal 30a7654ac5 CLI: --tessellation FILE sets a post-tessellation vertex function's tessellation state
The command built its render descriptor from separate options and set no
tessellation state, so a post-tessellation vertex function always compiled
under Metal's default state: no control-point index type, factor 16,
clockwise. A pipeline of another state, such as one whose control points
come through a UInt32 control-point index buffer, could not be compiled
from the command line.

--tessellation FILE reads the JSON form of TessellationDescriptor (it
derives serde already) into the descriptor's tessellation field. Without
it the descriptor has no tessellation state of its own, as before. A repro
bundle carries the file as tessellation.json, as it carries the stage-input
and vertex descriptors. The README's command-line section and --help name
it. The option lives in the command's binary, which the cli feature
builds.
2026-12-02 16:25:21 -08:00
Anees Iqbal a7dd2e846e Translator: the binder's plan goes, with everything only it reaches, and the TexelRows and YCbCrInPlace forms
The runtime never made a plan (it binds each draw and dispatch by the pipeline's interface), and
since the census digests each pipeline's content alone (two commits back) nothing in the tree calls
one. What only the plan reached goes with it:

- bind: BindState, BindShape and their shapes, BindingPlan and its instantiation
  (DispatchCommands, DrawCommands, push, descriptor and root-table templates and writes),
  plan.rs and plan/ (compute, resources, slots), instantiate.rs, resident.rs, the neutral
  resources' plan side, the heap's member planning and table bytes, the mesh arguments pass
  (MeshArguments, MeshArgumentsForm, fold_object_grid, metal_object_grid), ExecutionStatus and
  StatusBits as public items, TextureShape::Buffer, IndirectRef with the four indirect call
  variants (Dispatch::ThreadgroupsIndirect, DrawCall::Indirect, PatchesIndirect,
  MeshThreadgroupsIndirect) and IndexBufferRef::fetch_end. Dispatch, DrawCall and IndexBufferRef
  stay: validation states its cases' calls with them.
- error::BindError leaves the public surface; a crate-private BindError of three variants stays
  as the error of the heap's view derivation, which lower::texture::slot's storage-read check
  reads (bind::heap::tier_read_gaps). That check keeps only the storage view's format: the
  sampled-view branch and ImageViewDesc were reached by the plan alone.
- vk::DrawCommand, the plan's draw output.
- pipeline: ComputePipeline::plan, RenderPipeline::plan; cache: VariantKey::covers and
  large_buffer_form.
- The TexelRows form (bind::texel_rows, LoweringInputs::texel_rows, RuntimeFact and PushField
  TexelRows) and the YCbCrInPlace form (bind::ycbcr_in_place, lower/sampler/in_place.rs,
  LoweringInputs::ycbcr_in_place and ycbcr_planes_sampled, RuntimeFact and PushField
  YCbCrInPlace, PrecisionNote FloatSampleFilter and HalfSampleFilter, Routine::Quad). Only the
  binder set those inputs.
- The tests of the deleted items, and the plan halves of mixed tests. Of 6810 tests (`#[test]`
  functions in the workspace) 309 leave and 11 come in their place: the lowering halves of mixed
  tests, kept without the plan (the heap layout, the stage-in stride and region facts, the
  emulated-simdgroup and bicubic facts, the iris-xe storage classes), and the kept tests of the two
  renamed files. 50 others are edited to drop a plan half or a deleted item (the api_surface round
  trips; the simd_emulated, extended-range, recursion, dynamic-root, handles, heap-storage-read
  and mesh lowering cases). 6512 remain. engine_graphics_binder.rs and engine_heap_binder.rs keep
  one and two tests and are renamed engine_unattached_colors.rs and engine_heap_groups.rs.
- The runtime guard test's list of files the runtime inputs reach without being inputs drops the
  seven no input reaches since the cut: cache/digest.rs, lower/simd/divergent.rs,
  lower/simd/workgroup.rs, pipeline/artifact.rs, pipeline/layout.rs, pipeline/stage_io.rs and
  pipeline/vertex.rs; three of its reasons that named the plan or the binder say what reaches the file now.

559 public items leave (api_signatures.tsv: 55 structs, 26 enums, 140 variants, 245 fields,
52 methods, 24 associated constants, 7 constants, 5 functions, 5 impls). Consumer search, the
consumer's development at 92ffbed817, `git grep -w NAME` of each of the 112 removed names: 0 hits
for 105; the others are the consumer's own items: TessellationFactors 4 (its
Bound::TessellationFactors), YCbCrMatrix 3 (its own string and doc), texel_rows 2 (its own fn),
ThreadgroupsIndirect 6 (its own Dispatch enums and rt::Dispatch::Indirect), DrawIndexed 1 (a doc
naming MTLIndirectCommandType values), covers 109 and plan 105 (generic words; the `.covers(`
calls are its Extent's, the `.plan(` calls its video encoder's rate.plan). Its one import of
metal2vulkan::bind is the argument-buffer layout types, which stay.

The forms' audit. A texture over a buffer: the runtime's
tests::over::every_device_holds_a_texture_over_a_buffer_in_place. A two-plane YCbCr sample: no
runtime test; the runtime makes no texture of a two-plane YCbCr format (Gap::TextureFormat, the
runtime README's "A format is made where the translator's format table maps it" row), the
conformance cases ycbcr_gathers and ycbcr_textures record Metal's answers, and
known-gaps-rt.tsv lists the runtime's refusals (ycbcr-gathers-*, ycbcr-texel-reads-420v).

Versions:
- RUNTIME_VERSION 2550: it covers plan instantiation and the binder's run-time data. Nothing calls
  those since step 2: the runtime never used the binder, and the own-context executor is gone. A
  run of an unchanged artifact does nothing different, so the guard hash (runtime-sources.sha256)
  moves alone, and the RUNTIME_VERSION doc is rewritten to name what it still covers.
- SEMANTICS_VERSION 2273: no output changes for any input that still exists. The TexelRows and
  YCbCrInPlace forms, their facts, push fields and the two notes were reachable only through
  LoweringInputs::ycbcr_in_place, ycbcr_planes_sampled and texel_rows. Only the binder set those;
  the runtime sets none. The function key appended each of them only when set, so every surviving
  key hashes the same bytes. Two type declarations stay where they were, so module words do not
  move: bool in the bicubic types, uvec4 in the bicubic routines. Byte-identical modules are
  expected, not verified here; the 252-row hash probe is the check.
- ARTIFACT_FORMAT_VERSION 591: the codec tags enum variants by name. The removed RuntimeFact,
  PushField and PrecisionNote variants leave their tags unused, which cache/mod.rs's rule says
  needs no bump: an old entry holding one fails to decode, which is a miss. No codec_struct field
  is removed. That is why SamplerDesc.ycbcr stays.

The guard hash (crates/metal2vulkan-validation/runtime-sources.sha256) moves for the bind/
sources this deletes and edits and for vk/draw.rs, which leaves its list. No run of an unchanged
artifact changes: what stays in bind/ computes what it did (the heap's tier check takes the same
storage format; its removed sampled branch had no caller).

Docs: docs/API.md (section 5 is the interface; the binding and plan sections go), README.md,
docs/ARCHITECTURE.md, docs/HOWTO.md, docs/VALIDATION.md, the runtime README's DrawInput and
identity-domain rows, docs/REFUSALS.md (regenerated; the binder's section goes),
api_reference.md, api_signatures.tsv (blessed: removals only), tests/api_surface.rs, the
signatures floor (5000), the bind modules' own docs, and the public field docs of PushField,
RuntimeFact and SpecKey that named BindState, BindShape or BindingPlan. AGENTS.md: the project
table names pipelines and their interfaces, not binding plans; its "core lives in" line stays
true (bind/ still holds what the lowering reads).

Verified on 31692939d4, this commit's tree (steelbrain/cutbinder-probe-6): job m3-max-68107,
fmt, signatures, refusal surface, clippy -D warnings (workspace plain, --cfg m2v_gpu,
--cfg m2v_cpu_icd; the translator with no feature and with each alone; the AIR crate alone),
workspace Rustdoc -D warnings, each crate's private intra-doc links at 0, api-docs; job
m3-max-68109, the product, validation and conformance suites, doctests, and on lavapipe the
validation and runtime suites under --cfg m2v_cpu_icd, the conformance replay and the public
cases' qualification.
2026-11-22 10:15:34 -08:00
Anees Iqbal 2bbf157668 DevicePolicy::default() is the identity domains; the resident-table domains become RESIDENT_TABLES
What: DevicePolicy::default() now returns the identity pointer and handle domains, the policy
metal2vulkan-runtime compiles under. DevicePolicy::UNTRUSTED is renamed RESIDENT_TABLES. It stays
for the validation executor's own context (candidate/platform/compute.rs and the engine tests
that build a resident root and a handle table themselves) and for the translator's tests of that
lowering, which name it where they took default() before. The runtime takes default() instead of
setting the two fields itself.

Every tool that took default() now compiles under the runtime's policy:
- the command line's --profile;
- the compile worker;
- the authored compile census, the corpus translation audit and corpus-pipeline;
- acceptance, the tier table and specialization attempts;
- the golden table, whose devices take default() (its policy field goes).

Why: the planner's ruling (b), one policy constructor, so a tool and the runtime agree on the
policy. The description can still differ: --profile takes the profile's description, while the
runtime takes the device's, restricted to the features it enables. repro.rs and README say so.

Docs:
- README's --profile paragraph and the command's help text.
- API.md section 1: the identity domains are listed first, as the default; the resident-table
  domains are the validation executor's.
- device/mod.rs, policy.rs and profile.rs.
- api_signatures.tsv renames the const.
- api_preview's buffer carries a device address equal to its gpuAddress, as the runtime makes it.

No SEMANTICS bump. For a given description and policy, the translator's output is unchanged. The
profile fingerprint covers the policy, so every cached artifact and golden cell whose output moves
does so under a changed key; the golden check reads those cells as re-keyed, a bless due. No bless
here.

Consumer search (consumer-uses.sh) at the consumer's development e76e2ffeb4 and 46 lane refs
younger than a day:
- UNTRUSTED, RESIDENT_TABLES, PointerDomain, HandleDomain and from_queries: 0 hits.
- DevicePolicy: 13 lane refs only, all in the deleted runtime's policy struct (fields this tree no
  longer has); none on development.

Expected census at this commit, not yet rerun: m3-max-62608's identity column, taken at
58bea6ca1c through a scratch policy switch.
- Translation audit, of 17,206 rows: 15,176 translated on runtime-floor, 15,266 on lavapipe,
  15,476 on amd-rdna3-radv and 15,459 on nvidia-rtx50-linux.
- Authored compile census: 6,266 of 7,128 cells.

Verified:
- cargo fmt --all;
- scripts/refusal-surface/refusal_surface.py leaves docs/REFUSALS.md as it was.
2026-11-21 02:36:53 -08:00
Anees Iqbal e149088bd0 CLI: --device returns, as the way to compile for a runtime's device
06a35ed9e4 deleted `--device <device.json>` (a ReproDevice: a device description and a policy) on
the premise that only a runtime's FALLBACK bundle would write that file and none does. The
premise missed what the option reproduces: metal2vulkan-runtime compiles with the device's
description restricted to the features it enables and with the identity pointer and handle
domains (crates/metal2vulkan-runtime/src/device.rs, `translator`), while `--profile` always
compiles with the default domains (DevicePolicy::UNTRUSTED). So `--profile` cannot reproduce a
refusal the runtime meets, and `--device` is the command line's one way to: a lane's whole-library
translation of a guest library (job m3-max-61778) ran through it hours before the deletion landed.

This restores 06a35ed9e4's code as it was: ReproDevice (new, to_json, from_json), the command
line's DeviceFile and `--device`, its usage and help lines and the cli test
a_device_file_takes_the_place_of_a_profile. The docs say what it is for now, not a runtime's
bundle: repro.rs's module doc no longer says a runtime may write a bundle (none does), the
ReproDevice doc and the help text name a runtime's compile device and the default domains a
profile takes, and the README's command-line section says the same. The module stays gated on
`cli`, its only user.

Verified: m3-max-61797 (msi) at 26ef12d7a3 (this change on 36e763e80e): clippy -p metal2vulkan --all-targets with all features,
with none and with serde alone, -D warnings, all 0; rustdoc -D warnings 0; the cli binary's 9 tests
pass, a_device_file_takes_the_place_of_a_profile among them.
2026-11-20 22:05:59 -08:00
Anees Iqbal 06a35ed9e4 CLI: the device file a runtime repro bundle held is gone; a bundle holds the profile
`metal2vulkan --device <device.json>` read a ReproDevice (a device description and policy), the
device file a runtime's FALLBACK bundle would hold, and repro.rs said "a runtime may write one
for a library or pipeline creation it refuses". No runtime writes one: metal2vulkan-runtime has
no repro or env_vars use and reads no METAL2VULKAN_* variable (git grep at 5a7c262577), and the
consumer's walks capture refused libraries as replay streams. So the option read a file nothing
writes. Deleted with it: ReproDevice (new, to_json, from_json), the command line's DeviceFile and
its `--device` arm, usage and help lines, the cli test a_device_file_takes_the_place_of_a_profile,
and the README's sentence on it. A bundle now always holds `profile.json`, the file `--profile`
read. The module is gated on `cli`, its only user, rather than `serde`.

The consumer's checkout (reims-vgpu at f8212794e7) names none of it: 0 hits each for
ReproDevice, ReproBundle, shell_join, metal2vulkan::repro, METAL2VULKAN_REPRO_DIR and `--device`.

Verified: m3-max-61727 (msi) at c48e3113db (this change and the README commit after it, on
bcc417bc08): clippy -p metal2vulkan --all-targets with all features, with none and with serde
alone, -D warnings, all 0; rustdoc -D warnings 0; the cli binary's tests and the READMEs' tests,
9 of 9 pass.
2026-11-20 21:44:38 -08:00
Anees Iqbal b14c6a7101 Emulated tessellation goes: a device without tessellationShader refuses the function
The runtime's floor requires tessellationShader, so on every device the runtime opens a
post-tessellation vertex function runs through the device's tessellation stages. The emulation
was a second form: it ran the function as a plain vertex stage that drew Metal's tessellator's
triangles itself, from the draw's records, which a compute scan wrote before each patch draw. Now a
device without tessellationShader refuses the function (Unsupported{Tessellation}, needing
VkFeature::TessellationShader), and the command line answers FALLBACK there.

Removed:
- lowering: lower/tessellation/{emulated,tessellator,work}.rs, wrap_entry, Emulation, emulates;
  EvalPlan's base_instance and emulated; Declared's emulated globals; the emulated
  [[base_instance]] source; PushField::TessellationChunk; stage_io::primitive_id_varying.
- pipeline: EmulatedTessellation, GraphicsState::emulated_tessellation, TessellationStage::emulated,
  LoweringInputs::tessellation (and InputsFrom::Vertex's tessellation field and its key bytes),
  link's emulated_state, RuntimeInput::TessellationDescriptor, SyntheticBinding::TessellationWork
  and TessellationRecords; primitive_id_carried_on is primitive_id_varying_on again.
- binder: bind/tessellation_scan (tessellation_scan_module, TessellationScanKernel,
  TessellationScanModule), TessellationDispatch, TessellationRecords,
  DrawCommands::tessellation_dispatch, WriteSource::TessellationWork and TessellationRecords,
  StatusBits::TESSELLATION_RECORDS_OVERFLOW and RECORDS_FAULTS, StatusReport's
  tessellation_records_overflow and TessellationRecordsFault. FactorTemplate keeps only the
  control stage: FactorSite goes, and its fields are push_offset and factor_binding, with the
  patch index binding always present. The mesh scan's first-fault test reads its own bit. Bit 8
  of the status word is unreported.
- tests: tests/tessellator (the emulated tessellator against its model), the emulated tests in
  engine_tessellation (now asserting the refusal on profiles without the feature), the emulated
  fixtures in api_tests and graphics tests, owned_divisions' scan sweep, and api_surface rows.
  The key test keeps its native half: a vertex function's key is the same for every
  tessellation state.
- validation: build.rs's runtime inputs lose tessellator.rs and work.rs (factors.rs stays: the
  binder sizes factor ranges by factor_bytes). The acceptance and coverage tests expect the typed
  refusal on roadmap-2022, vk12-floor and swiftshader.

Docs: README and the command's help say a post-tessellation function needs tessellationShader;
API.md's tessellation section states the refusal; the two tessellation precision notes no longer
mention the emulation; docs/REFUSALS.md and api_signatures regenerated (Tessellation now names
VkFeature::TessellationShader instead of MaxStorageBufferRange).

SEMANTICS_VERSION 2220 is in this commit (placeholder; main renumbers): what the translator emits
for a post-tessellation function on a device without tessellationShader changes (a refusal), and
the vertex key loses the tessellation state. ARTIFACT_FORMAT_VERSION 564: the codec loses
EmulatedTessellation, TessellationStage::emulated and three enum variants. RUNTIME_VERSION stays
at this series' 2543. The runtime pin is updated.

Consumer check (consumer-uses.sh):
consumer: development 7ea4edc2fb; 72 refs (development + steelbrain/* younger than a day)
TessellationDispatch: 0 hits (code); link-order lists only
TessellationRecords, TessellationRecordsFault, tessellation_scan_module, TessellationScanKernel,
TessellationScanModule, TESSELLATION_RECORDS_OVERFLOW, RECORDS_FAULTS, tessellation_dispatch,
TessellationWork, EmulatedTessellation, emulated_tessellation, TessellationChunk,
RuntimeInput::TessellationDescriptor, scan_kernel, max_patch_triangles, wrap_entry, FactorSite:
0 hits (code)
tessellation_records_overflow: 0 hits on development. It is USED on consumer lane branches
(steelbrain/quiesce and others), but only as the name of a local function in
reims-vgpu-vulkan/src/gpu/command.rs, which answers the old runtime's
CommandBufferError::TessellationRecordsOverflow. It does not read this field, and this tree's
runtime has no such error.

Verified: nothing yet (a compile job is owed).
2026-11-20 15:26:56 -08:00
Anees Iqbal fce83ac2cf Docs: what the runtime does now, where a line named the deleted one
The rename gave metal2vulkan-runtime to the new runtime, so every line
written while the name meant the deleted runtime read as a claim about
the live one. Each was read against the new runtime's code:

- The precision notes no longer say the runtime announces a kind or a
  code of its own (it announces none; the conformance suite maps notes to
  codes), nor what a device Device::new made records (only
  Device::from_queries remains). The notes the runtime carries stay:
  DepthStencilState::precision_note, RenderCommandEncoder::DEPTH_BIAS_NOTE,
  BlitCommandEncoder::GENERATE_MIPMAPS_NOTE,
  RenderPassDescriptor::precision_note, Texture::precision_note.
- An inert kernel's dispatch: the runtime records it like any other.
- API.md: the runtime takes no unit-axes variant, and runs a
  partition-oblivious kernel's every direct dispatch in its tiles (from
  the runtime's pipeline module docs).
- The translator's profile docs: no runtime announces mesh draws, reads
  YCbCr in-place facts, keeps a bind-offset key or runs a view check.
- An aliased-import defect: the runtime has no use_host_ram.
- derive.rs: no runtime reads the allocation limits.
- texel_rows.metal names the test that runs it now (aliased_encoders).
- docs/RUNTIME-PORTING.md is deleted with its README row: 216 of its
  351 runtime items no longer exist, and each runtime item's rustdoc
  names its Metal counterpart.
- CHANGELOG 0.2.0: no fast-path switches, announced codes or
  queue-switch check.

Not built yet; the gate for the whole pass follows.
2026-11-20 10:27:17 -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 aaa3213887 Translator cutover: first trial-compile fixes (imports, the half pair, push tests, removed routes) 2026-11-20 09:08:20 -08:00
Anees Iqbal 53f3e522e9 API.md: section 9 is the catalogue of the precision notes rt carries
Section 9 was the deleted runtime's notice catalogue: its message sink, announce_each,
lowering_refuses, DegradeNotice, exactness(), degraded_objects and the METAL2VULKAN_LOG_*, DUMP,
QUEUE_TIMES, PENDING_AUDIT and ENCODER_* diagnostics, none of which rt has.

- The intro now states rt's model as its code has it. Each note is fixed per operation (module,
  pixel format, descriptor or state) and given through six accessors: ComputePipelineState and
  RenderPipelineState::precision_notes, Texture, SamplerState, DepthStencilState and
  RenderPassDescriptor::precision_note. Two constants carry notes too:
  BlitCommandEncoder::GENERATE_MIPMAPS_NOTE and RenderCommandEncoder::DEPTH_BIAS_NOTE. A note
  is never fatal, and rt prints and sends none (its non-test sources hold no eprintln, log or
  sink); the consumer reads them.
- The 87 entries whose code a PrecisionNote variant backs stay. Their text no longer names the
  deleted runtime (compressed-texel-decode, bicubic-filter-arithmetic,
  swizzled-opaque-black-border). Their trigger is rt's where the deleted runtime's stood beside
  it (device-filtered-mipmaps, shared-exponent-kept, compressed-texel-decode). They no longer
  say when a deleted runtime announced the note, and they drop the blit, fill and clear parts
  that only that runtime noted (shared-exponent-kept, device-nan-encoding,
  device-color-conversion, device-pack-conversion). Their driver-fact text is left for the
  translator-switch commit.
- The 165 entries no note backs go: 59 performance, 104 precision and 2 validity kinds of the
  deleted runtime.
- Section 8's last paragraph names metal2vulkan_rt::Error, REFUSALS.md and rt's README. The
  guide's opening line and README's row say precision notes.

tests::fast_paths reads the catalogue only for the codes of its ledger notes, all PrecisionNote
codes, which stay. Section 10 still names some deleted codes; that is a follow-up.
2026-11-20 08:01:21 -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 737ccbf81a metal: the resource ID word, its spec and test vectors
Under the identity binding domains a guest computes a texture's or sampler's gpuResourceID itself,
with no round trip: the index the consumer grants in the low 32 bits and a word in the high 32 bits
that is a pure function of the Metal descriptor. The guest's port needs the word specified and a
file of vectors both sides check.

- metal::resource_word::TextureWord::of(pixel_format, swizzle): bits 0-11 Metal's border texels
  after the swizzle (the existing border_texels rule), bit 12 the out-of-bounds alpha of a format
  without alpha, bits 16-31 the MTLPixelFormat raw value, so a texture's word is never 0. None for
  the placeholders and the formats the translator holds no texture of or only copies.
- The sampler word is the existing SamplerWord, unchanged.
- docs/RESOURCE-ID.md: the ID's layout, the index classes (0 nil; storage-capable textures 1 to
  4,095, valid in both arrays; other textures 4,096 to 65,535; samplers 1 to 3,999), both words'
  bits and the level rule, and the vectors file. README's documentation table lists it.
- crates/metal2vulkan/tests/resource_words.tsv: 392 vectors (every pixel format with a word under
  the default swizzle, each channel of seven formats from each other source, every sampler field
  through its values, the level clamps around the points the nearest level turns at, and one
  descriptor with every field changed). tests/resource_words.rs recomputes every line through the
  public API and holds the file equal to what the generator writes; an ignored test blesses it.
- api_surface lists the new module; api_signatures regenerated.

Verified:
- msi job 40810 at the same tree: clippy -p metal2vulkan --all-targets --all-features -D warnings,
  rustdoc -D warnings, nextest 18 of 18 (resource_words, the TextureWord unit test, api_surface,
  api_signatures).
- msi job 40811 at the same tree: clippy under --cfg m2v_gpu and --cfg m2v_cpu_icd.
- msi job 40809: the bless test wrote the vectors; the combined sampler line (0x58f6ab53) and the
  A8Unorm and R8Unorm texture lines checked by hand against the bit tables.
2026-11-17 07:01:32 -08:00
Anees Iqbal ab139e4b6e RUNTIME 2366: Runtime FALLBACK repro bundle at a creation refusal (default-off diagnostic)
What: metal2vulkan-runtime writes the FALLBACK repro bundle the command line
writes for its own failures when it refuses a library or pipeline creation,
where METAL2VULKAN_REPRO_DIR names a directory (unset, nothing is written).

- The CLI's bundle writer moves into the library as the hidden crate-root
  module metal2vulkan::repro (feature serde), shared by the binary and the
  runtime. A bundle's directory is named by its content
  (metal2vulkan-repro-<16 hex>), written under a temporary name and renamed,
  so an identical failure is written once, across threads, processes and
  runs. The CLI's own bundles keep their files (input, profile.json, the
  descriptor files, repro.sh, repro-command.txt, failure.txt); only the
  directory's name changed, so a bundle written before still replays.
- The CLI takes --device FILE in place of --profile: the JSON of a
  DeviceDescription and DevicePolicy (ReproDevice), which builds the
  runtime's own compile device.
- The runtime hooks each creation where its refusal returns: a library of a
  metallib, a function's lookup, every compute and tile state
  (ComputePipelineState/TileState::create_adding: creations, added binary
  functions, archive adds) and every render state
  (GraphicsState::create_reflecting). It bundles Unsupported, NotImplemented
  and Compile refusals but a cancelled compile and a name the library lacks
  (Metal's own nil); never Invalid/Nil/MetalError. The bundle holds the
  library's bytes, device.json, the request as the CLI's options and
  descriptor files, and failure.txt with the call, the refusal and what the
  command does not replay. That list comes from a full destructuring of the
  compute, tile and render descriptors (and the stage functions): a new
  descriptor field fails to compile in repro.rs until it is replayed or
  listed.
- Bounded: at most 32 bundles and 256 MiB per process; past either nothing
  more is written and one line says so. Written on the refusing thread; the
  call returns the same refusal; a write failure is said once. Each bundle
  is named in one line through the device's message sink (id name
  metal2vulkan-repro). The runtime's metal2vulkan dependency gains serde.
- Not bundled: mesh states (no CLI mesh path), a dispatch's or draw's later
  variant, driver VkPipeline makings, Metal-source libraries.

Docs: env_vars registry, README CLI, docs/HOWTO.md section 4, the runtime
README's Errors section, the CLI help.

Tests: runtime CPU tests of the bounds (a tally with the seam's limits);
a lavapipe/GPU device test (ob3_stage_input with no stage-input descriptor:
one bundle with the expected parts and command, device.json rebuilding the
runtime's compile device by profile fingerprint and answering the same
refusal, none for a second identical refusal or a missing name, none
without a directory); CLI tests replaying library-written runtime bundles
(compute, and render with a vertex descriptor) through repro.sh to the same
FALLBACK, and --device compiling what --profile does.

Verified at ae56b195e9 (msi, m3-max-32986): metal2vulkan cli,
api_surface and api_signatures 25 passed; runtime repro tests 9 passed;
clippy -p metal2vulkan -p metal2vulkan-runtime all targets, all features
0. Lavapipe (m3-max-32978): repro_device writes one bundle that the
CLI replays to the same refusal; a second identical refusal writes
nothing.
2026-11-15 10:14:52 -08:00
Anees Iqbal d6d695d951 Link the tests' and the tool's void vertex functions unrasterized, as Metal makes them
m3-max-5121 (the whole metal2vulkan suite at ffc6619794) failed eight tests
on the link's RasterizedVoidVertex refusal:

- five link tests (render.rs) replaced a vertex stage's io with one that
  writes no position; they now keep the position (positioned);
- engine_link's graphics-state test linked ob3_index_buffer, a void vertex
  function, rasterizing; it now links it with rasterization disabled, the
  one form Metal makes of it;
- the command line compiled a void vertex function with no fragment as a
  rasterizing pipeline (cli's ob3_vertex_input test): with no --fragment
  it now asks whether the vertex function returns a value and compiles a
  void one with rasterization disabled (README says so);
- the new link test ran on vk12-floor, whose vertex stage stores nothing,
  as the void function does; it runs on lavapipe's profile.

(cherry picked from commit 5da2f008274b04019121fe173adb98efa4f3ec26)
2026-11-07 14:02:59 -08:00
Anees Iqbal adef203530 Describe each driver deviation's route as the code takes it now
One work packet, landed as 10 commits (262093ec48..8e4bfa28b4 on archive/development-linear-2026-10-28), in order:

* Describe each driver deviation's route as the code takes it now

The DriverDeviation, VkProperty and driver-table docs still named the
exact emulations the native-arithmetic change sets deleted (Metal's
libm, division, denormal flushing, NaN selection, min/max picks, the
emulated sampler, the color, storage and Depth16 write roundings, the
depth stand-in). Each variant's doc now says what a profile that takes
it gets and what one without it gets: the device's own answer with the
precision note recorded, or, where a capability hangs on the answer, its
emulation or refusal.

- error/mod.rs: DriverDeviation's header and the float-function, NaN,
  sampler, color-write, FMA, denormal, quantize, min/max, half
  arithmetic, storage-write, texel-write and Depth16 variants.
- device/requirements.rs: the matching VkProperty docs; MetalColorWrites
  says no module requires it (compile.rs never adds it), and
  MetalHalfQuantize drops the clamp claim the code does not make.
- device/driver_facts.rs: the table preambles and measurement paragraphs
  (docs and citations only, no row or variant changed); the deleted
  resolve_rounding::color_resolves_against_metals_rules citation now
  names the_device_resolve_rounds_as_announced, which holds the row.
- runtime_lane/heap_textures.rs: heap_depth_textures_keep_their_bytes,
  renamed from ..._with_their_twins (no twin exists), with the two
  driver_facts.rs citations updated.
- lower/texture/mod.rs and pipeline/compile.rs: the storage_properties
  doc and comment list the four properties select_write relies on,
  dropping the 0x7fc00000 store.

Verified by reading each route in lower/ (narrow, fma, denormal, nan,
arith, sampler, stage_io/color_write, texture) and pipeline/compile.rs,
and by git grep for every cited test and item.

* Describe the pixel samplers, routines and color-write inputs as they run now

Translator docs that still described the deleted emulated sampler, the
cube face fold routine, the compiler-word-bound fit and the shader's own
color-write rounding:

- pipeline/artifact.rs: PixelSamplerScaling no longer names a linear
  sample's emulation or a MetalSampler condition; a runtime word's linear
  pixel sample snaps onto its footprint cell on every device
  (position::plan plans SnapKind::WordCell with no device test), a word of
  mixed filters is the device's. ArgumentPixelSamplerScaling says it is
  recorded on every device for any access but a 2D gather and a sample
  without a comparison, as select.rs pixel_note does.
- lower/sampler/select.rs (pixel_note) and lower/sampler/mod.rs
  (RuntimeSlot::cells, ::texels): the cell snap holds on every device; the
  slot's word filter fields are read for a half texel's conversion alone,
  on a MetalSampler device (half_converts requires !device_texels).
- device/profile.rs: FunctionsInlinedAtEveryCall lists the routines that
  exist (wide-integer divisions, precise fmod, texel conversions, filter
  sums, sampling routines; no face fold); takes_driver_deviation names the
  route a deviation's docs give for a driver without it.
- error/mod.rs: RuntimeInput::ColorWrites says what the color-write map
  decides (the conversion that records a note, and NearestEven's half
  rounding), not a rounding of every output.
- bind/color_resolve.rs and its tests: drop the citation of
  resolve_rounding's cost test, which is deleted.
- device/mechanism.rs: drop the trailing comment on the deleted
  ExactFormsOverCompilerLimit fact.

Verified by reading position::plan, select.rs pixel_note and the
half_converts branch, spirv/builder/module.rs's routine kinds and every
mb.routine site, pipeline/color_writes.rs, and git grep for each cited
item.

* Describe texel conversion, YCbCr filtering and depth comparison as the device's

Translator docs still named the deleted linear-filter emulation, the
shader's own depth comparison and the depth twin:

- lower/texture/half.rs: off MetalSampler devices the device's sampler
  filters and the half is its float texel rounded to nearest even
  (device_texels), not this routine's; the only fetch-computed filter that
  skips the routine is the in-place YCbCr one.
- lower/texture/mod.rs (half_texels): drop the example of a runtime
  sampler's sRGB raw-code emulation for the `arm` clauses.
- metal/format/mod.rs: a two-plane YCbCr texture's linear sample is the
  device's filter, noted, but where its planes are read in place.
- pipeline/artifact.rs (RestrictedDepthRange) and lower/texture/slot.rs
  (depth_comparison): every comparison is the device's; no shader-made
  comparison is left to exclude.
- lower/sampler/select.rs: a depth comparison reads the texture's own
  depth image (no twin).
- lower/sampler/mod.rs (Sampling::words): list the terms plain_words
  sums; no linear emulation, level grid or shader comparison term exists.

Verified by reading device_texels, half_texels and both its callers,
linear.rs filter_note and metal_filtered_ycbcr, depth_comparison's one
caller, in_place.rs, and plain_words.

* Describe the runtime's YCbCr filter notice and variant kinds as they fire now

- degradation.rs: YCbCrFilterNotExact fires on a device that samples
  through Metal's own sampler alone (linear.rs metal_filtered_ycbcr is
  None elsewhere), where the stage records HalfSampleFilter or
  FloatSampleFilter for any two-plane YCbCr format bound; a native sampler
  announces device-sampling. The module doc drops the exact forms dropped
  to fit a compiler word bound, whose kind and fit are deleted.
- ycbcr.rs: linear filtering of the converted texels is the device
  sampler's (Metal's own on MoltenVK, announced ycbcr-filter-not-exact);
  only planes read in place are Metal's filter exactly.

Verified by reading lower/sampler/linear.rs, in_place.rs and the runtime's
Kinds::of and degrade_bound_formats.

* Describe the lanes' and cases' native forms where they named deleted emulations

Docs and comments only; no expectation changed.

- validation runtime_lane/driver_deviations.rs: the half quantize,
  min/max, half arithmetic and half widening bullets say what the module
  does off the deviation (the device's own conversion or quantize, the
  same NMin/NMax/NClamp noted native-min-max, narrow::from_bits' decode),
  not the deleted integer rounding, operand picks and exact_answers
  decode.
- validation observation_contract/comparison.rs: HalfSampleFilter and
  FloatSampleFilter are a YCbCr texture through Metal's own sampler.
- validation runtime_lane/pixel_samplers.rs, conformance
  cases/pixel_samplers.rs: the pixel coordinates reach Metal's texels
  through the translator's snaps, filtered by the device's sampler.
- conformance cases/snorm_tile_store.rs: no exact tile store and no
  FAST-PATHS row; only extended-range, padded and bfloat attachments take
  a load pass.

Verified by reading the lanes' assertions, select.rs pixel_note,
position::plan and narrow.rs.

* State the native forms in the doc pages where they promised exact switches

- README.md: the promise that every speed-for-accuracy choice has an
  opt-in exact switch was false for the device's maths, rounding,
  conversions and sampler, which have none; it now says those are the
  device's, recorded, and the runtime's choices keep their switches.
- docs/API.md: exact_answers selects the runtime's five switches (as
  policy.rs's exact_answers sets them), not exact forms of the native
  arithmetic; an unmeasured driver takes each deviation's documented
  route, not a conservative one; half widening's NaN and denormal are the
  device's under its own conversion or the float controls; Depth32Float
  texels are the depth image's, announced where it clamps or flushes; the
  catalogue intro names the native forms.
- docs/ARCHITECTURE.md: the native forms are the device's on every device
  with no policy choice; the policy's accuracy switches are the runtime's.
- docs/FAST-PATHS.md (after the opening section): a YCbCr texture's image
  form holds Metal's texels exactly and its linear sample is the device's
  filter; only the in-place form is Metal's filter.

Verified against device/policy.rs, lower/arith/narrow.rs, the depth twin's
deletion (c11e653acd) and lower/sampler/linear.rs.

* Drop the exact golden table from VALIDATION.md's emitter-stability contract

4bf2c22aad deleted golden_hashes_exact.tsv and its table in
golden_hashes.rs; VALIDATION.md still described a second table of every
sampling fixture under exact_answers. The contract now names the one table.

Verified: crates/metal2vulkan/tests/ holds golden_hashes.tsv alone, and
golden_hashes.rs names no exact table.

* Re-pin the runtime sources after the doc audit

The audit's commits edit doc comments and comments only in files the
runtime guard hashes (degradation.rs, ycbcr.rs, and translator files the
build lists); no run's behaviour changes, so RUNTIME_VERSION stays.

Verified: the_runtime_sources_are_the_committed_ones failed with 81ebd500
committed against 8bc0e06b computed, and passes after this pin.

* Drop the 0x7fc00000 hand-off from half_write_nans_converted's doc

a6e97e7f93 deleted the NaN canonicalization before storage writes
(StorageImageClass::SmallFloatQuietNan among it): a half write to a
packed small float hands the device the half widened, as to a 16-bit
float channel. The doc still said such a write hands it 0x7fc00000, and
tied MetalHalfTexelWrites to both kinds, where it states the 16-bit
float store alone (lower/texture/mod.rs half_write_nans).

Verified by reading half_write_nans and the write emission
(lower/texture/emit.rs), which canonicalizes no small-float NaN.

* Re-pin the runtime sources after the half-write NaN doc fix

metal/format/mod.rs is a runtime guard input; the preceding commit edits a
doc comment there alone, so no run's behaviour changes and RUNTIME_VERSION
stays.

Verified: the_runtime_sources_are_the_committed_ones failed with 8bc0e06b
committed against 279b25d4 computed, and passes after this pin.
2026-10-28 17:24:21 +02:00
Anees Iqbal 48bf2286bd Take the test line back out of the README
Content: the tree of `development` at 2839e1fe31, unchanged.
2026-10-26 13:19:13 +02:00
Anees Iqbal 0cb3502553 Sweep every 32-bit integer vertex and attribute format, which needs an integer-declared attribute
The steps this packet landed as, in order:
- Name the store actions and resolve filters the pass sweeps already put to Metal
- Name the filter sweep's sites after the attachments' own filters, not the row's unrotated ones
- Read the function type of a mesh pipeline's own two stages
- Read the function type of a visible function, which is a callee rather than a stage
- Give the wide stage-in attribute its own entry point, so stage_in_fetch keeps its four
- Reflow the import lists the rebase resolution unioned

Content: the tree of `development` at be60af4862, unchanged.
2026-10-26 13:19:13 +02:00
Anees Iqbal 615be46647 Mark the README's library sketch as the uncompiled sketch it is
Content: the tree of `development` at 6a35eddd48, unchanged.
2026-10-26 13:19:08 +02:00
Anees Iqbal ea89d3f8ed Mark the project beta in the README
The README's status notice said alpha; the user moved the project to beta. The rest of the notice
(the API, command line, pipeline JSON and SPIR-V may change during 0.x) stands.
2026-10-17 06:44:08 +03:00
Anees Iqbal 0175289314 Batch the development-fast round: tessellation without tessellationShader, primitive ids, mesh tooling, color groups, the vk12 floor, runtime timing and teardown fixes
One commit of the 247 on development-fast (720ef1ce9a..9f46fdf80d), squashed at the user's request.

Translator:
- Tessellation on a device without tessellationShader: Metal's tessellator emitted as SPIR-V, a
  one-workgroup scan placing each patch's triangles in Metal's order, and the post-tessellation
  function as a plain vertex stage (EmulatedTessellationDraws; SEMANTICS 1739, ARTIFACT_FORMAT 419).
- [[primitive_id]] on a device without geometry or tessellation shaders, as a flat varying the
  vertex function writes; indexed lists, lines and points drawn de-indexed (RuntimeGap::PrimitiveIdIndices).
- Fragment functions of more colors than the device draws at once, compiled in color groups
  (PrecisionNote::ColorAttachmentGroups).
- Object functions' threadgroup memory from the render encoder; a kernel's mesh draws from an
  indirect command buffer; mesh payload sizing.
- The Vulkan 1.2 floor profile (vk12-floor) and the gates it needs; Metal 27.0.1 answers as the M3 Max.
- Overflow tests in the runtime-built modules by the product's high word (NVIDIA's compiler fails
  the division form), guarded crate-wide by tests::owned_divisions.

Runtime:
- Color-group passes replayed per group over twin depth/stencil; snapshot and copy-back cost cuts.
- Command buffers finish on the queue waiter that saw them; the waiter holds no device handle, so
  a program's drop after its wait is the device's last.
- Every object an encoder was handed held until its command buffer completes; deallocator order
  and announcements.
- Driver defects recorded and announced: ANV counts a visibility sample once per color output
  (visibility-count-per-color); MoltenVK fails pending work when memory that held a device-address
  buffer is freed, so freed memory waits for the work in flight (host-deallocator-delayed).
- RenderCommandEncoder::set_object_threadgroup_memory_length; Visibility::counting().

Validation: mesh tooling (object, mesh and ICB-mesh cases on both executors), the authoring
census closed, the queue storm judged in Metal's unit, load-robust exits and indirect-census
bounds, and the golden hashes, printouts, fixture inventory and authored compile census blessed.

Docs: FAST-PATHS.md trimmed to a ledger of what is true now; API.md's catalogue and accepted
differences, REFUSALS.md and METAL-COVERAGE.md current.

Verified on development-fast before the squash: the full suites on the RTX 5080, RTX 3090,
RX 7900 XTX, Radeon 780M, Iris Xe, lavapipe and the M3 (MoltenVK and the Metal oracle), lint in
every configuration, rustdoc, doc tests, packaging and public case qualification; the timing and
teardown lanes x5 on every venue; the authoring-capability census 16656/16656 with 0 unresolved,
the vk12-floor translation census at 6139 translated with the slowest row 794 ms and peak 126 MiB.
The tree is development-fast's at 9f46fdf80d.
2026-10-16 11:12:03 +03: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 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 9ff250502c Make exact kernel grids safe by default
Model kernel dispatch geometry as a typed contract shared by lowering, reflection, validation, and the CLI. Cull surplus dispatchThreads invocations using fixed or reflected push-constant grid bounds, make that safe dynamic-grid path the default, and require an explicit whole-workgroup assertion to omit it.

Reject unsafe source-barrier kernels before every product emission facade by following the selected AIR entry graph, including quoted LLVM symbols. Exercise the same default contract in authored candidate validation and document the host ABI.

Keep corpus audit parent concurrency bounded by feeding isolated translation workers from scratch-backed stdin files instead of creating one feeder thread per row. This removes the scoped-thread exhaustion that aborted late full censuses while retaining child decoding inside the time and memory watchdog.

Verified with format checking, warnings-denied workspace clippy and Rustdoc, validation tests at concurrency 16, the unchanged downstream repro, a forced 88,819-row audit completing in one invocation at jobs 16, failure retries, and a zero-read warm pass.
2026-08-22 02:16:13 +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 75d3d39d05 Document Apple trademark notice 2026-07-23 19:54:20 +03:00
Anees Iqbal 3007485352 🆕 Open Source metal2vulkan 2026-07-22 13:15:24 +03:00