Files
metal2vulkan/crates
Anees Iqbal 3cdca62567 identity domains: a loaded or converted pointer is the device address it holds, no root table
rt answers MTLArgumentBuffersTier2 and refused the tier's basic buffer member: a kernel reading
two buffers through an argument buffer's pointer members, and one reading a buffer through a
gpuAddress the CPU wrote into a constant buffer, were both "Unsupported{IdentityDomains} (an
encoder value the function reads as RootTableAddress)". A pointer loaded from memory or made
from an integer is a wide pointer, which the resident-table domain resolves by searching the
root table's resident set; the identity domains push no root table, so the gate refused it.

Under the identity domains a pointer is the device address of the byte it names, so a wide
pointer there is (0, a, 0, 0) for address a, the form of a miss of an empty table: a loaded word
or an inttoptr operand is the pointer itself, with no search, a wide buffer parameter is its
slot's address (SlotGuestBase with the bias added back), its Metal address is `at`, and its
accesses are at host + at = a, unchecked and uncounted (a stored address is used as it is; there
is no resident set to miss). Nothing pushes RootTableAddress or ExecutionStatusAddress for it.
An escaping slot root stays static there, as on Profile F, which has no root entries either: a
slot pointer converted to an integer or stored through a static destination is SlotGuestBase
plus its displacement, and the slot's run-time accesses keep their SlotBounds check.

The same gate lifts the texture behind an argument buffer's pointer member (ab_tier2's
ab_indexed) and a kernel that converts a slot pointer to an integer. A slot pointer stored
through a loaded pointer or into an open pointer cell stays refused, as on Profile F
(Unsupported{Lowering(Access)}). Every branch is under the identity domains: the default
domains' modules are unchanged. SEMANTICS_VERSION 2202: these refusals become modules.

Tests: engine_identity_pointers (ab_sum, ab_address, ab_slot_address and ab_indexed on every
committed profile Device::from_queries derives under the identity domains: no RootTableAddress,
no ExecutionStatusAddress and no descriptor, L3, and on the CPU interpreter with buffers above
4 GiB and offset addresses, the words the addresses name, the slot's Metal address and the
increment, and the slot checked against its bounds); rt's argument_tier device tests sum through
two pointer members, read through a CPU-written gpuAddress, answer a converted slot pointer as
its gpuAddress plus its offsets, and read the textures behind a pointer member, each exactly. The
two translator tests and the device test that asserted these refusals go. Run by the lane's
compile gate (fmt, clippy plain, m2v_gpu and m2v_cpu_icd, workspace Rustdoc, the translator's
and rt's suites on lavapipe); job ids in the landing note.

Docs: rt's README says the condition in one sentence (the stored word must be a buffer's
gpu_address plus an offset inside it, and a buffer not placed at the address its guest asked
for has another gpu_address) and drops the three refusal bullets; docs/API.md sections 1 and 5
and PointerDomain::Identity say what the identity domains lower now. docs/REFUSALS.md
regenerates unchanged.
2026-11-20 08:35:00 -08:00
..