What: the translator's binder (bind/plan/compute.rs, bind/graphics.rs) now answers
Unsupported{IdentityDomains; NotImplemented} for every push field that only the identity domains
emit and that no binding state holds:
- a texture's or sampler's resource ID, PushField::SlotGuestBase of a Texture or Sampler slot;
- PushField::ConstexprSampler;
- on the render side also PushField::FetchedColor, TessellationFactorAddress, IndirectRange,
IndirectSequence and IndirectBase, and PrivateArenaAddress beside ZeroAddress and BicubicTexels.
Before this, a compute plan of an identity pipeline that samples a texture failed with the internal
invariant "a compute push field SlotGuestBase(SlotRef { stage: Kernel, class: Texture, index: 0 })".
Why: one of (b)'s reds, api_preview_example::the_api_preview_example_runs. The example planned
an identity-domain pipeline through the binder, which plans only the resident-table domains.
Can rt's make reach it: no. metal2vulkan-runtime never calls the binder: it has no
pipeline.plan, BindState or BindShape call; it pushes these fields itself. The refusal is reached
only by a consumer of the translator's binder who plans an identity-domain pipeline. That is why
the form is in docs/API.md, the binder's guide, and not in the runtime's known gaps.
The example and the guide:
- examples/api_preview.rs opens a runtime_device, the default policy, and prints its profile.
- Its tour device, committed_device, takes DevicePolicy::RESIDENT_TABLES, because its binding plans
are the binder's.
- docs/API.md says so after the Device paragraph and lists the refused fields.
The golden storage pair: golden_hashes_match_the_table's check_storage_pair reads the observed
cells, so a bless alone does not satisfy it. Its rule changes to what the identity domains answer.
On the 7 profiles whose bgra8 is not storage-capable (amd-rdna2-apu-radv, intel-arl-anv,
intel-irisxe-anv, intel-irisxe-rplp-anv, intel-uhd770-rpls-anv, nvidia-pascal-linux,
runtime-floor):
- The bgra8 cell is Unsupported{IdentityDomains; NotImplemented} on all 7. Its choice is
StorageImageClass::SwizzleBgra, state of the bound texture beyond its resource ID. This is not
the formatless storage row.
- The rgba8 cell is that refusal on 4: intel-irisxe-anv, intel-irisxe-rplp-anv,
intel-uhd770-rpls-anv and runtime-floor. These lack shaderStorageImageReadWithoutFormat, so the
read-write choice there declares the format, a storage image the identity arrays hold no
element of.
- On amd-rdna2-apu-radv, intel-arl-anv and nvidia-pascal-linux, which read and write storage
without a format, the rgba8 choice declares none and compiles.
Both refusals have the symbol "texture argument S: a type the identity arrays hold no element of,
or state of the bound texture beyond its resource ID", a form the runtime's known gaps list. Each
cell arises only because the golden table supplies a storage_images input that names the bound
format. The runtime never gives one: its slot stays the write that the floor's
shaderStorageImageWriteWithoutFormat takes. So a guest meets neither refusal.
Tests (engine_identity.rs), each failing without the change:
- the_binder_refuses_a_texture_and_sampler_slots_resource_ids_typed: sample_level on moltenvk-m3
under the identity domains, planned with a buffer, a texture and a sampler bound, answers
BindError::Unsupported (IdentityDomains, NotImplemented), not an internal error.
- a_storage_choice_the_identity_arrays_hold_no_element_of_is_refused_naming_the_texture_argument:
on every committed profile, for bgra8 and rgba8, the storage_texture_write compile under the
identity domains, given the format's storage choice, compiles where the choice is the format's
own image declared without a format. Elsewhere it is refused naming the texture argument and
"beyond its resource ID". It asserts at least one compiled, one swizzled and one declared case.
Runtime sources re-pin: the binder is a runtime input of the validation crate's guard, so
runtime-sources.sha256 moves from 47fe413580a9... to 38223c0cc84f17c0bc78a52f216dba49f5bf27655911b528c9cde82d6dcff0b6. The value is
the one the guard test computed at this tree's inputs (m3-max-62914), and development's commits
since then touch none of them. No run's behaviour changes and RUNTIME_VERSION stays:
- the new arms answer only fields that identity-domain compiles push;
- the validation executor plans through the binder only on its own context, under
RESIDENT_TABLES (candidate/platform/compute.rs), whose compiles hold none of them.
Verified, at the same change on f61383d22b (development's commits since then touch none of
these files):
- cargo fmt --all;
- m3-max-62965, the metal2vulkan suite and doctests at 34ec190bc1: api_preview_example,
engine_identity's binder test and every other test passed except the four bless-owned reds:
the render key, the AIR printout, the public-fixture inventory part 4 and golden_hashes;
- m3-max-62991 at 2f29bccef0, which adds this commit's check rule and the generalized storage test:
fmt and clippy rc 0, and 5 of 6 targeted tests passed (the storage-choice test, the binder test,
api_preview, engine_profile_f, engine_air_2_1). golden_hashes_match_the_table passes
check_storage_pair on all 7 columns and stops at the table's staleness, the bless due
(29,712 cells under a changed profile fingerprint, 80 new);
- m3-max-62914 computed the runtime-sources value above.