What: the two constant-window view cost facts no longer come from a GPU identity.
- metal2vulkan: DeviceDescription::measured (a set of DriverWorkaround, serde default) is a
profile input: the profile takes those workarounds beside its identity's, so the fingerprint and
every cache key follow it. The identity rows of UniformBufferPerLaneReadsSerialize (RTX 3090,
RTX 2080, RTX 5080 Laptop) and ExternalUniformReadsSkipACache (ANV on the Iris Xe RPL-P) are
gone, and NVIDIA_RTX_2080 with them (nothing else used it).
- The texel form now applies only to a slot with an indexed read (SlotPlan::indexed_read, from
Provenance::indexed_constant_reads, marked on a profile with the texel fact): a slot read at
constant offsets alone keeps its uniform buffer, whose ranges ANV pushes into registers (Mesa's
brw_nir_analyze_ubo_ranges; read, not measured), as reims's Iris Geekbench pair 2 suggested.
With both facts, view_kind gives a per-lane slot storage, an indexed-uniform slot the texel view,
a constant-offset slot the uniform buffer: no conflict.
- bind::view_check_module (CheckView x CheckReads): the check's kernels, built and verified like
any crate module (push-constant window mask, uvec4 reads, uniform / per-lane / fields).
- metal2vulkan-runtime: view_check.rs, a device check on its own thread, started as the device is
made, once per driver + release + runtime, its medians kept in the shader cache's directory:
8 kernels x 1 KiB / 4 KiB windows in device memory, and UBO / texel uniform reads over imported
host pages; 7 interleaved rounds after a warm-up, medians of timestamps x timestampPeriod. Facts:
per-lane where storage/UBO per-lane < 0.3 at both windows (NVIDIA 0.011-0.107, RADV 0.96-1.00);
texel where texel/UBO uniform over imported pages < 0.7 at both (Iris 0.40-0.49). Unchecked
(no fact) without timestamps or on any refusal. Device::settle_view_check, view_costs
(ViewCosts, ViewVerdict), view_check_report.
- Timing: creation never waits. Device::compile_device returns the description's compile device
until the check answers with a fact, then the one with the facts measured (made before the
answer is published, held in the line's Invariant); a recorded answer applies from the first
pipeline. pipeline::Sources reads the compile device once per creation or variant, so one
compile and its link never straddle the answer. The runtime's own tests fix the facts
(DeviceOptions::view_facts, cfg(test), default none) unless a test runs the check; it replaces
compile_as.
Tests: device::tests::profile view_facts_come_from_the_measured_set_alone (no committed profile
nor the 3090/2080 IDs carries either fact by identity; each measured set its own fingerprint);
engine_lane_reads (the fact from the measured set on NVIDIA's and RADV's captures; NVIDIA
identities without it keep UniformWords; both facts compose: Storage / UniformTexel /
UniformWords); engine_access (the texel form for an indexed read, a constant offset keeps the
uniform buffer, nothing measured keeps it); bind::view_check validity on every committed profile;
runtime view_check::tests (facts on both sides of each bound, the measured GPUs' ratios, the record
round trip, the measured compile device and its fingerprint); view_check_device (lavapipe: settles
Measured with its medians, the compile device carries exactly its facts, a later device reads the
record); uniform_texels on indexed inline kernels under fixed facts.
Docs: API.md (DeviceDescription::measured, the texel form's indexed-read rule), runtime README
(the check, its cost, its verdicts, when translation takes them), FAST-PATHS known gap, api
signatures blessed, api_surface entries, REFUSALS regenerated (unchanged).
Verified so far: msi job m3-max-38239 at 5d493d44f7: clippy -p metal2vulkan -p
metal2vulkan-runtime --all-targets --all-features -D warnings CLIPPY=0.
With it (folded): View check: the inline kernels' module metadata llvm-as takes; the windows' descriptor alignment checked
The engine_access and uniform_texels inline kernels named llvm.module.flags and air.version with
the version tuples of air.version and air.language_version, which llvm-as rejects (msi job
m3-max-38254: engine_access's texel test panicked in assemble_text). The view check refuses a
window or out buffer whose VkBuffer offset lies off 256 bytes, the most any descriptor offset
alignment Vulkan bounds may ask, rather than write such a descriptor.
Verified: m3-max-38239 (msi) at 5d493d44f7: clippy -p metal2vulkan -p metal2vulkan-runtime --all-targets --all-features 0. m3-max-38262 at f941e38fab: clippy --cfg m2v_cpu_icd (runtime) 0; lavapipe 21/21 (uniform_texels, uniform_bind_offsets, view_check_device, view_check unit tests); lavapipe verdict Measured, no facts (per-lane storage/UBO 1.17-1.44, texel/UBO over imported pages 1.99-2.30, fields texel/UBO 1.99-2.09; the check took 267-487 ms; a second device read the record). m3-max-38254 at 46e4aaab03: translator 146/147 (engine_access's inline IR, fixed in the second commit). clippy --cfg m2v_gpu, rustdoc, the translator rerun and the device verdicts (2080, 780M, XTX, 3090, Iris) run after the merge.