diff --git a/crates/metal2vulkan-conformance/probes/astc_hdr_textures.m b/crates/metal2vulkan-conformance/probes/astc_hdr_textures.m index 775b3e082..58396d233 100644 --- a/crates/metal2vulkan-conformance/probes/astc_hdr_textures.m +++ b/crates/metal2vulkan-conformance/probes/astc_hdr_textures.m @@ -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: // diff --git a/crates/metal2vulkan/src/ash_interop/query.rs b/crates/metal2vulkan/src/ash_interop/query.rs index 8d31a19fe..dce5f4e6f 100644 --- a/crates/metal2vulkan/src/ash_interop/query.rs +++ b/crates/metal2vulkan/src/ash_interop/query.rs @@ -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) { diff --git a/crates/metal2vulkan/src/device/description.rs b/crates/metal2vulkan/src/device/description.rs index e050203c6..38fa629cf 100644 --- a/crates/metal2vulkan/src/device/description.rs +++ b/crates/metal2vulkan/src/device/description.rs @@ -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, diff --git a/crates/metal2vulkan/src/device/khronos.rs b/crates/metal2vulkan/src/device/khronos.rs index d44918acd..2e8919228 100644 --- a/crates/metal2vulkan/src/device/khronos.rs +++ b/crates/metal2vulkan/src/device/khronos.rs @@ -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 diff --git a/crates/metal2vulkan/src/device/tests/description.rs b/crates/metal2vulkan/src/device/tests/description.rs index f9e8d618e..52656dff1 100644 --- a/crates/metal2vulkan/src/device/tests/description.rs +++ b/crates/metal2vulkan/src/device/tests/description.rs @@ -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": {}"#); diff --git a/crates/metal2vulkan/src/lib.rs b/crates/metal2vulkan/src/lib.rs index cc41504d0..562ac8cfe 100644 --- a/crates/metal2vulkan/src/lib.rs +++ b/crates/metal2vulkan/src/lib.rs @@ -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; diff --git a/scripts/regen-device-profiles/README.md b/scripts/regen-device-profiles/README.md index 68708b0eb..c8223b777 100644 --- a/scripts/regen-device-profiles/README.md +++ b/scripts/regen-device-profiles/README.md @@ -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 diff --git a/scripts/regen-device-profiles/regen_device_profiles.py b/scripts/regen-device-profiles/regen_device_profiles.py index cffdd91cd..4cd745bd4 100755 --- a/scripts/regen-device-profiles/regen_device_profiles.py +++ b/scripts/regen-device-profiles/regen_device_profiles.py @@ -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. """