Commit Graph
35 Commits
Author SHA1 Message Date
Anees Iqbal 9fe45f0043 Fix forward: clippy's indexing lint, the tests of the level-0 arm, the floor profile
The first build's legs (job m3-max-84933, lavapipe) found:
- clippy (m2v_cpu_icd): level_zero_test indexed SamplerWord::ADDRESS and ADDRESS_SHIFT, which
  lower/ denies; it now zips the two arrays and takes the s and t axes;
- the level_zero device tests made Private textures, which replace_region refuses ("the CPU
  reaches no Private or Memoryless texture"); they take the descriptor's default storage mode;
- floor::the_floor_profile_states_exactly_the_floor: runtime-floor.json's m2v_runtime_floor block,
  and regen_device_profiles.py's RUNTIME_FLOOR that writes it, state the new limits (sampled
  images 262,144, samplers 32,000, per-stage resources 458,760, all pools 490,752);
- eight translator tests that count a slot sample's instructions now count the level-0 arm's
  explicit level-0 sample or operand-less gather beside the device path's, and its own sign
  extract of a dynamic offset; the tests' operand-mask helpers read a mask only where the
  instruction holds one.
2026-12-03 16:17:57 -08:00
Anees Iqbal ab24c9617f Docs: comments that named a deleted module or file say what is true now
Six comments sent readers to `device::driver_facts` (the release-keyed deviation table) as the
place a driver's measured deviations come from. The module is gone and `Device::from_queries`
reads no identity, so each now says that translation takes no deviation and reads no driver
identity:
- crates/metal2vulkan/src/ash_interop/query.rs (the format query's note),
- crates/metal2vulkan/src/device/description.rs (`device_name`'s doc),
- crates/metal2vulkan/src/device/khronos.rs (the module docs' deviations paragraph),
- crates/metal2vulkan/src/device/tests/description.rs (`a_stated_deviation_is_refused`'s doc),
- scripts/regen-device-profiles/README.md and regen_device_profiles.py (the Deviations text).

lib.rs's note on the crate-private modules drops its design citation and the claim that lowering
and the binder's replay share `indirect_commands`: no lowering reads it, and validation's case
model and Metal executor reach it as `bind::indirect_commands`.

The ASTC HDR probe's header (crates/metal2vulkan-conformance/probes/astc_hdr_textures.m) named
the runtime's `astc.rs`, which does not exist; it now points at `bind::astc_decode`'s docs and
the `astc-*-hdr` recordings. No recording or test fingerprints the probe's source:
`git grep -n 'astc_hdr_textures'` finds only the probe itself, a sibling probe's comment and two
doc comments under bind/astc_decode.

Zeros, at metal2vulkan 733b14ed24 (this commit's parent) and the consumer reims-vgpu d0a7c9614:
- `git grep -nw driver_facts` here: 0 after this commit (6 before, the six above); no file
  `crates/metal2vulkan/src/device/driver_facts*` (`git ls-files`: 0). Consumer: 0.
- `git ls-files '*astc.rs'`: 0.

Comments only: no code, no test or table moves. Verified by `cargo fmt --all` (no change) and
the lane's quick check at the stack's tip.
2026-11-25 12:22:03 -08:00
Anees Iqbal ed4b0ecd76 rt: storage textures written or read at a run-time level, through runs of set 1's level elements
What: under the identity domains a storage slot written, read or size-queried at a level other
than the constant 0 indexes a run of set 1's storage-image array instead of being refused as
Unsupported{IdentityDomains} ("an encoder value the function reads as TextureLevels(S)"). The
translator pushes the bound texture's level count (PushField::TextureLevels) and the run's first
element (the new PushField::TextureLevelBase, beside it), states no StorageTextureLevels or
StorageTextureLevelViews fact, and an access at level l takes element
first + min(l, max(n, 1) - 1) of the array, NonUniform, inside l < n. A texture of one level
pushes its own index, nil 0 with count 0.

The runtime's binding 1 grows by 65,536 level elements past its 65,536 textures, 4,096 runs of 16
(floor::LEVEL_ELEMENTS, floor::LEVEL_RUN). The first dispatch or draw that binds a texture of more
than one level to such a slot (the encoder's checks, compute and render stages alike) gives it a
run: a single-level storage view of each level, of its storage element's type (a cube's level as
the 2D array of its faces, a view's from its own first level), written at the run's elements. A
later bind takes the texture's lock and pushes the same two words: no Vulkan call. The run goes
back through the pool and reaper once the texture is released and its work retired: elements null,
views destroyed (Gauges::level_elements). Every run held, or a texture of more than 16 levels, is
the new Limit::LevelElements { max: 4096 }, and the dispatch or draw does not run. The floor's
storage-image limits and both totals rise by 65,536: storage 196,608, per-stage resources 327,688,
pools 351,680; every lab device's profile is far above (llvmpipe 1,015,808 storage, the least).

SEMANTICS_VERSION and ARTIFACT_FORMAT_VERSION bump in the branch's last commit (a new PushField).

Why: 17 guest kernels in 6 libraries were refused at state creation by this form.

Docs: REFUSALS.md and the signatures table regenerated, RESOURCE-ID.md (binding 1 past 65,536),
API.md (storage levels under identity), the runtime README (Set 1, the floor table, the known-gap
line replaced by the Limit), the runtime-floor profile's limits, and the conformance ledger's
level-sizes-storage row removed.

Checked by: engine_texture_levels' identity test and the runtime's storage_levels device tests
(red at 6ad1c33124: jobs m3-max-70886 and m3-max-70892 on lavapipe), engine_identity's
a_storage_slot_written_at_a_run_time_level_is_an_element_of_its_run; the lane's jobs report the
runs per card.
2026-11-23 09:04:38 -08:00
Anees Iqbal 0eb982e471 Runtime floor profile, conformance notices and ledger rows for the LOD-clamp variants
The committed runtime-floor profile (and its generator's RUNTIME_FLOOR block) states the
floor's raised sampler limits: 24,000 maxPerStage and maxDescriptorSet
UpdateAfterBindSamplers, 286,144 maxUpdateAfterBindDescriptorsInAllPools.
tests::floor::the_floor_profile_states_exactly_the_floor failed without it on lavapipe
(job m3-max-70138) and on the 780M, Iris Xe and RTX 3090 (m3-max-70152, -70153, -70151).

The two sampler-bind-lod-clamps cases declare pixel-sampler-scaling, the static note of a
sample through a runtime sampler slot, which fired on every venue (same jobs). The kernel
case takes the ledger's dispatch_type row every compute-pass case of the rt side takes.
compute-plural-texture-and-sampler-binding now compares its four-bindings site on
lavapipe, which reads lavapipe's one-ulp 8-bit conversion, as compute-inline-bytes does
over the same texture and kernel: a llvmpipe row. The cards compared it exact.
2026-11-23 00:11:46 -08:00
Anees Iqbal d9077dfa0d Push window: each device's maxPushConstantsSize sizes it, up to 256 bytes (rule 2's ninth form)
What: the push window is one value per device, `DeviceProfile::push_window`, the description's
maxPushConstantsSize up to 256 bytes, decided in the profile `Device::from_queries` derives
(device/profile.rs:115). Every window reads it: push placement (`lower::push::window`, `place`,
`spills` and `check_floor` take its bytes; lower/select.rs, lower/access/mod.rs and
lower/access/table.rs pass it), and in the runtime the one pipeline layout's push range
(device.rs:688), the kernel and render pipelines' push checks (pipeline.rs:2119, render.rs:1043)
and the encoder's push bound (encoder.rs:1759). With W that value, a kernel pushes in [0, W), a
vertex function in [base, W - 8) and a fragment function in [base, W); object and mesh functions
keep 0..32 and 32..64. A stage's fields past its window spill to its parameter block, whose
address the window holds, as they did past 256. `from_queries` refuses a maxPushConstantsSize
below 128, Vulkan's least, only (`Unsupported{PushWindow}`, required 128), and the runtime's
floor no longer lists maxPushConstantsSize (floor.rs: its row and PUSH_CONSTANT_BYTES go; the
layout's range was a constant 256). There is no constant 128 path, no switch and no environment
gate: the limit query is the only input. Ported from the held branch steelbrain/amdfloor-window
(d6880ca16b) onto today's development, every line reference confirmed against this tree.

Why: the owner's word choosing option B. A device reporting 128 bytes was refused by the floor;
it now runs with a window of 128.

AGENTS.md rule 2 takes the owner's authorized text: "for eight only" becomes "for nine only",
and the push window joins the list after run-time texel offsets.

Known gap (runtime README, Known gaps of indirect command buffers): in a window of 128 bytes a
command reaches 9 vertex slots, and 8 where the vertex function spills, against 25 and 24 at 256
((W - 8 - 16 - 28) / 8; from code: lower::push's
an_indirect_draw_s_vertex_function_pushes_25_or_9_slot_words). A kernel pushes 8 buffer
addresses beside its dispatch region at 128 bytes against 24 at 256, the rest from its ring.

Caches: a device of 128 and one of 256 share no cached artifact and no pipeline. The profile's
fingerprint hashes every ProfileFields field by Debug (device/profile.rs:312, :327), the limits
included (:346, maxPushConstantsSize at :625); `function_key` hashes the fingerprint
(pipeline/compile/key.rs:182, :189; passed at pipeline/compile.rs:2973), as does
`queried_render_descriptor_key` (key.rs:546); a cached artifact or pipeline loads only under an
equal fingerprint (cache/artifacts.rs:71, :204, :238; cache/envelope.rs:142); and the runtime's
enables digest, which the stage keys check, hashes it (metal2vulkan-runtime/src/device.rs:1533).

SEMANTICS_VERSION stays 2273: no module changes under an unchanged key. Every device
`from_queries` accepted before reports 256 bytes or more (it refused below 256), so its window is
256 as before and its modules are the same bytes; a device of fewer bytes was refused, so it
holds no artifact to go stale, and its modules are new under its own fingerprint. The golden
test at this tree found 0 cells changed under an unchanged key over the 15 committed profiles,
and 1855 under a changed profile fingerprint, runtime-floor's column alone (m3-max-68089; the rows
whose assembler Linux lacks are not observed there).

Golden table: runtime-floor.json and its generator drop the floor block's maxPushConstantsSize
of 256, so the profile reads Vulkan 1.3's least, 128, and its fingerprint moves. Its cells are
re-blessed on development (the bless needs macOS's assembler).

Validation: runtime-sources.sha256 is rewritten (d4a8dbf2...), since device/derive.rs and
device/profile.rs are runtime inputs the guard hashes.

Docs: the runtime README (the floor's limits note and table, compute Parameters, the render push
range, the indirect command buffers' known gaps), docs/API.md section 5 and the from_queries
paragraph, PushWindow's doc, reach.tsv and docs/REFUSALS.md (regenerated; the PushWindow row
only), the device profiles' README, and api_signatures.tsv (DeviceProfile::push_window). The
api_surface table is unchanged: no public type is added.

Tests: lower::push's placement at 256 and 128; from_queries (each committed profile's window is
its limit up to 256, runtime-floor's 128; 128 derives, 64 is refused with required 128); the
tessellation control range, the engine identity and spill tests in each profile's window; and
the runtime's push_window, patch and indirect token tests in two arms each, the device's own
limit and the limit held at 128 by the tests' device shim (tests/command.rs push_window_128,
DeviceOptions::described).

Verified:
- m3-max-68088 (this tree): fmt, the signatures table, the refusal surface, clippy -D warnings
  plain, --cfg m2v_gpu and --cfg m2v_cpu_icd, workspace Rustdoc -D warnings: each exit 0. The
  runtime suite on lavapipe (--cfg m2v_cpu_icd): 647 passed, 3 skipped. Its push lines read
  "push_window: the push window is 256 bytes", "push_window_128: the push window is 128 bytes",
  "window 128, 12 buffers: 3 ring writes and 3 pushes over 3 dispatches", "icb_tokens: ... the
  push window 256 bytes, 25 slot words", "icb_tokens_128: ... the push window 128 bytes, 9 slot
  words", and draw_patches_full_range at 256 and _128 at 128.
- m3-max-68089 (this tree): the core crates 3881 of 3882 passed, 24 skipped; the one failure
  is the golden table, stale under runtime-floor's moved fingerprint (1855 cells, one per row
  observed on Linux, 0 new, 0 gone, 0 under a changed source, 0 changed under an unchanged key).
  Validation 1314 passed, 3 skipped. The translator's push tests print each committed profile's
  window: runtime-floor 128, the vertex function ending at 120, 9 inputs; the 14 others 256.
- m3-max-68067: the whole runtime suite on lavapipe at an earlier tree of this change
  (a98af765ad, before the rebase onto 91fed9449c and the options alias) with a probe commit that
  holds every device's limit at 128 in Device::open (steelbrain/amdfloorb-probe128, never landed):
  647 passed, 3 skipped; the conformance replay exited 0; every push line read 128 bytes.

No card under 256 ran it; the 128 form ran on lavapipe with the limit held at 128.
2026-11-22 10:14:23 -08:00
Anees Iqbal c5209e66ba rt floor: alphaToOne is enabled where the device reports it, no longer required
A user's Radeon under AMD's own Windows driver was refused at device start, partly because it
reports no `alphaToOne`. The feature leaves the floor's required features and joins the tables
device creation enables where the device reports it (`floor::ALPHA_TO_ONE`, beside the min-LOD and
fill-mode ones). Nothing else changes. Where the device reports the feature, creation enables it,
the translator's description states it, and a render pipeline that sets `alphaToOneEnabled` takes
the device's own `alphaToOneEnable`, as before. Where it does not, the translator's existing typed
refusal applies: `Unsupported{AlphaToOne, Feature(AlphaToOne)}` from `link::graphics_state`, already
in docs/REFUSALS.md, which `refusal_surface.py` regenerates unchanged. This change adds no other
form, in the shader or elsewhere.

- floor.rs: `ALPHA_TO_ONE` in `ENABLED` and in `decide()`'s reported-copy chain; `REQUIRED` loses it.
- rt README: the Features row moves to its own "Alpha to one" table, and a known-gap row under
  render pipeline states. 0 of the 58,976 render states of the nine standard streams set
  `alphaToOneEnabled`, and 0 set alpha to coverage (states-only plays plus dumps on lavapipe, job
  m3-max-66153).
- runtime-floor.json and its generator lose `alphaToOne` from the m2v_runtime_floor block, which
  `the_floor_profile_states_exactly_the_floor` holds equal to `REQUIRED`.
- Tests: `the_alpha_to_one_feature_is_enabled_where_reported` (decide and shader_enables, with
  and without the feature); `at_the_floor` no longer reports it; the missing-feature list drops it;
  the README table check covers the new table. The device test
  `every_device_draws_lines_under_alpha_to_coverage_or_one` expects the typed refusal on a device
  without the feature. The translator test `alpha_to_one_is_refused_only_without_the_feature` reads
  `runtime-floor` as it is.

Honesty line: no AMD card runs Windows in the lab. On that driver this is expected, not verified.
This commit says what the code now does; it does not say that user's device now starts.
Verified: see the compile job named in the landing message.
2026-11-21 23:35:24 -08:00
Anees Iqbal 072eaaba18 profiles: delete amd-rdna3-radv, whose every cell is the Radeon 780M's
What: the RX 7900 XTX capture amd-rdna3-radv derives the same translation fingerprint as
amd-780m-radv: the Radeon 780M and the RX 7900 XTX under one RADV build. So every golden and
census cell of the profile equals the 780M's (dff8c48964). Nothing outside the translator
derives from it: no runtime, conformance, harness or devtools use. Under the planner's rule,
such a profile is deleted.
- The profile file, its regen_device_profiles.py source entry, and its README row and venue
  sentence go. profiles/README.md now names amd-780m-hawkpoint-radv alone as the capture no
  venue runs on.
- Its two opened-chains contexts go from opened_chains.txt (device and restricted).
- The shared-fingerprint pair dff8c48964 added to fingerprints_distinguish_committed_profiles
  goes, with its comment.
- Rows of tables that already hold amd-780m-radv lose the rdna3 row:
  description.rs COMMITTED, profile.rs the_profile_holds_the_largest_whole_point_size (8191 on
  both), subgroup.rs GOLDEN and its own-limits table (equal rows), fetch/tests.rs,
  engine_device_replay.rs, engine_lane_reads.rs and engine_widest_pin.rs (equal rows).
- Every other test stem "amd-rdna3-radv" is now "amd-780m-radv": 43 translator files (42 test files and metal/format/word.rs's test module),
  plus validation's c3, worker/device and candidate/platform/enables tests (one line there,
  depth_range_unrestricted_is_enabled_where_the_device_lists_it, which the 780M lists too).
  The two descriptions are equal in everything a translation reads (the fingerprint test's own
  equality check), so no asserted value changes. Comments that read "the committed RDNA3
  description" stay true: the 780M is RDNA3.
- corpus/observations/vulkan/shard_056.jsonl drops the row recorded under the old gpuinfo
  profile, which is gone: environment amd-780m-radv@engine@amd-rdna3-radv, case
  atomics-past-a-device-buffer (case_id fdbf7c9b9e09e38aff99a04768f8375ac8e7a604dfcacf21e236b2d2482b3896,
  air e1382758476864b76c1eab9d944b033c016808309fe44581fe38f539f23d67e5), executor
  vulkan-engine-v131. The shard keeps the same case's other row.
- cutover/c1-reviewed.json's note names the profiles that remain in the bucket:
  intel-irisxe-anv and nvidia-rtx50-linux.
- scripts/drm-shim.Dockerfile no longer lists the profile among the 26.2.3 captures. The example
  in scripts/linux-gate uses --chip rembrandt with amd-rdna2-apu-radv (the Radeon 680M, RADV
  REMBRANDT).

Left to the next pin's bless: three generated tables still name the profile, and only a bless
drops their columns. They are tests/golden_hashes.tsv (its profile row and column),
tests/public_fixture_expectations_engine.tsv (its column) and corpus/authored-compile.tsv (its
census column).

Search: `git grep -n amd-rdna3-radv` gave 118 hits at dff8c48964. After this commit it gives
4, the three tables above. `git grep -n amd-rdna3-radv` in the consumer's checkout gives 0.

Verified: m3-max-65582 at the series' tip 0f732c1141: fmt, signatures, clippy plain, --cfg m2v_gpu
and --cfg m2v_cpu_icd, workspace Rustdoc -D warnings and the device-profile pyunit green;
conformance 1025/1025; validation 1330/1331 and product 4015/4026 (24 skipped), every red a
bless item: the golden table (1861 rdna3 cells gone), ten fixture-inventory tests on
tests/public_fixture_expectations_engine.tsv (the column's drop; every one of its 3499 rows
holds the same cell under amd-rdna3-radv as under amd-780m-radv), and the opened-chains pin
left by the enables move. bless_engine_inventory needs metal-as, so that bless is the pin's,
on a Mac.
2026-11-21 19:40:54 -08:00
Anees Iqbal aecdc8ee84 profiles: amd-rdna3-radv is a capture of an RX 7900 XTX, with per-format sample counts
The RDNA3 census profile was a gpuinfo report (51898, an RX 7800 XT on Mesa 26.2.3). Such a
report holds no VkImageFormatProperties, so the profile stated no color attachment format's own
sample counts, only the device-wide framebufferIntegerColorSampleCounts, which RADV states as
1x. The authored compile census therefore refused integer color targets above 1x on that column
(RasterSampleCount needs FramebufferIntegerColorSampleCount(N) |
ColorAttachmentSampleCount(format, N)), 9 cells. amd-780m-radv, the same driver measured,
compiles all 9, and the runtime on a real RDNA3 card queries each format's counts itself.

The profile is now a local capture of a card we run, made as the other local captures are:
`vulkaninfo --json` and its `corpus-vulkan --capture-formats` supplement on an AMD Radeon RX
7900 XTX (RADV NAVI31, Mesa 26.2.6, job m3-max-65462; device queries only), converted by
scripts/regen-device-profiles (--offline, the pinned vk.xml). Its
m2v_color_attachment_sample_counts states 70 formats, R32_UINT and R32G32B32A32_UINT among
them at 1, 2, 4 and 8 samples. The SOURCES entry and the profiles README row say so; no venue
names the profile. The c3 test that refuses a gpuinfo report under a venue now names
amd-rdna2-apu-radv, a gpuinfo profile still.

Bless items, at the next pin and not here: the golden table's amd-rdna3-radv cells (the
profile's fingerprint moves), the authored compile census's amd-rdna3-radv column (the 9
sample-count cells are expected to compile, and other cells move where Navi31 under 26.2.6
states other features or limits than the old report), and the opened-chains pin's two
amd-rdna3-radv contexts.
2026-11-21 18:50:50 -08:00
Anees Iqbal e734db4be2 Runtime: the translator's description states every feature and extension device creation enables that it names; maintenance4 joins the floor
What: shader_enables, the enable set the translator's description of the device is restricted to
(DeviceDescription::with_enabled), now reads every table of features device creation enables
(floor::ENABLED: the floor, the portability subset, the optional features, the attachment
reads, step rates, min-LOD clamps, fill modes, quad control, the pixel interlock, barycentrics,
the border swizzle, linear attachments, fault reports, and the indirect commands' features, now a
table of their own, INDIRECT_COMMAND_FEATURES, which indirect_commands sets). Each entry the
translator names reaches it where creation enabled it. Entries that were enabled but unnamed now
carry the translator's name: depthBiasClamp, drawIndirectFirstInstance, bresenhamLines and
occlusionQueryPrecise (floor), attachmentFeedbackLoopLayout (the attachment reads),
borderColorSwizzle and borderColorSwizzleFromImage, and maintenance5 (indirect commands).
shader_extension names the extensions those need, and the others creation enables that the
translator names: VK_EXT_line_rasterization, VK_EXT_attachment_feedback_loop_layout,
VK_EXT_border_color_swizzle, VK_EXT_custom_border_color, VK_EXT_external_memory_host and
VK_KHR_maintenance5.

maintenance4 joins the floor (REQUIRED, the README's floor table, runtime-floor.json's
m2v_runtime_floor block and regen_device_profiles.py's RUNTIME_FLOOR): Vulkan 1.3 requires it
of every device, so no device at the floor lacks it. The translator's profile reads it for
spirv-val's --allow-localsizeid alone.

Why: the planner's feature-enable walk (lane texoff, 11-21) found these features enabled at
vkCreateDevice and absent from the translator's profile, the class maintenance8 was in before
38dcc857dd. None changes what the runtime does on its own paths: the runtime sets depth bias,
border colors and indirect draws itself, and the translator's readers of these features
(metal::state::depth_bias, the bind plan's indirect_first_instance_missing, metal::sampler's
opaque-black border) are not on them. The profile now states what the device has. Its fingerprint
moves on every device, and with it every cache key.

64-bit image atomics stay off, and the features the translator reads that the runtime does not
enable are the feature-enable test's (next commit).
2026-11-21 13:39:50 -08:00
Anees Iqbal 817463704e rt: texture buffers are buffer views of their buffer's bytes in set 1's two texel-buffer arrays
What: Buffer::new_texture of a texture buffer's descriptor makes one VkBufferView of the bytes
shaders reach (a Managed buffer's device copy where it has one), from the offset, its width's
texels long: no image, no copy, no new push field. Set 1 gains two arrays of 65,536 elements,
binding 5 (uniform texel buffers, the read ones) and binding 6 (storage texel buffers, the written
ones), at the same index class as textures; a texture buffer's index is the same element of both,
and placing a texture or a texture buffer over the other's index nulls the other's elements. The
translator's identity domains classify a texture_buffer slot or argument-buffer member as a texel
buffer of that array (no TexelBufferRange fact, no swizzle under identity), so a pipeline that
declares one is no longer Unsupported{IdentityDomains}. SEMANTICS_VERSION 2258.

Metal's own refusals are typed: an offset off Device::minimum_texture_buffer_alignment
(minimumTextureBufferAlignmentForPixelFormat:, the device's texel-buffer offset alignment, the
larger of the uniform and storage ones, a single texel's size where the device says it suffices)
is Refusal::TextureBufferAlignment; a bytesPerRow below the row or texels past the buffer is
Refusal::BufferTextureLayout; a descriptor of more than one row, level, slice or sample, and a
swizzle with writes, as Metal refuses them. Device::new_texture (and every other make) of a texture
buffer's descriptor is Refusal::TextureBufferNotOverBuffer: the consumer places the bytes as it
places every buffer. Gap::TextureBuffer goes; a swizzled texture buffer (Gap::TextureBufferSwizzle),
a view of one, and a blit copy of one are recorded gaps. A format needs both texel-buffer usages in
its buffer features (Gap::TextureFormat otherwise): the view's buffer has both usages, and without
maintenance5 its usage is the buffer's.

The floor requires the six texel-buffer descriptor-indexing features (update-after-bind, dynamic
and non-uniform indexing, uniform and storage) and raises the limits the two arrays count against:
uniform texel buffers against the sampled-image limits, storage texel buffers against the
storage-image limits, both against maxPerStageUpdateAfterBindResources and the pools: sampled and
storage per stage and per set 131,072 (196,608 sampled with attachment reads' second elements),
resources 262,152 (327,688), pools 274,144 (339,680). Every recorded device fits: the 8 device dumps'
least are llvmpipe's 1,015,808 sampled/storage/resources and the UHD 630's 1,048,576 pools; all 12
devices there report the six features.

Why: six harvested guest functions declare a texture buffer, and a pipeline that declared one was
refused at creation.

Checked by: tests::texture_buffers (lavapipe: R32Uint read at a buffer offset and written, out of
bounds read zero and dropped, atomics through read_write, every refusal), engine_identity's
a_texture_buffer_is_the_texel_buffer_element_its_resource_id_names (L3 on lavapipe and moltenvk-m3),
the floor tests, the signatures table and REFUSALS.md regenerated; the lane's compile job reports
the runs.
2026-11-21 07:27:27 -08:00
Anees Iqbal b5ac9fd07b rt: visibility results, one precise occlusion query per mode, copied into the buffer at the pass's end
What: `setVisibilityResultMode:offset:` builds `Boolean` and `Counting`. Each such mode set is one
segment counted by one precise occlusion query (`VK_QUERY_CONTROL_PRECISE_BIT`), begun in the
pass's rendering before the segment's first draw and ended there at the next mode set or the
encoder's end; a segment with no draw begins and ends its query as it ends, so its word is 0.
After `vkCmdEndRendering` the pass copies the counts (`vkCmdCopyQueryPoolResults`, 64-bit, WAIT)
straight into the visibility result buffer's `VkBuffer` at place+offset, one copy for each run of
consecutive offsets in one pool, before the pass's second barrier (recorded or owed), which orders
them before every later command; a Shared buffer's segment end barrier reaches the host, and a
Managed buffer's write and a texture over the buffer in an image of its own are kept as a blit's
write is. `Boolean` writes the count too, nonzero exactly where a sample passed (Metal documents a
nonzero word; the M3 Max writes 1): an accepted difference in docs/API.md section 10, and the
conformance cases compare a `Boolean` word as nonzero alone.

A command buffer takes its queries from occlusion pools of 256 the device lends it
(`crate::visibility`), each query reset on the host (`hostQueryReset`) as the command buffer
retires or drops uncommitted; the device keeps at most 16 pools free and destroys the rest
(`Gauges::occlusion_pools`). `occlusionQueryPrecise` joins the floor's required features (every
venue's profile reports it; Roadmap 2022 requires it), with the README floor table, the
runtime-floor profile's `m2v_runtime_floor` block and the regeneration script's list.

Refusals: Metal's own, each where the mode is set, the encoder's mode unchanged:
`Refusal::NoVisibilityResultBuffer`, `Refusal::VisibilityResultOffset` (not a multiple of 8, or
past the buffer), `Refusal::VisibilityResultOffsetTaken` (Apple documents each offset as set once
per pass; Metal's validation stops it), and `Refusal::ArgumentPlace` at alignment 8 for an offset
at an allocation byte off a multiple of 8 (VUID-vkCmdCopyQueryPoolResults-flags-00823). Gaps, each
counted and a README known gap: `DrawKind::AccumulatedVisibilityResults` (a mode in an
`Accumulate` pass; `Metrics::accumulated_visibility_refused`) and
`DrawKind::VisibilityResultInterrupt` (a command that would end the rendering while a query counts:
a memory barrier after a writing draw, a draw that moves an attachment to the feedback layout, pays
an owed barrier before an attachment read or copies into a shadow, and, bounded, a draw that looks
at textures over a buffer in an image of their own or reaches a Managed buffer with textures over
its device copy; `Metrics::visibility_interrupts_refused`). Every refusal is checked before the
encoder changes state; a segment's first draw may still end the rendering, before its query
begins. `DrawKind::VisibilityResults` is gone. `RenderPassDescriptor::visibility_result_type`
(`VisibilityResultType`, Metal's `visibilityResultType`) is a field now.

Translator: `PrecisionNote::DeviceOcclusionCount`, the static note of a `Boolean` or `Counting`
result (`RenderCommandEncoder::VISIBILITY_NOTE`), quoting Vulkan's "Occlusion Queries" (precise
counts differ between implementations: fragments killed before rasterization, counts multiplied
per colour output) and "Fragment Operations" (`earlyFragmentMultisampleCoverageAfterSampleCounting`);
its codec tag, ARTIFACT_FORMAT_VERSION 588, validation's allowance (unbounded, no tolerance), the
conformance degradation `device-occlusion-count` among the native notes, and docs/API.md's
catalogue. The dead `Feature::CountingVisibility` (no construction site) is removed with its reach
row. The old runtime's `Device::new` is untouched; the runtime-floor test profile now states
`occlusionQueryPrecise`, which re-keys that profile's fingerprint.

Why: the visibility-cut ruling. A guest that sets a mode got a refusal; it now gets its results,
or a typed, counted refusal where the cut does not build the shape (continuations and a combine
are not built).

Verified: cargo fmt; scripts/api-signatures --bless/--check, refusal_surface (0 without reach or
basis), metal-coverage and conformance-coverage regenerated, check_device_profiles (0 findings).
The compile job (fmt, signatures, clippy plain / --cfg m2v_gpu / --cfg m2v_cpu_icd, workspace
Rustdoc -D warnings) and the lavapipe rt suite, with tests/visibility.rs (Boolean and Counting
against the CPU's counts, pool reuse and the 16-pool bound past 17, Metal's refusals, Accumulate,
the barrier and attachment-read interrupts), are named in the lane's report.
2026-11-21 06:16:57 -08:00
Anees Iqbal fe6ed10162 rt: the floor profile requires pipelineCreationCacheControl, and the module digest reads its page as 4-byte chunks
Check m3-max-63418 on 2686094aaa: the runtime-floor profile's m2v_runtime_floor block, which
the_floor_profile_states_exactly_the_floor holds equal to floor.rs, lacked the new
pipelineCreationCacheControl row (added to RUNTIME_FLOOR in regen_device_profiles.py and to the
block it writes; the device's own Vulkan 1.3 features already stated it; check_device_profiles 0
findings, the script's 41 unit tests pass), and clippy's chunks_exact_to_as_chunks asked for
as_chunks_mut in the digest's page fill. The lavapipe rt suite otherwise read 573 of 574.
2026-11-21 06:09:05 -08:00
Anees Iqbal 99e5d42deb rt: several viewports and scissor rectangles, and the viewport index, through the with-count dynamic states
setViewports:count: and setScissorRects:count: refused any count but 1 (DrawKind::Viewports). They
now take 1 to 16 each, and every draw records them with their count (vkCmdSetViewportWithCount,
vkCmdSetScissorWithCount, core in Vulkan 1.3). VIEWPORT_WITH_COUNT and SCISSOR_WITH_COUNT replace
VIEWPORT and SCISSOR in every pipeline's dynamic states, whose viewport state counts become 0, so
no pipeline is made for a count. Vulkan takes as many scissors as viewports. Each viewport's
scissor follows the deleted runtime's rule (render_state.rs's vk_scissors at 5d725aeec7^): the
rectangle of its index, the one rectangle where one is set, and none past the rectangles set where
several are, each cut to the pixels its viewport covers. A draw's attachment-read area is the
union of what it covers through the viewports it reaches: every viewport set for a vertex function
that writes [[viewport_array_index]] (GraphicsState::writes_viewport_index, now Draws::
selects_viewport), and viewport 0 for any other.

A vertex function's [[viewport_array_index]] is the translator's one form at the floor: its
ViewportIndex output, written 0 at or past the encoder's count (RuntimeFact::ViewportCount), which
the draw now pushes (PushField::ViewportCount -> FieldValue::ViewportCount, refilled when the count
changes). Its fragment function reads the index as written. An index that is not one value across
a primitive stays the translator's refusal at creation, needing geometryShader, which device
creation does not enable. Out of range: none or more than 16 is DrawKind::Viewports.

Floor: multiViewport and shaderOutputViewportIndex join REQUIRED, and the translator is told.
The venue dumps report both true on every venue: m3-max-48727, 48728, 48729, 48730, 48731, 48736,
48737 and 61508. shaderOutputViewportIndex is also true in the probes 61359 to 61362 and 61366.
tests/floor.rs, the README floor table, RUNTIME_FLOOR and profiles/runtime-floor.json add them.

The translator's tests that read runtime-floor as a device without the viewport index now take it
below the floor: engine_selected_indices (the raw index alone without multiViewport; the zero
indices without shaderOutputLayer and shaderOutputViewportIndex) and engine_stage_io_tail (the
floor declares Layer and ViewportIndex; the zero index below it). runtime-floor joins the stems
whose fragment ViewportIndex needs MultiViewport.

Also, missed in a5fac6fa9b: the README's pipeline bullet names the depth clip and triangle fill
modes among what a VkPipeline bakes.

Conformance: render-state-boxes leaves known-gaps-rt.tsv; CONFORMANCE-COVERAGE.md regenerated.
Docs: README (encoder bullets, floor table, refusal list), REFUSALS.md (Viewports' doc), the
encoder's built list.

Tests: tests/viewports.rs. rt6_select draws through the viewport of its instance, two viewports
(the halves) and two scissors (the whole target and its top half). Instance 0 fills the left half,
instance 1 the right half's top, and instance 2, past the count, draws through viewport 0, its
fragment reading 2. No pipeline is made, and none or 17 viewports or rectangles are Viewports.
draw.rs drops its two-viewport refusal. floor.rs adds the two missing cases, and the translator
sees shaderOutputViewportIndex.
2026-11-21 00:34:20 -08:00
Anees Iqbal 7cd1103a44 rt: cube array textures and views, with imageCubeArray in the floor
A cube array texture (`MTLTextureTypeCubeArray`) is built: an image cube-compatible with six of
its layers a cube (`arrayLength` times six layers), whose shader view is
`VK_IMAGE_VIEW_TYPE_CUBE_ARRAY`. Metal's casts with a cube array
(`makeTextureView(pixelFormat:textureType:levels:slices:)`) are built in the same form: a cube
array's subrange of whole cubes, its faces as a 2D texture (one face) or a 2D array (any faces),
six of its faces as a cube, a cube as a cube array of one cube, and a multiple of six slices of a
square 2D array as a cube array where its image is cube-compatible. A pass resolves into a
one-sample colour cube array as into a cube (`Plan::resolves`), and a layered pass renders a cube
array's faces across its cubes (the attachment view of its layers, as for a cube).

`imageCubeArray` joins the floor's required features. Every probed device reports it (vulkaninfo
dumps m3-max-48727 to 48731, 48736, 48737 and 61508: the RX 7900 XTX, every 780M, the RTX 2080,
the RTX 3090, the RTX 5080 Laptop, the Iris Xe, lavapipe, the UHD 630's Windows driver,
KosmicKrisp and the RX 550), and Vulkan 1.4 and Roadmap 2022 require it of every device. A device
without it gets the floor's refusal. The runtime-floor profile and its generator state it
(check_device_profiles: 0 findings), and the floor's missing-feature test has its case.

`Gap::CubeArrayTexture` is deleted (the consumer's checkout at 9bb622a2c2: 0 hits); REFUSALS is
regenerated and the API table loses the variant. The runtime README's texture and view lines,
its resolve line and its floor table say what is built.

Tests, each on every device of the cfg's kind: `tests::texture` round-trips a cube array's last
face (its second cube's); `tests::view` casts a cube as a cube array of one cube, reporting
Metal's array length 1; `tests::cube_views` samples a two-cube `RGBA32Float` cube array at its
second cube and a cube view of its first six faces through the owned fixture
`unk_cube_grad_lod`, every lane reading its face's slice, with `imageCubeArray` enabled; and
`tests::layered` renders a cube array's slices 4 to 9, across both its cubes (the cube-array
layered case, as the layered change landed first).

The conformance ledger's cube array rows and the runtime-floor contexts' opened chains follow in
the next commits.
2026-11-21 00:19:34 -08:00
Anees Iqbal a5fac6fa9b rt: the depth clip mode Clamp and the triangle fill mode Lines, as pipelines of the draw's class made at first use
setDepthClipMode: and setTriangleFillMode: refused every value but Metal's defaults
(DrawKind::DepthClamp, DrawKind::FillMode). Vulkan 1.3 bakes both in
VkPipelineRasterizationStateCreateInfo, and only VK_EXT_extended_dynamic_state3 makes them
dynamic. The floor cannot require that extension: the UHD 630's Windows driver lists no EDS3, and
KosmicKrisp reports extendedDynamicState3PolygonMode false. So both are now first-use pipeline
variants, the accepted form. The encoder keeps a Raster (clamp, lines) and each draw takes
RenderCompiled::pipeline(topology, raster). The content keeps its primary VkPipeline (the triangle
or patch class at the default state) and a bounded list of the others, by class list topology and
raster state: at most 7 (three more states of the triangle or patch class, two of each other
class). The line and point classes take the clip mode alone, since Metal and Vulkan apply the fill
mode to triangles only. A triangle's edges under Lines chain Bresenham's rule, as the line class
does ("the effective rasterization input topology is in the line topology class"). The first draw
under a state makes its pipeline and waits for it: a first-use wait of a new site,
FirstUse::Raster (Metrics::first_use_raster_waits, _nanos, _max_nanos). The line and point
classes' first draws at the default state count where they did.

Floor:
- depthClamp joins REQUIRED, and the translator is told (=> DepthClamp), so the encoder maps the
  mode through metal::state::depth_clamp_enable. Vulkan 1.4 and Roadmap 2022 require it. The venue
  dumps report it true on every venue: m3-max-48727, 48728, 48729, 48730, 48731, 48736, 48737 and
  61508. tests/floor.rs, the README floor table, RUNTIME_FLOOR and profiles/runtime-floor.json
  add it.
- fillModeNonSolid is enabled where reported (FILL_MODES, told to the translator), and the setter
  maps Lines through metal::state::polygon_mode. KosmicKrisp on the M3 Max reports it false
  (m3-max-48737); every other dumped venue reports it true. There Lines stays DrawKind::FillMode,
  and so does the raw value 2, which no SDK header declares.

DrawKind::DepthClamp is deleted. The consumer's checkout names it nowhere (git grep in
reims-vgpu: 0 hits). Its only call sites are set_triangle_fill_mode and set_depth_clip_mode at
crates/reims-vgpu-vulkan/src/rt_platform/render.rs:371 and :374, whose signatures are unchanged.

The translator's raster-state test reads runtime-floor, which now states depthClamp. Clamp maps
there, and the refusal is asserted on runtime-floor without it, as ab8277a560 did for
depthBiasClamp. Other translator tests that read runtime-floor were grepped for DepthClamp and
FillModeNonSolid, and none reads the floor as lacking them.

Known gaps (README): a content's first draw under Clamp or Lines makes a VkPipeline, which Metal
does not. Under Clamp the depth a fragment function writes is the device's clamp's: Metal stores a
negative NaN as 0 below a range above 0, and the translator's depth_clamp_range variant is not
drawn.

Conformance: render-state-depth-clip and render-state-facing leave known-gaps-rt.tsv;
CONFORMANCE-COVERAGE.md regenerated. Docs: README (encoder, first-use waits, floor and fill-mode
tables, known gaps), REFUSALS.md, the api_signatures table (3 Metrics fields, 1 variant gone).

Tests:
- tests/raster.rs: a triangle in front of the near plane draws nothing under Clip and every
  texel under Clamp (twice: one pipeline made). Under Lines, through a viewport half a pixel
  right of and above the corner, the triangle draws its two edges inside the target, column 0
  and row 7, and nothing inside. Without fillModeNonSolid it is FillMode and fills. Pipelines
  made, raster first-use waits and first-use waits are each 1 + fillModeNonSolid.
- draw.rs: setting both modes makes no pipeline when no draw follows.
- floor.rs: depthClamp's missing case, and the fill-mode feature enabled where reported.
- first_use_sites.rs: the raster site.
2026-11-21 00:14:34 -08:00
Anees Iqbal aed460e0da rt: indirect draws, of primitives, indexed primitives and patches
The render encoder builds Metal's three indirect draws:
`drawPrimitives:indirectBuffer:indirectBufferOffset:` (`draw_primitives_indirect`),
`drawIndexedPrimitives:indexType:indexBuffer:indexBufferOffset:indirectBuffer:indirectBufferOffset:`
(`draw_indexed_primitives_indirect`) and
`drawPatches:patchIndexBuffer:patchIndexBufferOffset:indirectBuffer:indirectBufferOffset:`
(`draw_patches_indirect`). Each is one `vkCmdDrawIndirect` or `vkCmdDrawIndexedIndirect` on the
buffer at its offset: Metal's argument structs lie as Vulkan's commands do, so the GPU reads
them as they are and nothing is copied. Before, the encoder had no such methods and the README
listed indirect draws as not built.

drawPatches indirect is built: rt's patch draw is vkCmdDraw(patch_count, instances, patch_start,
base), each patch one vertex of the state's patch list, so Metal's patch count is the indirect
command's vertex count unchanged. A patch index buffer stays `DrawKind::PatchIndexBuffer`, as
the direct draw's.

The arguments' buffer counts among the draw's reads as an index buffer does (draw_reaches,
Managed copies), and the command buffer keeps it until it retires. The pass's first barrier
(Reach::Commands, which has INDIRECT_COMMAND_READ) and the encoder's memory barrier make earlier
writes visible to the read. An offset not a multiple of 4 or without the arguments' 16 bytes (20
indexed) is Refusal::IndirectOffset; arguments at a block byte not a multiple of 4 are
Refusal::ArgumentPlace; an indexed draw's index offset must be a multiple of the index size and
inside the buffer. A device that takes firstInstance 0 alone under a divided step rate refuses
an indirect draw through such a state (DividedBaseInstance), since the GPU reads the base
instance.

Floor: drawIndirectFirstInstance joins REQUIRED (Vulkan 1.4 requires it), so Metal's base
instance is the device's own. The translator is not told. The venue dumps report it true on
every venue: m3-max-48727, 48728, 48729, 48730, 48731, 48736, 48737 and 61508. tests/floor.rs,
the README floor table, regen_device_profiles.py's RUNTIME_FLOOR and profiles/runtime-floor.json
add it. The translator's tests that read runtime-floor only see indirect_needs_arguments become
false more often, which none asserts the other way.

Known gap (README): an indexed indirect draw's index count is the GPU's, so a count past the
index buffer is not refused as a direct one is. Without robustBufferAccess2, which the floor does
not require, a count past the block's VkBuffer is outside valid usage
(VUID-vkCmdDrawIndexedIndirect-robustBufferAccess2-08798).

The encoder's doc no longer lists `useResource:` as not built (it is, since 62b3e5a250).

Docs: README, REFUSALS.md and METAL-COVERAGE.md (the three selectors now implemented), the
api_signatures table (three methods).

Tests: draw.rs's every_device_draws_from_indirect_arguments_a_blit_wrote: arguments written by a
blit earlier in the command buffer, at offset 16, draw the constant-step triangle as the direct
draw does (vertex 1, instances 1 and 2 at base instance 1), indexed through [7, 0, 1, 2] from
index 1 at base vertex 1 too; arguments of no instances draw nothing. patch.rs's
every_device_draws_patches_from_indirect_arguments: two patches from arguments 4 bytes in draw
as the direct patch test's, and a patch index buffer is PatchIndexBuffer.
2026-11-21 00:02:34 -08:00
Anees Iqbal a529fb658e rt: the floor's depthBiasClamp has its missing-feature case, and the runtime-floor profile states it
The floor requires depthBiasClamp (the first commit of this change). The runtime's
each_missing_feature_is_named gains its case, as its count of cases is held to REQUIRED's. The
regeneration's RUNTIME_FLOOR and runtime-floor.json's m2v_runtime_floor block state it, in the
generator's order (the block the runtime's the_floor_profile_states_exactly_the_floor holds equal
to floor.rs; check_device_profiles: 0 findings over 17 profiles; the JSON line is written as the
regeneration writes it, without refetching its pinned sources). CONFORMANCE-COVERAGE is
regenerated for the ledger row render-state-depth-bias left (7688 rows to 7687).

The runtime-floor contexts' opened chains move with the profile; their bless is the next commit.

Verified: suite m3-max-61635 at 406f39dc90 (msi; the workspace suite and the lavapipe device
tests) failed exactly these three, each_missing_feature_is_named (52 cases against 53),
the_floor_profile_states_exactly_the_floor (depthBiasClamp) and the coverage document; the rerun
follows.
2026-11-20 21:33:04 -08:00
Anees Iqbal 4e3a6a3555 rt: layered rendering in one form, the vertex function storing Layer in every pass
`RenderPassDescriptor::render_target_array_length` is Metal's `renderTargetArrayLength`. A pass
of length N of 2 or more is one rendering of `layerCount` N: every attachment and resolve texture
is a view of its level and N slices from its own `slice` (a 2D array view; a cube's faces are its
slices), and the rendering's load, store and resolve cover every layer, with no per-layer loop.
At 0 and 1 the pass renders the attachment's slice alone, as Metal's does.

A vertex function's `[[render_target_array_index]]` has one form: the variant that writes
`Layer`, in every pass. Each draw pushes the pass's length, max(len, 1)
(`FieldValue::RenderTargetArrayLength` for the translator's `PushField::RenderTargetArrayLength`),
and the function stores 0 for an index at or past it, so at 0 and 1 every index renders the
attachment's slice. The fragment function reads the raw index through the flat varying the
translator carries. The runtime never asks for `VariantKey::dropped_vertex_layer`; a state whose
fact is `RenderTargetArrayLength { layer_dropped: true }` is refused as a draw input. What still
uses `dropped_vertex_layer`: the old binder (`bind/graphics.rs:905`, the variant it asks for at a
shape's length), stage_io's plan (`lower/stage_io/plan.rs:1600` and `:2305`, also the
non-layered amplification), and the validation crate's engine tests
(`candidate/engine/graphics/tests.rs:907`); it stays for cutxlate to delete.

`shaderOutputLayer` joins the floor's required features: every probed device reports it
(vulkaninfo, jobs m3-max-61359 on gem10: the 780M, the RX 550 and lavapipe; 61360 on um790: the
RX 7900 XTX, the RTX 2080, the 780M and lavapipe; 61361 on um870: the 780M, the RTX 3090 and
lavapipe; 61362: KosmicKrisp, Mesa 26.3.1; 61366: the UHD 630's Windows driver, Vulkan
1.3.215). A device without it gets the floor's refusal. The runtime-floor profile and its
generator gain it.

Refused, in the README's layered-rendering gap line: an attachment or resolve texture with fewer
slices from its own than the pass's length (`Refusal::AttachmentPlace`, naming the last slice); a
3D texture's depth planes (`TextureType`, as for every 3D attachment); a length past
`maxFramebufferLayers` (`RenderPassKind::ArrayLength`, new:
VUID-VkRenderingInfo-layerCount-07817); a draw that reads one of a layered pass's attachments
through a texture on a device without the feedback loop (`AttachmentRead`: a shadow holds one
layer); and a vertex function whose index the translator cannot show the same at every vertex of
a primitive, at creation, naming `LayeredRendering` and `geometryShader`: Vulkan requires one
`Layer` per primitive (VUID-VkPipelineShaderStageCreateInfo-stage-02596), the translator's other
form is a geometry stage device creation does not enable, and Metal calls a differing index
undefined. The feedback-loop move's ranges around the rendered layers (`around`) take the
attachment's layer count.

The conformance runtime side passes the length; the case `layered-render-target-array-length`
loses its ledger row. REFUSALS, METAL-COVERAGE and CONFORMANCE-COVERAGE regenerated; the API
table gains the field and the kind.

Test: `tests::layered`, on every device of the cfg's kind: a 2D array's slices 1 to 3 with an
index past the length, a cube's six faces, a pass of length 0 and one of length 1 whose vertex
function writes index 3 (rendering the attachment's slice, the fragment reading 3), every slice
read back; and `rt6_first_vertex`'s per-vertex index refused naming `LayeredRendering`.
2026-11-20 21:11:36 -08:00
Anees Iqbal 256c363847 Fix forward: runtime-floor states the floor's line rasterization, and Profile F may ask for a format where the formatless floor refuses
The runtime's floor requires VK_EXT_line_rasterization with bresenhamLines (107dba0b33); the
regeneration's RUNTIME_FLOOR block now states both, and runtime-floor.json is regenerated from it
(scripts/regen-device-profiles, --only runtime-floor; check_device_profiles: 0 findings), so the
runtime's the_floor_profile_states_exactly_the_floor holds.

On runtime-floor, a function with more storage textures than the per-stage limit (13 against 4,
kernel_block_read's br_rw) is refused on the formatless floor by the descriptor count, while the
device without the formatless reads asks for the storage format first, before that check is
reached. profile_f_functions_reach_every_buffer_through_a_descriptor accepts that pair.

Verified by suite m3-max-60543 (msi) naming these two among its reds; rerun follows.
2026-11-20 16:35:53 -08:00
Anees Iqbal e3d7ba6bf2 Profiles: the swiftshader description below the floor is deleted
What: profiles/below-floor/swiftshader.json, its generator source entry
(scripts/regen-device-profiles, gpuinfo report 38278) and its README row are deleted. The
from_queries refusal test (a_push_window_below_256_bytes_is_below_the_floor) reads
below-floor/vk12-floor alone.

Why: no test compiles on it any more. Its forms (4-lane vertex subgroups, reads with a format
only, robustImageAccess alone) are tested on runtime-floor with those properties stated, and a
below-floor push window is the vk12-floor description's 128 bytes.

Consumer check: no public item of a published crate is deleted.

Verified: cargo fmt. The suites run on this tree with the previous commit's jobs.
2026-11-20 16:35:53 -08:00
Anees Iqbal b90e0565da The floor: from_queries refuses a push window below 256 bytes, the runtime's floor requires 8 fragment outputs, and runtime-floor replaces the profiles below it
What: Device::from_queries refuses a description whose maxPushConstantsSize is below the 256
bytes every stage's push window is lowered for, with a typed Unsupported{PushWindow} naming the
MaxPushConstantsSize limit (crates/metal2vulkan/src/device/derive.rs, the floor checks of
from_queries). The runtime's floor (metal2vulkan-runtime's floor list) requires
maxFragmentOutputAttachments >= 8. All 15 committed device profiles report 8, and so does every
matrix card.

The committed profile set keeps only devices at or above the floor:
- roadmap-2022 and lunarg-desktop-baseline-2023 are deleted;
- vk12-floor and swiftshader move to profiles/below-floor/, inputs of the from_queries refusal
  test only;
- runtime-floor, derived from the runtime's floor by scripts/regen-device-profiles and held
  equal to it by a test, is the floor every test compiles on.

A test of a below-floor form now runs on runtime-floor without the feature that form stands in
for, labelled "below the runtime's floor" (pipeline::testing::profile_without, PROFILE_F,
device_f, FORMATLESS_FLOOR). The validation tests name runtime-floor, or derive the device they
need from it (no tessellation, no formatless writes, robustImageAccess alone, no device
addresses).

Why: the runtime refuses every device below its floor, so translating for those profiles tested
forms no device the runtime opens can ask for. A push window below 256 bytes cannot hold what
the lowering puts there.

Consumer check: no public item of a published crate is deleted. The one removed constant,
FORMATLESS_FLOOR's old value, is in the crate-private pipeline::testing.

Not in this change, re-blessed on development: the golden hashes table
(tests::golden_hashes) and the public fixture expectations (tests::public_fixtures_engine). The
runtime-sources pin (candidate::engine::artifact) follows from the test run at this tree.

Verified: cargo fmt. The suites, clippy and the CPU-ICD run are potluck jobs on this tree, named
when the branch is handed over.
2026-11-20 16:35:52 -08:00
Anees Iqbal 3656f31676 DriverWorkaround keeps the two answers every device takes; the driver-defect refusal goes
DriverWorkaround held 26 variants; Device::from_queries takes only ClippedCoverageNotMetals and
TessellatorNotMetals, on every device, and the batch's earlier commits removed every reader of
the other 24. They go, and the enum's docs now say what it is: a device answer that no Vulkan
query tells apart, noted on every device.

Needs::DriverDefect and Unsupported::driver_defect named a DriverWorkaround measured on a
driver's identity. No site constructs it any more; they go, with their arms in the permanence
match, the validation engine's outcome map and its key test, the conformance verdict's device
gap, the error tests and the refusal surface script.

Docs that named deleted variants are rewritten to what the code does now: the f32 denormals in
an entry that declares the 16-bit float controls are the device's own on every device; the stage
bound is the one bound a kernel's plan is held under; the uniform view is a Uniform block (the
texel form went with ExternalUniformReadsSkipACache); the Intel venues' note no longer claims the
RPL-P's profile takes a workaround.

Verified: nothing yet; the gate follows.
2026-11-20 11:57:41 -08:00
Anees Iqbal bcd50aba9f C3 venues: the Iris venue allows the RPL-P alone, which its translation key names
Iris venue: allow the RPL-P alone; the RPL-S derives another translation key

Since SEMANTICS 2128 DriverWorkaround::PushReadsLengthenThreadPayload is keyed on the Iris Xe of
RPL-P (8086:a7a0) alone, where it was measured. The UHD Graphics 770 of RPL-S, which the
intel-irisxe-rplp-anv venue also allowed, has a capture that differs from the RPL-P's only in
maxMemoryAllocationSize, but its derived profile does not take the workaround, so its translation
key differs. Venues::check_profiles refuses that, and every test that loads the committed venue
list failed, among them candidate::engine::guards::tests::no_venue_runs_a_guarded_target_under_
robustness_1_alone, the c3 venue tests and the two-device profile test.

The RPL-S leaves the venue: translation tells the two apart, and no cluster host has an RPL-S to
record a venue of its own. Its capture stays committed (other tests read it as a device profile).

- c3-venues.json: the Iris venue's devices are the RPL-P alone.
- c3::tests: the venue allows the RPL-P alone; pushing the RPL-S with its own capture is refused
  as a device that derives another key and needs a venue of its own; the RPL-P's capture under
  the RPL-S's identity is refused as another device's.
- candidate::platform::profiles::tests::the_intel_venue_allows_the_rplp_alone_and_stops_the_rpls
  (was one_intel_venue_allows_both_devices_and_stops_any_other): the captures still differ only
  in maxMemoryAllocationSize, the workaround is the RPL-P's and not the RPL-S's, the keys differ,
  and the venue runs the RPL-P and stops the RPL-S on its name, device ID and driver build.
- c3/venues.rs docs and the regen script's comment say so.

Verified: cargo fmt; built and tested in the next potluck job.

Iris venue tests: the RPL-S also stops on its key and allocation size; six venue devices

The venue no longer allows the RPL-S (51c031e187), so its check against the
RPL-P's venue reports, past its four identity differences, its own
translation key and its host's maxMemoryAllocationSize; and the venues allow
six devices, not seven. Both tests now say so.

Verified: cargo fmt; clippy and the c3/candidate tests run as a potluck job.

Iris venue tests: the venues that present the requirements documents no longer list the RPL-S

The RPL-S is no venue device since 51c031e187, so the presented-on lists of
lunarg-desktop-baseline-2023 and roadmap-2022 drop it.

Verified: cargo fmt; clippy and the c3/candidate tests run as a potluck job.

Fix for development's red since SEMANTICS 2128 (d3b1dbdbe0): DriverWorkaround::PushReadsLengthenThreadPayload is keyed on the RPL-P (8086:a7a0) alone, so the RPL-S capture's derived profile takes another translation key, and every test that loads the committed venues failed (c3::tests x6, guards::no_venue_runs_a_guarded_target_under_robustness_1_alone, profiles::tests x2, integration authored_compile_census and private_corpus_root). Verified (m3-max-34762, msi, at b5d745e599): validation clippy --all-targets --all-features 0; c3:: + candidate:: tests 270/270.
2026-11-15 19:37:36 -08:00
Anees Iqbal 2a44c53833 Recapture the Hawk Point 780M's profile at Mesa 26.2.6
amd-780m-hawkpoint-radv (no venue names it) documents itself as the 780M of
Phoenix under another deviceID, captured under the same RADV build; with
amd-780m-radv now captured at 26.2.6 that held only after recapturing it too.
Captured on the cluster's Hawk Point 780M (1002:1900, radeon ICD,
MESA_VK_DEVICE_SELECT=1002:1900!): vulkaninfo reports "AMD Radeon 780M
Graphics (RADV PHOENIX)", driverInfo "Mesa 26.2.6-arch3.1", deviceID 0x1900;
packages mesa and vulkan-radeon 26.2.6, vulkan-icd-loader and vulkan-tools
1.4.363.0.

Regenerated with regen_device_profiles.py --offline from that capture and its
corpus-vulkan --capture-formats supplement (sources pinned in SOURCES). The
document changes only in its identity, provenance and the two fragment
shading rate limits the 780M's own recapture moved
(maxFragmentShadingRateCoverageSamples 32 -> 16, ...RasterizationSamples 8 ->
4), which no translation reads. Against the 26.2.6 capture of the Phoenix
780M, the Hawk Point capture differs in deviceID, the DRM minors, the PCI bus
and deviceUUID only; its formats supplement in device_id only.
2026-11-11 05:50:37 -08:00
Anees Iqbal 4db0484a9d Recapture the Iris Xe venue's profile at Mesa 26.2.6 and declare its identity
The cluster's Iris Xe (RPL-P, 8086:a7a0, homelab ms01) runs Mesa 26.2.6-arch3.1 now, so every
intel-irisxe-rplp-anv run was refused as a venue mismatch against the 26.2.4 profile and
identity.

intel-irisxe-rplp-anv.json is regenerated from a vulkaninfo --json capture and its
corpus-vulkan --capture-formats supplement taken on the venue's device (intel ICD; vulkaninfo
printed deviceName "Intel(R) Iris(R) Xe Graphics (RPL-P)", driverInfo "Mesa 26.2.6-arch3.1",
apiVersion 1.4.354; mesa and vulkan-intel 26.2.6, vulkan-icd-loader and vulkan-tools
1.4.363.0), and c3-venues.json declares the RPL-P's identity at driverVersion 109060102 and that
driverInfo. Against the 26.2.4 capture only the driver version and info and
maxMemoryAllocationSize (24955668480 -> 24950464512, sized from the host's memory, no profile
field) differ; the formats supplement is unchanged in content.

The venue's second device, the UHD Graphics 770 of RPL-S (intel-uhd770-rpls-anv), stays as
captured under ANV 26.2.4: no cluster host has that GPU, so it cannot be recaptured here. Its
capture still derives the venue's translation key (the only difference from the RPL-P's
description is still maxMemoryAllocationSize). The regen script's comment and the two-device
test's doc say which build each capture is of. c3::tests' driver-drift case declares a driver
the profile does not state (now 26.2.7 against the profile's 26.2.6).

Verified: check_device_profiles.py (19 profiles, 0 findings).
2026-11-11 05:50:37 -08:00
Anees Iqbal 6caa5a3924 Recapture the 780M venue's profile at Mesa 26.2.6 and declare its identity
The cluster's Radeon 780M (PHOENIX, 1002:15bf) nodes run Mesa 26.2.6-arch3.1 now, so
every amd-780m-radv run was refused as a venue mismatch against the 26.2.4 profile and
identity, and no row of the venue could be recorded.

amd-780m-radv.json is regenerated from a vulkaninfo --json capture and its
corpus-vulkan --capture-formats supplement taken on the venue's device (homelab
um790's 780M, radeon ICD, MESA_VK_DEVICE_SELECT=1002:15bf!; vulkaninfo printed
deviceName "AMD Radeon 780M Graphics (RADV PHOENIX)", driverInfo
"Mesa 26.2.6-arch3.1", apiVersion 1.4.354), and c3-venues.json declares the venue's
identity at driverVersion 109060102 and that driverInfo. Against the 26.2.4 capture
the profile differs in the driver version and info and in two fragment shading rate
limits (maxFragmentShadingRateCoverageSamples 32 -> 16,
maxFragmentShadingRateRasterizationSamples 8 -> 4 samples), which no translation
reads; the formats supplement is unchanged in content (240 queried, 169 stated).

The venue's rows of 26.2.4 now read stale_device; they are re-recorded on the device
in the commits that follow.

Verified: check_device_profiles.py (19 profiles, 0 findings), the regen script's 41
unit tests.
2026-11-11 05:50:37 -08:00
Anees Iqbal 02e3c4825e State strictLines false in the Vulkan 1.2 floor profile's unrequired properties
VP_LUNARG_minimum_requirements_1_2 states no strictLines, and vk.xml gives
it limittype max, so VK_LAYER_KHRONOS_profiles kept the device's own value
for a run restricted to vk12-floor, while the product's reader takes false
for the absent member. On the NVIDIA RTX 5080 Laptop (strictLines true) the
restriction check refused both vk12-floor runtime lanes (absent_reads and
barycentric_weights: "limits.strict_lines: expected false, queried true").
The M3 (MoltenVK, false) never saw it.

strictLines is the property the generator's m2v_unrequired_properties block
exists for: one the product reads and the layer sets, that the base leaves
open, at the weakest value the specification permits. The block now states
it, and the generator's check that the base does not state a block member
reads VkPhysicalDeviceProperties' nested limits (before, any base limit
would have read as a restatement of limits itself). The product's reading
of vk12-floor is unchanged (false either way).

Verified: python3 -m unittest test_device_profiles (34 tests OK; with the
flattening reverted, the new test_a_limit_is_told_apart_from_the_limits_a_base_states
errors), check_device_profiles.py 19 profiles 0 findings. The 5080 lanes:
expected (run pending).

(cherry picked from commit 47d84ac2719daedeef2cf74751334d826d6fb905)
2026-11-05 05:10:39 -08:00
Anees Iqbal bbc7866fa0 Read nonStrictWideLinesUseParallelogram from the maintenance5 properties
The profile reader took VkPhysicalDeviceMaintenance5Properties' members
only through VkPhysicalDeviceVulkan14Properties, so a capture of a
Vulkan 1.3 device exposing VK_KHR_maintenance5, which carries only the
extension's structure, read nonStrictWideLinesUseParallelogram as false,
and the runtime would announce or band wide lines its device draws as
Metal's parallelogram. PROPERTY_STRUCTS now lists
VkPhysicalDeviceMaintenance5Properties and its KHR name; the member is
still read only where maintenance5 is exposed (the extension or 1.4).
The profile generator's EXTENSION_PROPERTIES states the member at the
value the reader takes when a requirements document lists the extension
and omits it (false).

Nothing moves: every committed capture that carries the extension
structure also carries the Vulkan 1.4 one, with the same value
(golden_hashes passes unblessed). The runtime-sources pin, which hashes
this file, is rewritten in the next commit.

Verified: nextest device::tests::description (23 pass), among them the
new wide_line_parallelograms_read_the_maintenance5_structure (a 1.3
document with the extension and either structure name reads true,
without the extension false, a 1.4 document's Vulkan 1.4 block true);
negative control: with the two names left out of PROPERTY_STRUCTS the
test fails; golden_hashes and fast_paths pass; scripts/regen-device-
profiles test_device_profiles.py and check_device_profiles.py clean.

(Carried to development from steelbrain/reims-graphics-kext 5651992284.)
2026-11-01 21:26:21 -08:00
Anees Iqbal eb41a55e82 Draw every width Apple's setLineWidth: takes, as Metal draws it
RenderCommandEncoder::set_line_width refused every width but 1
(AppleOnly::LineWidth). Measured on the Apple M3 Max under macOS 27.0.1
(probes/line_widths.m): each encoder starts at 1 and the width holds
across draws and pipeline states; Metal draws w' = floor(16 w) / 16
clamped to [0, 16] (NaN and negatives as 0, infinity as 16); at w' = 1
its ordinary diamond-exit lines; at every other w' Vulkan's non-strict
parallelogram (major axis the larger extent, x on a tie; minor-axis
edges through the endpoints, w' long and centred; ends not extended;
centres inside, top-left ties; the width not rounded); at 0 exactly the
pixel centres on the segment; one parallelogram per strip segment with
no joins; triangles in fill mode Lines draw their edges so; at 4
samples every width is the parallelogram at the sample positions.

The runtime (render/line_width.rs) keeps the quantized width in the
encoder state and routes each draw at w' != 1:
- the device's own lines (lineWidth w', no Bresenham mode) where it
  enables wideLines and w' lies in lineWidthRange above 0: exact where
  strictLines is unset, nonStrictWideLinesUseParallelogram set, w' > 1
  and on lineWidthGranularity; elsewhere announced device-wide-lines
  under the default DevicePolicy::wide_lines = WideLinePolicy::Device,
  and the band under WideLinePolicy::Exact (exact_answers() selects it);
- the pipeline's band variant otherwise (no wideLines, MoltenVK among
  them; w' outside the range; w' = 0 at half a width of
  2^-subPixelPrecisionBits): cull none, the band's front face, fill
  mode, a PATCH_LIST of two points, viewport 0's half extent pushed
  with the half width; strips and loops listed as their segments
  (ListGap::WideLines), flat inputs under the last provoking vertex
  read from the list led by the last vertex, which covers the same
  pixels.
Refused: Unsupported(WideLines) needing tessellationShader where neither
route draws a line; NotImplemented(RuntimeGap::WideLines) for a
triangle's edges or a mesh draw's lines the device's lines do not draw,
an amplified band, a rate-mapped pass and an execution's commands.
Counted: WorkCounts::device_wide_line_draws, line_band_draws.

The lane test runtime_lane::line_widths draws the probe's cases through
owned fixtures and compares every pixel with Metal's answers
(line_widths_m3_max.txt, the probe's output), checks each wide draw took
a route, and that every fragment is front-facing; its site WIDE_LINES
holds the new kind in the lane's degrade-notice closure.

Docs: FAST-PATHS.md's row for wide_lines and a known-gap bullet (edges
and mesh lines on devices without wideLines, near-plane cuts, band
fragments' inputs uncompared, width 1 on multisampled targets off
MoltenVK); API.md's policy bullet and degrade catalogue; the runtime
README's Line widths; RUNTIME-PORTING's row; REFUSALS.md regenerated
(reach rows for feature and gap WideLines, apple LineWidth gone).
Validation: the line limits the device description gained describe
execution and are not compared in a profile's subset check; the
generator's CORE_PROPERTIES and roadmap-2022's m2v_layer_presentation
state them at the reader's absent values; opened_chains reblessed (one
member more, wide_lines, on every device with it); golden_hashes'
profile fingerprints reblessed (no output cell moved); api_signatures
and api_surface name WideLinePolicy and LineBandState.

RUNTIME_VERSION 1712; the runtime-sources pin rewritten.

Verified on the M3 Max under MoltenVK 1.4.2 through maclock with the
validation layer: runtime_lane::line_widths, 4 tests pass. Default and
exact policies each: 102 cases, 100 matched pixel for pixel, 2 refused
(the two fill-mode Lines cases at width 4, NotImplemented(WideLines)),
0 announced; 46 draws took the band, 0 the device's lines (MoltenVK has
no wideLines). a_band_needs_tessellation (tessellationShader withheld:
width 0 refused needing it, width 2 refused, width 1 matches) and
the_lane_s_maps_tell_the_widths_apart pass. Negative control: the band
widened by 1/16 of a pixel fails both runs at LANE lines 0.5. Also
cargo clippy --workspace --all-targets --all-features -D warnings, plain
and with --cfg m2v_gpu; nextest of metal2vulkan, -air, -runtime and
-devtools (4954 run, the one failure the missing lane site, now
declared), of metal2vulkan-validation (the failures the profile rules,
chains and pin fixed here, rerun green) and of metal2vulkan-conformance
(1007 pass). Not run: lavapipe, RADV, ANV and NVIDIA lanes, which take
the device route.

(Carried to development from steelbrain/reims-graphics-kext b16d03150c.)
2026-11-01 21:26:20 -08:00
Anees Iqbal c5978ed3d6 Delete LinearTilingFeaturesUninitialized: MoltenVK 1.4.2 reports linear tiling consistently
One work packet, landed as 3 commits (5522085593..cc22d95bf9 on archive/development-linear-2026-10-28), in order:

* Delete LinearTilingFeaturesUninitialized: MoltenVK 1.4.2 reports linear tiling consistently

MoltenVK 1.4.1 built its format table before it set renderLinearTextures,
so a format's linear-tiling attachment and blit-destination features
differed between instances of one process (2 of 40 on the M3 Max). The
driver fact made every description leave those features out, so on
MoltenVK a texture over a buffer that renders or that blits write was a
shadow. Homebrew's MoltenVK 1.4.2, the only release we track, reads
gpuCaps.supportsRenderLinearTextures in setFormatProperties: 500 of 500
instances made one after another in one process, with the freed heap
poisoned between them, reported 0x8000dd83 for R8G8B8A8_UNORM,
B8G8R8A8_UNORM, R16G16B16A16_SFLOAT and R32_SFLOAT on the M3 Max
(driver 0x28a2). The owner's decision: delete the fact.

Deleted: the variant and its MEASURED row and docs,
DriverFact::unreliable_linear_tiling, DeviceDescription::
unreliable_linear_tiling, the stripping in DeviceDescription::query,
the capture supplement's stripping and the venue test's MoltenVK
branch, the core test of the stripped features, the regeneration
script's UNRELIABLE_LINEAR_FEATURES and its unit test, and the
FAST-PATHS bullet on MoltenVK buffer textures keeping a shadow.

Recaptured moltenvk-m3 on the M3 Max (macOS 27.0.1, Homebrew molten-vk
1.4.2, vulkan-tools 1.4.363.0) by the documented flow, each capture
under the Mac GPU lock: vulkaninfo --json and corpus-vulkan
--capture-formats, pinned in the script's SOURCES. The profile's format
diff is the linear tiling alone: COLOR_ATTACHMENT and BLIT_DST added on
56 formats, COLOR_ATTACHMENT_BLEND on 34 of them, in VkFormatProperties
and VkFormatProperties3; no linear depth/stencil attachment; the
sample counts unchanged. Also moved since the 1.4.1 capture: the driver
(10401 -> 10402, "1.4.2"), API 1.4.334 -> 1.4.357, VK_KHR_shader_quad_
control and shaderQuadControl gone (1.4.2 stops advertising them, as
driver_facts.rs records), and shaderRoundingModeRTEFloat64 and
shaderSignedZeroInfNanPreserveFloat64 now false (the device has no
shaderFloat64). The venue's declared identity follows (c3-venues.json,
the profiles README), so MoltenVK venue rows of 1.4.1 read stale until
re-recorded.

The tests that removed the quad-control feature from the 1.4.1 profile
to stand for 1.4.2 now read the capture as it is: simd_after_discard and
fragment_group_operations_run_full_quads take a profile whose driver
runs Metal's helpers (MetalFullQuads) as one that compiles without the
mode. opened_chains.txt is re-blessed for moltenvk-m3's four contexts
(one member and one extension fewer each).

RUNTIME_VERSION 1665 -> 1666: on MoltenVK a texture over an ordinary
buffer that renders or that blits write is now its own linear image,
not a shadow, which changes announcements and submissions. The runtime
sources pin moves with driver_facts.rs and query.rs. The translator reads
no linear tiling, so SEMANTICS_VERSION stays; moltenvk-m3's keys move
with its fingerprint. golden_hashes.tsv is stale for 2757 moltenvk-m3
cells (fingerprint bea6f0f2c6d5374f -> e69acb7b2f990adb), to re-bless on
development.

Verified: clippy --workspace --all-targets --all-features -D warnings,
plain and --cfg m2v_gpu; rustdoc of metal2vulkan and validation;
check_device_profiles.py (0 findings) and the script's 40 unit tests;
the core, air, runtime and devtools suites (5057 tests: fails only the
four quad tests fixed here, then passing, and golden_hashes); the
validation suite (1362, fails only opened_chains, re-blessed and
passing). On MoltenVK 1.4.2 under the GPU lock and memcap, --cfg
m2v_gpu, debug: 158 validation device tests (buffer_texture_renders,
_blits, _order, buffer_textures, linear_attachments, host_memory,
tile_shadows, kept_buffer_bytes, view_attachments, no_copy_textures,
surface_aliases, in_place_textures, degrade_notices, detach_textures and
the_formats_capture_is_the_product_queried_formats_of_the_venue_device),
157 passed; 135 more texture lanes, 133 passed; 90 runtime device
tests, all passed. The three failures fail identically at a527df636f.
Against a527df636f on the same device, linear_attachments printed
"over a Shared buffer ... aliased false" and 10 shadowed-texture notices
"the linear tiling of VK_FORMAT_B8G8R8A8_UNORM lacks COLOR_ATTACHMENT |
COLOR_ATTACHMENT_BLEND"; now "aliased true" and no notice of a missing
linear feature in any of the 383 tests.

* Re-pin the runtime sources at the landing tip

The landed packet changed a runtime-sources input, so the committed digest no

longer described the sources and `the_runtime_sources_are_the_committed_ones`

would fail. Recomputed over the same inputs and committed by land-pkt.sh.

* Re-bless the golden table after moltenvk-m3's recapture from MoltenVK 1.4.2

The profile's linear tiling now holds MoltenVK 1.4.2's attachment and blit features, and the
capture's version and extension moves (quad control gone), so its fingerprint and cells moved.
bless_engine_inventory, bless_golden_hashes and bless_engine_goldens at 69e9622aff;
public_fixtures_engine, air_input and golden_hashes: 28 passed.
2026-10-28 17:24:21 +02:00
Anees Iqbal 00f7c18aab Drop the Apple M4's device profile
The owner asked for the M4 profile to go: no venue runs an M4 (the M4
venue was dropped on 2026-10-11), and its capture differed from the M3
Max's only in the identity and the allocation sizes, so every test that
named it repeated the M3 Max's case.

- crates/metal2vulkan-validation/profiles/moltenvk-m4.json is gone, with
  its regen-device-profiles source, its README row and paragraph, and its
  four opened_chains.txt rows.
- MOLTENVK_CAPTURES holds the M3 Max alone. Tests that looped over both
  captures take the M3 Max's; loops over that one capture are unrolled
  (clippy's single-element rule). Tests that took the M4 as a device of
  the pixel interlock, of fragment stores, or of the family audit take
  the M3 Max's capture, which has the same features.
- validation: a_run_on_the_m4_at_the_m3_max_venue_stops_on_its_name_alone
  is gone; the C3 venue test builds its second GPU's device from the M3
  Max's capture under another name.
- Docs and a probe comment no longer name the capture.

Left red here, fixed in the next commit (which removes the per-release
driver table these tests pin): driver_facts tests that measure the M4's
identity (an_unmeasured_identity_takes_its_drivers_defects_alone,
moltenvk_1_4_2_is_measured_on_the_m3_max_alone,
moltenvks_linear_attachment_features_are_left_out,
the_profile_takes_the_deviations_its_driver_release_is_measured_with) and
two arith tests whose measured device was the M4
(half_arithmetic_on_the_device_follows_the_profile,
the_fused_multiply_add_route_follows_the_profile). The golden tables'
M4 columns are re-blessed after the change.

Verified: cargo clippy --workspace --all-targets --all-features
-D warnings is clean; the core suites ran (failures above, the run
continuing against this tree).

Originally bfdfe81d37 (archive/development-linear-2026-10-28).
2026-10-28 17:24:20 +02:00
Anees Iqbal e841dd6b4a Read the Radeon 780M of Hawk Point as the measured Phoenix 780M, with its own device profile
The Radeon 780M of Hawk Point (PCI device 0x1900) takes the driver facts measured on the Phoenix
780M (0x15bf), the same GPU, and gets its own committed device profile.

Folds in:
- Read the Radeon 780M of Hawk Point (0x1900) as the measured Phoenix 780M (0x15bf)

Verified by each folded change's own checks; the tree this series ends on is the one verified
at the tip on six GPUs, the CPU suites and lint (see the tables commit).
2026-10-19 00:16:00 +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 c05c380139 Match the M3 Max under macOS 27.0.1: measurements, profile, Metal rows and MoltenVK venue
The macOS 27 work packet: the M3 Max moved to macOS 27.0.1, where MoltenVK gives it the M4's
deviceID. Its measurements, its MoltenVK profile, its Metal rows (now the C3 reference) and its
MoltenVK venue rows are taken again, and the tests follow.

Read Metal's NotMipmapped anisotropic footprint through MoltenVK at level 0:
On macOS 27 Metal's anisotropic filter reads a sampler without a mip filter
differently once its level clamp reaches 1/64: the runtime's NotMipmapped form
(nearest mip, lod [0, 0.25]) handed MoltenVK an anisotropic footprint that
was not Metal's NotMipmapped one, and the anisotropic lane failed on the M3
Max under macOS 27.0.1. Through Metal's own sampler (VkProperty::MetalSampler)
with anisotropy and equal min and mag filters the sampler now clamps to
[0, 0]: with equal filters the level has no filter left to choose, and Metal
answers that sampler as NotMipmapped bit for bit. With filters that differ no
clamp reads Metal's answer at maxAnisotropy 2 to 16; that stays a known gap in
docs/FAST-PATHS.md.

RUNTIME_VERSION moves (renumbered once for the composed batch): a run of an unchanged
artifact samples differently.

Verified: metal::sampler unit tests (24, including the new
metals_own_anisotropic_sampler_reads_not_mipmapped_at_level_zero) at a release
build; runtime_lane::anisotropic_filter::anisotropic_samples_answer_within_
their_bounds_of_metals passes on the M3 Max, macOS 27.0.1, MoltenVK 1.4.1
(it failed at the round's first composed tree and at 61a2efc7d3).

Take the M3 Max's macOS 27 measurements on MoltenVK's shared Apple identity:
MoltenVK's deviceID on an Apple GPU is the macOS release and the GPU's
highest families (MVKPhysicalDevice::getHighestGPUCapability), so under
macOS 27.0.1 the M3 Max reports 0x1B000209, the M4's identity, and takes the
M4's driver facts. The owner's rule: an answer fact holds on the shared
identity only where measured on both GPUs; a cost fact follows the M3 Max.

- MetalNormStorageWrites and DepthTestKeepsDenormals, measured on the M4:
  re-measured on the M3 Max under macOS 27.0.1 with the fact taken, every
  channel and texel Metal's; kept, the evidence in their docs.
- GraphicsCubeGradientRoute stays measured on the macOS 26.7 identity alone;
  the shared identity's graphics route stays unmeasured.
- The interlocked pass: on the M3 Max under macOS 27.0.1 split ran about a
  quarter faster than whole (wall 721-769 us against 974-1045, GPU 671-719
  against 914-964, two runs of three rounds of 30 frames at 1920x1080
  RGBA16Float), so the shared identity's row moves from
  InterlockedPassWholeFaster to InterlockedPassSplitNoSlower. The M4's own
  measurement (whole faster) is in the row's doc and in docs/FAST-PATHS.md's
  known gaps. RUNTIME_VERSION 1190 on this branch covers it.
- APPLE_M3_MAX and APPLE_M4 say what the deviceID is.

Verified: the facts and timings on the M3 Max (macOS 27.0.1, MoltenVK 1.4.1)
through runtime-lane tests at the round's first composed tree with these facts; the
device::tests::driver_facts unit tests run at the rebased tip before landing.

Hold the degrade-notice lane to the resolves the device actually makes:
passes_degrade_once_per_kind expected the exact resolve and the device's
rounded one to be announced wherever the driver's RGBA8Unorm average at 4
samples is measured as Metal's, assuming a texture of 8 samples exists. The
M3 Max (macOS 27.0.1, MoltenVK 1.4.1) makes none at 8 samples, so neither
is announced there, and the lane failed. The filter now expects those two
where the average is not measured as Metal's or where the device makes an
8-sample texture.

Verified: runtime_lane::degrade_notices::passes_degrade_once_per_kind passes
on the M3 Max (it failed at 61a2efc7d3 and the round's first composed tree).

Write the tessellation test's vertex output as Metal's compiler does:
authored_tessellation_executes_native_patch_inputs hand-writes its AIR, and
its post-tessellation output carried metadata Metal's compiler does not
write (Xcode 27, every macOS target 13 to 27 checked): air.location_index on
a vertex output. Our AIR reader refused it (Abi(UnknownKey) for
air.location_index on a vertex output), as it should for a key the compiler
never writes there. The output now carries air.vertex_output with its
user(locn0) name, its type name and its argument name, as the compiler emits
it.

Verified: metal::tests::graphics::authored_tessellation_executes_native_
patch_inputs passes on the M3 Max, macOS 27.0.1 (it failed at 61a2efc7d3 and
the round's first composed tree).

Wrap the driver-facts claims test's doc at the line width:
The interlocked-pass sentence the shared-identity commit rewrote ran past
the 100-column doc width. No other change.

Hold the unmeasured-identity test to the macOS 27 identity's split form:
an_unmeasured_identity_takes_its_drivers_defects_alone still expected the
moltenvk-m4 capture to take InterlockedPassWholeFaster, which the shared
macOS 27 identity no longer does (it takes InterlockedPassSplitNoSlower, the
M3 Max's measurement). Found by the device::tests::driver_facts run at the
rebased tip.

Name the format where the formats capture and the product's query differ:
the_formats_capture_is_the_product_queried_formats_of_the_venue_device
compared every format's masks without naming the format, so a failure on
the M3 Max showed two masks and no format. Each assert now names it.
Test-only.

Capture the M3 Max's MoltenVK profile under macOS 27.0.1:
The reference Mac runs macOS 27.0.1 (26A434) now. Its moltenvk-m3 capture
(vulkaninfo --json and corpus-vulkan --capture-formats, Homebrew MoltenVK
1.4.1, vulkan-tools 1.4.350.1) is regenerated through
scripts/regen-device-profiles. Only the identity moved: MoltenVK's deviceID
on an Apple GPU is the macOS release and the GPU family, so the M3 Max now
reports 0x1B000209 (452985353), the M4's identity, and every capability,
limit and format mask is as before. c3-venues.json declares the new
identity.

The two captures now differ only in allocation sizes, which no translation
reads, so they derive one translation key:
- candidate::platform::profiles: a run on the M4 held to the M3 Max venue
  stops on the device name alone (the venue's identity guard, not product
  behaviour), and proceeds where the venue allows the M4.
- c3::tests: the M4's capture passes check_profiles as a second device of
  the venue; the list still refuses it for naming the M3 Max's Metal
  environment.
- device::tests::driver_facts: moltenvk-m3 takes the shared identity's facts;
  the macOS 26.7 identity (APPLE_M3_MAX), measured but with no committed
  capture now, moves to MEASURED_WITHOUT_PROFILE and keeps its coverage
  through a description at that deviceID, graphics cube route included.
- tests::engine_sampler_unk: the graphics cube route's test builds the
  M3 Max under macOS 26.7 the same way.
Docs: API.md and profiles/README.md say what MoltenVK's deviceID is.

Golden hashes and expectation rows that hold moltenvk-m3's translation key
are left for the round's bless. Verified: the capture on the M3 Max
(regen_device_profiles.py --only moltenvk-m3, check_device_profiles.py);
the unit tests above run at a build of this branch before landing.

Record the Metal rows of the M3 Max under macOS 27.0.1:
The reference Mac's Metal answers, apple-m3-max-macos27.0.1 (Apple M3 Max,
40 GPU cores, macOS 27.0.1 26A434, Xcode 27A266a, Metal toolchain 32023.921,
ORACLE_ABI metal-literal-resources-v48): corpus-metal --batch over every
case the 26.7 environment holds, in three maclock holds of about 6.5
minutes, then --batch-install. 2227 cases ran: 2223 qualified, 4 reference
gaps (the simdgroup_matrix 16x16 cases, GPUFamily10, as on 26.7), no
failure. The 26.7 rows stay.

Against the 26.7 rows: no status changed and 8 outputs moved, every one a
cube-gradient case with identical AIR and inputs (a54af728, 315ca8b0,
391fac4d, 6ce71712, ae7aa91b, b3e5b4ef, dd39e2e5, 649c204a). Those 8 ran a
second time identically. Every other case answers as on 26.7.

Expect the M3 Max's and the M4's MoltenVK captures to share a fingerprint:
fingerprints_distinguish_committed_profiles listed only the two Intel
captures as sharing a fingerprint, kept apart for the Apple GPUs by the
graphics cube route measured on the M3 Max's macOS 26.7 deviceID. Under
macOS 27 MoltenVK gives the M3 Max and the M4 one deviceID, and the captures
differ only in allocation sizes, so moltenvk-m3 and moltenvk-m4 now derive
one fingerprint; the test lists the pair.

Found by device::tests at a build of this branch; device:: (104) and
tests::engine_sampler_unk (8) pass with it on the release build.

Make the M3 Max under macOS 27.0.1 the C3 reference Metal environment:
The reference Mac runs macOS 27.0.1 (26A434), and its Metal rows are
committed (apple-m3-max-macos27.0.1). The switch:
- c3-references.json: the primary is apple-m3-max-macos27.0.1 (Apple M3 Max,
  40 cores, 27.0.1, 26A434, Xcode 27A266a, Metal toolchain 32023.921).
- c3-venues.json: the MoltenVK venue's device compares with it.
- runtime_lane::METAL_ENVIRONMENT, the reference and venue tests, and
  scripts/rerecord-venue's default name it.
- The parity lines: record_metal and the sequences' record_metal on the M3
  Max under macOS 27.0.1. The four scenarios recorded 68, 240, 95 and 36
  records; the 64 sequence seeds 8534 records, 0 differences from the model
  and no Metal-side gap (seeds 32, 51 and 62 crashed Metal's driver under
  26.7; they run under 27.0.1). The 26.7 lines and rows stay.

Verified on the M3 Max (release, --cfg m2v_gpu, the validation layer on):
runtime_lane::driver_deviations::cube_gradients_through_an_anisotropic_
sampler_answer_as_metal passes against the 27 rows (MoltenVK answers Metal
27's cube gradients; it failed against the 26.7 rows); parity::tests::
committed_records_are_current and the 14 parity and sequence lanes pass (their
2 recorders are ignored); the
c3::, candidate::platform::profiles::, candidate::engine::guards:: and
parity::tests:: modules pass (98 tests).

Record the M3 Max's MoltenVK venue under macOS 27.0.1 at product 15b6df4e2bd0:
Rows and refusals recorded by one build (executor vulkan-engine-v181, product
15b6df4e2bd0cb440724ffe07ba95f1ccf6d0a5dd7fb5055598e70c877596734, semantics 1698, oracle
metal-literal-resources-v48) at this commit's product, on the Apple M3 Max under macOS 27.0.1 (MoltenVK
1.4.1, deviceID 0x1B000209). They are judged against the apple-m3-max-macos27.0.1 Metal rows and
were installed by scripts/rerecord-commit --no-commit. No later commit changes the product, so every row installed here stays current.

- apple-m3-max-moltenvk (moltenvk): 4389 rows, 56 refusals, over 2223 cases in two legs
- stated: 2168 match, 23 mismatch, 31 refused, 1 failed
- robustness-off: 2175 match, 23 mismatch, 25 refused

Against the macOS 26.7 rows, per case and leg:
- Of the earlier matches, 2965 still match, none mismatches, and 1 failed (below).
- 13 earlier mismatches and 13 earlier refusals now match; 38 mismatches and 42 refusals remain.
- 1374 runs had no 26.7 row: 1352 match, 14 refused, 8 mismatch. The 8 are the robustness-off
  leg of four linked-single radix13 and radix15 zero-write cases whose stated leg was already a
  mismatch, and both legs of the two new cases quad-broadcast-first-in-an-arm-metal-speculates
  and quad-broadcast-first-in-a-fragment-arm-metal-speculates.

The failed run is authored-four-iteration-loop (3cf0a3f024a5), stated leg. Metal's compiler
connection was interrupted while it compiled the compute pipeline (XPC_ERROR_CONNECTION_INTERRUPTED
after MoltenVK's retries), on both the first try and the --retry-failed run. Its robustness-off leg
matches, and under 26.7 it matched in both legs. Its stated slot keeps the 26.7 row, which C3 reads
as stale. Two msl-4-1 cases the venue's selection did not include also keep 26.7 rows that read
stale.

Verified:
- corpus-moltenvk --batch-report reads this_build=yes for the out directory at the recording tree and at the round's
  final tree (the table bless after this commit), which adds only tests, test tables and docs.
- corpus-status --c3 prints the same report at both trees. The MoltenVK slots (stated, then
  robustness-off) read: match 2168 and 2175, reviewed 10 and 10, mismatch 13 and 13, refused 25
  and 19, ray tracing out of scope 6 and 6, stale 3 and 1.

Versions: RUNTIME_VERSION 1205 -> 1211. RUNTIME_VERSION moves: MoltenVK's NotMipmapped anisotropic
footprint is read at level 0, and the macOS 27 Apple identity takes InterlockedPassSplitNoSlower.
crates/metal2vulkan-validation/runtime-sources.sha256 holds
e74792b15fd66114fb4efcc8e281318bfe1e16a3b8532e90d737834ea5a2add3, the hash of this tree's runtime
inputs (runtime-pin.py, which reproduces build.rs's). Version numbers quoted above are the values
the work's branch built with. Each part's Verified lines name the tree it ran at.
2026-10-14 20:17:42 +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