Files
metal2vulkan/scripts
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
..