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.
regen-device-profiles
Regenerates the committed device profiles in crates/metal2vulkan-validation/profiles/*.json from pinned public
sources, and lints them. Each file is a Khronos profiles-schema (0.8) document with exactly one
profile, VP_M2V_<file stem>, plus a top-level provenance object. Nothing is invented: a field
the source does not report is absent, and a source field the converter cannot represent is listed
in provenance.unmapped rather than guessed.
python3 scripts/regen-device-profiles/regen_device_profiles.py # fetch, convert, write
python3 scripts/regen-device-profiles/regen_device_profiles.py --offline # cache only
python3 scripts/regen-device-profiles/check_device_profiles.py # offline lint
python3 scripts/regen-device-profiles/check_device_profiles.py --schema profiles-0.8-latest.json
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts/regen-device-profiles
The profiles are data for the translator's device module and validation's
per-profile checks; nothing in the product reads them at runtime.
Sources
| Kind | Input | Transformation |
|---|---|---|
gpuinfo |
raw vulkan.gpuinfo.org report, api/v2/getreport.php?id=N, pinned by SHA-256 |
typed conversion through the pinned Vulkan-Headers vk.xml |
khronos |
a pinned KhronosGroup/Vulkan-Profiles file | one profile and its capability blocks, verbatim; profile renamed; a profile that states no formats gets the Required Format Support tables (below); a source marked layer_presentation gets the block m2v_layer_presentation: each feature its core version requires that it omits, and each member the product reads of the core property structures of its version (CORE_PROPERTIES, or the value a feature it states makes exact, FEATURE_EXACT_PROPERTIES) and of the property structures of the extensions it lists (EXTENSION_PROPERTIES) that it omits, at the value the product's reader takes, and each format several of its blocks state, at the union of their flags (the layer keeps the last block's entry of a format; the reader ORs them), so that VK_LAYER_KHRONOS_profiles reports the profile as the product reads it (the regeneration fails on a version or an extension property structure the product reads whose values it does not model) |
derived |
VP_LUNARG_minimum_requirements_1_2 (vk12-floor) or _1_3 (runtime-floor) |
features reduced to vk.xml's unconditional requirements through the source's minor version; for a source marked complete_required, each such requirement the base omits stated in the block m2v_required_features (provenance.added_features); for runtime-floor, the block m2v_runtime_floor: what metal2vulkan-runtime's floor requires (RUNTIME_FLOOR, held equal to floor.rs by the runtime's the_floor_profile_states_exactly_the_floor); where a feature a block requires makes a property exact or conditions a limit (FEATURE_EXACT_PROPERTIES, FEATURE_LIMITS: the Required Limits table's value for a device with the feature), that value in place of the base's (provenance.feature_limits); a base value the Vulkan 1.2 specification contradicts replaced by the specification's (SPEC_CORRECTIONS, named in provenance.spec_corrections; the regeneration fails when the base states another value or none); plus the Vulkan 1.2 Required Format Support tables (below), and the block m2v_unrequired_properties: the weakest value the specification permits for each property the product reads, and VK_LAYER_KHRONOS_profiles sets, that the base leaves without a requirement (strict lines, quad operations in all stages), which the layer would otherwise take from the device |
vulkaninfo |
a local vulkaninfo --json capture, and for a Vulkan 1.3+ device its corpus-vulkan --capture-formats supplement |
the capture's profile (a portability-subset one where the device has the subset); identical queue families collapsed (schema uniqueItems); an extension the pinned registry does not define and a pointer member written as NULL removed and named in provenance.unmapped; each format's VkFormatProperties3 from the supplement |
gpuinfo's own profile export (api/v3/getprofile.php) returned HTTP 500 for every report when
these files were produced, so reports are converted here. The converter was cross-checked against
gpuinfo's export of report 49700 committed in KhronosGroup/Vulkan-Profiles
(VP_LUNARG_desktop_baseline_2026/vp_gpuinfo_intel_r__iris_r__xe_graphics__tgl_gt2__26_1_3_void_unknown.json):
every shared value agrees except where the export drops information (format feature bit 16,
subgroup rotate bits, maxTimelineSemaphoreValueDifference clamped to INT64_MAX), spells an
enum through an alias, or rounds a float.
Required Format Support
required_formats.py reads the Vulkan 1.2 specification's "Required Format Support" tables from
its AsciiDoc source (Vulkan-Docs v1.2.203, the last 1.2 revision, chapters/formats.txt,
pinned by SHA-256): vk.xml describes formats but not the features they must support, and
Vulkan-Profiles encodes no core format table. It evaluates the section's conditionals for core
1.2 (VK_VERSION_1_0..1_2, no extension), lays every formats-mandatory-features-* table out as
a grid, and reads {sym1} as unconditional and every other symbol through its table's footnote,
which must match one of three forms exactly (a feature condition, a choice between two formats, a
choice between whole tables); anything else fails the regeneration. Formats required to support
SAMPLED_IMAGE also get TRANSFER_SRC/TRANSFER_DST (the section's own sentence).
A requirements profile that states no formats (derived, and khronos without a formats
section) gets the block m2v_vulkan12_required_formats (every unconditional entry), one block
m2v_vulkan12_required_formats_if_<feature> per feature it requires that makes conditional
entries unconditional, and provenance.required_formats: the pin, the rule, and every
conditional requirement (any_of tables, at least one of which holds in full; if_feature when
it binds only a device with that feature). A choice between formats or tables has no single-device
form, so no profile states it; the Rust test device::tests::required_formats checks every
committed profile against both parts.
The vulkaninfo capture opens a device, so the script never takes it. Capture it by hand on the
host whose profile it records. vulkaninfo --json never writes VkFormatProperties3, so a source
that declares formats also takes the same device's supplement from corpus-vulkan --capture-formats, which selects the device as a venue run does and writes the device's identity
and the three 64-bit VkFormatFeatureFlags2 masks of every format the pinned registry names that
the device exposes, with the sample counts of a color attachment of each format whose optimal
tiling has COLOR_ATTACHMENT:
vulkaninfo --json
corpus-vulkan --capture-formats formats.json --device-type gpu
python3 scripts/regen-device-profiles/regen_device_profiles.py --only moltenvk-m3 \
--capture moltenvk-m3=VP_VULKANINFO_Apple_M3_Max_0_2_2210.json \
--formats moltenvk-m3=formats.json
The conversion fails unless both files describe one device (name, vendor and device IDs, driver
ID, driver version, driver info, API version, device type), every format the capture states is in
the supplement with the capture's 32-bit features, and every format the supplement reports with a
feature is one the capture states; it then writes each format's VkFormatProperties3 beside its
VkFormatProperties, the color attachment formats' sample counts under the top-level object
m2v_color_attachment_sample_counts (keyed by profile name; the schema has no structure for them),
and provenance.formats names the supplement's pin and how many formats have counts. A
supplement without the counts, or with counts for a format whose optimal tiling has no
COLOR_ATTACHMENT, fails the conversion. Without --capture the
committed conversion is kept. A new capture or
supplement changes its pinned SHA-256 in SOURCES, so bump it deliberately. The lint refuses a
vulkaninfo profile of a Vulkan 1.3 or later device that lacks VkFormatProperties3 for a format
it states, or whose provenance.formats is not the supplement pinned in SOURCES.
A venue's profile (crates/metal2vulkan-validation/profiles/README.md) is recaptured, with its supplement, from the
venue's own device whenever its driver changes, in the commit that declares the venue's new
identity (docs/VALIDATION.md).
Downloads are cached by SHA-256 under .cache/device-profiles/ (gitignored). Rerunning the script
over unchanged sources is byte-identical; bump GENERATED when regenerated content changes.
Deviations
A document states no deviation from the specifications. Where a driver's answer to what the
specifications leave open is Metal's, the product takes it from the release-keyed table of what
each driver release is measured with (crates/metal2vulkan/src/device/driver_facts.rs), keyed on the document's
driverID, vendorID and driverVersion, and refuses a document that still holds the former
top-level m2v_deviations object.
Host identity
The last step of every conversion withholds the device-property members that identify the host or
driver build a source came from rather than describe the device (HOST_IDENTITY): every
VK_UUID_SIZE/VK_LUID_SIZE byte array of a device property struct (pipelineCacheUUID,
deviceUUID, driverUUID, deviceLUID, optimalTilingLayoutUUID, shaderBinaryUUID,
shaderModuleIdentifierAlgorithmUUID), the PCI address, and the DRM node numbers. A struct left
empty is dropped, and provenance.withheld lists what was removed. Regeneration fails when the
pinned vk.xml declares a UUID or LUID property the set does not name; the lint and the Rust test
device::tests::host_identity reject any committed file that carries one. A vulkaninfo
recapture goes through the same step.