Files
metal2vulkan/crates/metal2vulkan-validation/runtime-sources.sha256
T
Anees Iqbal 10c0092814 Translator: Device::from_queries refuses a description listing shaderQuadControl without shaderMaximalReconvergence
What: device::enables::check_invariants refuses (InvalidDescriptor, DeviceDescription) a
description that lists ShaderQuadControl without ShaderMaximalReconvergence.
VK_KHR_shader_quad_control requires VK_KHR_shader_maximal_reconvergence, and a device that
supports that extension supports shaderMaximalReconvergence (Vulkan's Feature Requirements, the
"If VK_KHR_shader_maximal_reconvergence is supported" line), so no device offers the one without
the other. A fragment function that runs its quads whole declares MaximallyReconvergesKHR beside
RequireFullQuadsKHR, because its group operations other than the quad ones reach the helpers only
under that mode (section 9.31). The DeviceReconvergence wording is unchanged. Device::from_queries'
doc and lower::simd's Helpers paragraph now say so. New test:
device_new_refuses_quad_control_without_maximal_reconvergence. The runtime-floor description at
1.2 with both extensions and shaderQuadControl alone is refused, naming both features; with the
reconvergence feature added it is made, and its subgroup model has quad control and maximal
reconvergence. The test also asserts that every committed profile listing quad control lists
both.

In-tree descriptions that claim quad control without the feature: 0 shipped.
- Profiles: 12 of the 16 committed ones (crates/metal2vulkan-validation/profiles/*.json) list
  shaderQuadControl, and all 12 list shaderMaximalReconvergence. below-floor/vk12-floor.json
  lists neither.
- No fixture or other JSON names quad control (git grep over the tree, corpus aside). The command
  line reads the same profiles.
- Tests: 1 synthetic device, in the runtime's floor test quad_control_is_enabled_where_reported,
  lists the extension and reports the feature without the reconvergence feature. It checks the
  floor's enables alone and never reaches Device::from_queries, so it is left as it is.
- No translator test builds a description with quad control by hand.

Left unreachable: nothing to delete.
- The fragment reconvergence choice in simd::finish still serves fragments without full quads,
  vertex functions and kernels.
- PrecisionNote::FragmentSimdgroupGrouping is still attached on every device: by a fragment's
  simdgroup members, and by a discarding function's quad operation beside a helper query. Neither
  depends on reconvergence, so its catalogue row stays.

Surface: docs/REFUSALS.md is unchanged after scripts/refusal-surface/refusal_surface.py (the
refusal is InvalidDescriptor, not a refusal of something Metal accepts). No public item changed,
so the api_surface table is unchanged. SEMANTICS_VERSION does not move: no stored row's verdict
moves, because every committed profile with quad control has the feature.

Runtime guard: enables.rs and derive.rs are runtime inputs, so
crates/metal2vulkan-validation/runtime-sources.sha256 moves to dd90f6ef3f... (computed by the
build's hash rule, which reproduced the committed 7e32c33f29... before the edit). RUNTIME_VERSION
is not bumped: no run on a description Vulkan allows behaves differently; only a description
Vulkan rules out is refused at Device::from_queries.

Consumer: in reims-vgpu at afa5d6c5d1, git grep -E 'DeviceDescription::new|DeviceDescription
\{|from_khronos_json|ShaderQuadControl|ShaderMaximalReconvergence|shaderQuadControl|
with_enabled\(' finds no hand-built description, only one line in docs/accuracy-ledger.md.

Verified: the check job that follows this commit runs the device tests, the runtime guard and
clippy.
2026-11-23 04:05:51 -08:00

2 lines
65 B
Plaintext

dd90f6ef3fff8bfdbcd48e08b564c0da25b399b20cc837f22d4da0bb6162449a