Files
metal2vulkan/docs
Anees Iqbal a89e4c0838 identity domains: the constant blob is the module's own words; rt's two constant-data gates go
Under the identity domains a function binds no descriptor, so a function reading the constant
blob was refused ("a resource bound through a descriptor"): the 16-byte blob of two ushort3
function constants read as half3 (as_type, folded by LLVM into a <3 x half> load of the
<3 x i16> constant, which fails the typed-access test) refused a consumer's kernel on both
records.

There the blob is now a Private u32 array whose initializer is the blob's little-endian words,
zero-padded to 16 bytes as a bound blob's range is (memory::blob, BlobHome::Module). The blob's
existing word-composed leaf loads read it, every load checked against the array's length (no
robustness covers Private memory); use_blob counts no descriptor and the artifact carries no
blob, so no stage has a constant_blob. Off the identity domains nothing changes (BlobHome::Bound).
The module's blob counts in the plan's private bytes where an access reaches it at an offset only
the run knows, as a run-time-indexed Private constant does, and its declaration's words count in
the size estimate.

The bound is memory::blob::MODULE_BYTES = alloca::MAX_UNSHARED (64 KiB), the most the typed
objects of one function may declare: a typed constant up to that size is already a Private
variable with its initializer, so the module's blob gives the make no larger initializer than
one of those. Past it the identity refusal names the kind, "constant data of N bytes read through
memory", in place of the descriptor catch-all.

rt: nothing reaches its two gates on constant_blob now (rt always compiles under the identity
domains, and the linked stages' constant_blob is None), so interface()'s Gap::KernelInput for
it and RenderPipelineKind::ConstantData are deleted, with the README's two mentions and the
variant's row of the API signature table. docs/REFUSALS.md regenerates unchanged (the variant was
in no section); no crate-root item changed. SEMANTICS_VERSION 2199: identity modules and refusals
change; the encoding does not. The old runtime's render descriptor key, which hashes the version,
is pinned at its 2199 value.

Tests: engine_identity's blob_words kernel reads the records' half3-of-ushort3 load and 2-byte
units at run-time offsets, one past the words: under the identity domains no descriptor, no
artifact blob, private bytes +32, L3, and the CPU interpreter's answers (zero past the words);
the default domains bind the same 24-byte blob. blob_past (a 65,600-byte blob) is refused naming
its size where the default domains bind it.

Verified: see the check job named in the landing.
2026-11-20 00:28:33 -08:00
..