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.
This commit is contained in:
Anees Iqbal committed 2026-11-25 12:22:03 -08:00
1 parent dd3f16a656
commit ab24c9617f
8 files changed
+22 -28

No files matched your search

@@ -21,7 +21,8 @@
// hold after.
//
// WHAT IT MEASURED, Apple M3 Max, macOS 27.0.1: see the module docs of the translator's
// `bind::astc_decode` and the runtime's `astc.rs`, which state Metal's answers.
// `bind::astc_decode`, which state Metal's answers, and the conformance suite's `astc-*-hdr`
// recordings.
//
// Build it, then run each case WITHOUT MTL_DEBUG_LAYER, with the Mac's GPU to itself:
//
+4 -4
View File
@@ -1049,10 +1049,10 @@ impl DeviceDescription {
vk::ShaderStageFlags::from_raw(g.supported_stages_pipeline_binding.as_raw()),
)
});
// No query reports where the driver departs from the specifications; the driver and
// its release decide it, measured (`device::driver_facts`). `VkFormatProperties3` where the
// effective version or an available extension has it, whose storage-without-format bits
// decide per format.
// No query reports where a driver departs from the specifications, and translation reads
// no driver identity (`Device::from_queries`). `VkFormatProperties3` where the effective
// version or an available extension has it, whose storage-without-format bits decide per
// format.
desc.khr_format_feature_flags2 =
exposure.extensions.contains("VK_KHR_format_feature_flags2");
for format in FormatSupport::queries_for(api, &desc.extensions) {
@@ -31,10 +31,8 @@ pub struct DeviceDescription {
pub driver_version: u32,
pub vendor_id: u32,
pub device_id: u32,
/// `VkPhysicalDeviceProperties::deviceName`. No translation reads it but through the tables
/// keyed on a measured GPU, where a `deviceID` names more than one GPU: MoltenVK's on Apple's
/// GPUs is the macOS release and the GPU family, so a release measured on one GPU of such an
/// identity names that GPU by its name (`driver_facts`). Empty where unknown.
/// `VkPhysicalDeviceProperties::deviceName`. No translation reads it (`Device::from_queries`
/// reads no identity). Empty where unknown.
#[cfg_attr(feature = "serde", serde(default))]
pub device_name: String,
pub device_type: Option<vk::PhysicalDeviceType>,
+3 -4
View File
@@ -21,10 +21,9 @@
//! and flag sets (`independentResolve`, the sample-location properties) state nothing.
//!
//! Where a profile's device departs from the specifications, which no Vulkan query reports,
//! is not the document's to state: its `driverID`, `vendorID` and `driverVersion` name the
//! driver and release whose measured deviations translation takes (`device::driver_facts`). A
//! document that still holds the former top-level `m2v_deviations` object is refused, so a
//! statement it makes is never silently dropped.
//! is not the document's to state, and translation takes no deviation: it reads no driver
//! identity (`Device::from_queries`). A document that still holds the former top-level
//! `m2v_deviations` object is refused, so a statement it makes is never silently dropped.
//!
//! A venue profile's document also states each color attachment format's sample counts, which no
//! profiles-schema structure holds, in a top-level `m2v_color_attachment_sample_counts` object
@@ -301,8 +301,8 @@ fn color_attachment_sample_counts_are_read_from_their_block() {
}
/// A document that still holds the former top-level `m2v_deviations` object is refused, whatever
/// it states, so a statement is never silently dropped: a driver's deviations are measured facts
/// of its release (`device::driver_facts`).
/// it states, so a statement is never silently dropped: translation takes no deviation, and reads
/// no driver identity (`Device::from_queries`).
#[test]
fn a_stated_deviation_is_refused() {
let base = doc("1.2.0", r#""a""#, r#""a": {}"#);
+5 -6
View File
@@ -41,12 +41,11 @@ pub(crate) mod spv;
pub(crate) mod structurize;
pub mod vk;
// Kept from before the re-architecture (X34): the host command-record format (`indirect_commands`,
// which lowering and the binder's replay share, and which consumers and validation's oracle and
// case model reach as `bind::indirect_commands`), the half-precision conversions, the
// `METAL2VULKAN_*` registry (which the `metal2vulkan` binary reads, so it is `pub` and hidden in
// every build), and, for the crate's tests and test support only, the SPIR-V binary parser. The
// external-tool runner is the dev-tools crate's (`devtools/`).
// Beside the API modules: the host command-record format (`indirect_commands`, which no lowering
// reads; validation's case model and Metal executor reach it as `bind::indirect_commands`), the
// half-precision conversions, the `METAL2VULKAN_*` registry (which the `metal2vulkan` binary reads,
// so it is `pub` and hidden in every build), and, for the crate's tests and test support only, the
// SPIR-V binary parser. The external-tool runner is the dev-tools crate's (`devtools/`).
#[doc(hidden)]
pub mod env_vars;
pub(crate) mod float16;
+2 -4
View File
@@ -94,10 +94,8 @@ over unchanged sources is byte-identical; bump `GENERATED` when regenerated cont
### 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
A document states no deviation from the specifications, and the product takes none: it reads no
driver identity (`Device::from_queries`). It refuses a document that still holds the former
top-level `m2v_deviations` object.
### Host identity
@@ -33,9 +33,8 @@ Source kinds:
Whatever the kind, the last step withholds the members that identify the reporting host or
driver build (`HOST_IDENTITY`: UUIDs, LUIDs, PCI address, DRM nodes) and names them in
`provenance.withheld`. A document states no deviation from the specifications: the product
takes a driver's measured deviations from its release
(`crates/metal2vulkan/src/device/driver_facts.rs`).
`provenance.withheld`. A document states no deviation from the specifications, and the product
takes none: it reads no driver identity (`Device::from_queries`).
Downloads are cached under `.cache/device-profiles/` (gitignored) and verified before use.
"""