Translator: its comments cite no deleted runtime crate or lane

The translator's comments cited the deleted runtime's files and the deleted validation lanes
(runtime_lane::*) as where a measurement or a mirror test lived, and called rt "the new runtime".
The measurements now stand as measured, and "the new runtime" says "the runtime". The crate
docs' last line names metal2vulkan-rt as the Metal-like runtime built on this API, and
scripts/api-docs no longer says the runtime uses the hidden env_vars and repro modules (nothing
outside the crate does).

Left for the translator-switch commit, which deletes what they describe: driver_facts.rs,
profile.rs, derive.rs, lockstep.rs's resident-table domains, the old render descriptor key
(compile/api.rs and its pinned test), DriverDeviation's doc in error/mod.rs, function_storage.rs,
and the Device::new notes in engine_private_render_state, engine_simd and engine_arith.

Comments only, plus the crate-root doc line and one script comment.
This commit is contained in:
Anees Iqbal committed 2026-11-20 07:59:12 -08:00
1 parent 2e7e1cf73e
commit 7596ec76db
35 files changed
+64 -76

No files matched your search

+1 -1
View File
@@ -78,4 +78,4 @@ The library needs none of them.
compiles one pipeline with this API and writes its SPIR-V. It enables `serde` and adds nothing
else to the library.
The Metal-like runtime is its own crate, `metal2vulkan-runtime`, built on this API alone.
The Metal-like runtime is its own crate, `metal2vulkan-rt`, built on this API alone.
@@ -216,8 +216,7 @@ fn the_depth_split_is_valid_where_the_device_has_what_it_needs() {
///
/// 65536 inputs is a small enough space to check whole, so it is checked whole rather than
/// sampled. This is the arithmetic the two shaders perform, in the same order and the same
/// precision; that a real device performs it so is the device test's half of the claim
/// (`metal2vulkan_runtime`'s multisampled depth round trip).
/// precision; that a real device performs it so is a device test's half of the claim.
///
/// Its failure mode was exercised while writing it: dropping the `+ 0.5`, so the conversion to
/// unsigned truncates `d * 65535` instead of rounding it, misses 36442 of the 65536 codes.
+2 -2
View File
@@ -1785,8 +1785,8 @@ fn plan(p: &RenderPipeline, device: &Device, shape: &BindShape) -> Result<Bindin
// The bound buffer's bytes before its bind offset and its length, which
// instantiation reads from the state.
PushField::SlotBounds(slot) if planned(slot).is_some() => {}
// The identity domains' zero range is the new runtime's own memory, and their
// bicubic slot's format treatment the new runtime's own field.
// The identity domains' zero range is the runtime's own memory, and their
// bicubic slot's format treatment the runtime's own field.
PushField::ZeroAddress | PushField::BicubicTexels(_) => {
return Err(not_implemented(Feature::IdentityDomains))
}
+2 -2
View File
@@ -452,8 +452,8 @@ fn plan(p: &ComputePipeline, device: &Device, shape: &BindShape) -> Result<Bindi
// The bound buffer's bytes before its bind offset and its length, which instantiation
// reads from the state.
PushField::SlotBounds(slot) if planned(slot).is_some() => {}
// The identity domains' zero range is the new runtime's own memory, and their bicubic
// slot's format treatment the new runtime's own field.
// The identity domains' zero range is the runtime's own memory, and their bicubic
// slot's format treatment the runtime's own field.
PushField::ZeroAddress | PushField::BicubicTexels(_) => {
return Err(not_implemented(Feature::IdentityDomains))
}
+1 -2
View File
@@ -101,8 +101,7 @@ pub const RUNTIME_VERSION: u32 = 2540;
/// of the manifest, the build script, and exactly the files the crate roots' module tree compiles
/// or reads. A cache of translations across builds keys on it beside [`SEMANTICS_VERSION`] and
/// [`ARTIFACT_FORMAT_VERSION`], so a build of other sources never reads another build's output,
/// even when no version moved; `metal2vulkan-runtime`'s shader cache does. An edit to a test-only
/// module leaves it unchanged.
/// even when no version moved. An edit to a test-only module leaves it unchanged.
pub const SOURCE_DIGEST: &str = env!("M2V_SOURCE_DIGEST");
/// Writes a digest as lowercase hex.
+1 -1
View File
@@ -51,7 +51,7 @@ pub mod vk;
pub mod env_vars;
pub(crate) mod float16;
pub(crate) mod indirect_commands;
// The FALLBACK repro bundles the `metal2vulkan` binary and metal2vulkan-runtime write (under
// The FALLBACK repro bundles the `metal2vulkan` binary writes (under
// feature `serde`): `pub` and hidden, as `env_vars` is, not API.
#[cfg(feature = "serde")]
#[doc(hidden)]
+1 -1
View File
@@ -262,7 +262,7 @@ pub fn limit(fb: &mut FunctionBuilder<'_>, length: Value, n: u32) -> BResult<Val
/// in the slot's buffer: `m` plus `before`, the buffer's bytes before the bind offset (from the
/// slot's pushed bounds, `PushField::SlotBounds`), under the slot's [`limit`] for the access's
/// size, both made once per function by `EmitCx::slot_limit`. One add and one compare per access,
/// in `u32`. Exact as the new runtime makes no buffer longer than 2 GiB: an offset that reaches
/// in `u32`. Exact as the runtime makes no buffer longer than 2 GiB: an offset that reaches
/// before the buffer's start wraps to at least 2^31, past every limit.
pub fn in_buffer(
fb: &mut FunctionBuilder<'_>,
@@ -121,7 +121,7 @@ pub fn declare(mb: &mut ModuleBuilder, placement: &PushPlacement) -> BResult<Opt
}
/// The bytes of the parameter block one load reads: a line of 16 bytes at a multiple of 16. The
/// block's address is a multiple of 16 (the new runtime's ring places every block so) and its size
/// block's address is a multiple of 16 (the runtime's ring places every block so) and its size
/// is one (`PushPlacement::argument_table_size`), so every line a field touches lies in the block.
pub const LINE: u32 = 16;
@@ -1,6 +1,5 @@
//! A float rounded to the code Metal stores in a color channel (`color_write::round`), on the
//! interpreter, against the rules probes measured on an Apple M3 Max and an M4
//! (`runtime_lane::color_writes` holds the same rules).
//! interpreter, against the rules probes measured on an Apple M3 Max and an M4.
//!
//! Each case writes one value to every lane of a four-lane output whose lanes take different
//! rules, so every rule runs beside the others. The reference is the value each rule writes: the
+2 -2
View File
@@ -2,7 +2,7 @@
//!
//! Each stage has a push window: vertex `[0, 64)`, fragment `[64, 128)`, compute `[0, 128)`.
//! Vulkan guarantees `maxPushConstantsSize ≥ 128`, so those windows depend neither on the other
//! stage nor on the device. On a profile whose push window is the new runtime's floor
//! stage nor on the device. On a profile whose push window is the runtime's floor
//! (`PushWindow::Floor`, `Device::from_queries`'), which requires `maxPushConstantsSize ≥ 256`, a
//! compute window is `[0, 256)` (a dispatch region and 24 buffer addresses below its tail), and a render
//! pipeline's two stages share one range `[0, 256)`, dense by link: the vertex function's fields
@@ -70,7 +70,7 @@ pub const fn window(stage: Stage, w: PushWindow, base: u32) -> (u32, u32) {
}
}
/// The push bytes of the new runtime's floor (`PushWindow::Floor`): its `maxPushConstantsSize`.
/// The push bytes of the runtime's floor (`PushWindow::Floor`): its `maxPushConstantsSize`.
pub const FLOOR_BYTES: u32 = 256;
/// The end of a vertex function's window on the floor: the floor's end less one address, so the
@@ -33,8 +33,8 @@
//! fraction and the levels' blend are the device's (`PrecisionNote::AnisotropicFilter`), so the
//! level, a tap count at a threshold and the spacing may differ from Metal's by their rounding.
//! The spacing past two taps below the cap is an approximation (`κ_n`). Each tap is the device's
//! own filter at the level handed to it, so its footprint and sum are the device's. The lane
//! `runtime_lane::anisotropic_filter` measures it on `rgba8Unorm` at `maxAnisotropy` 2 to 16.
//! own filter at the level handed to it, so its footprint and sum are the device's, measured on
//! `rgba8Unorm` at `maxAnisotropy` 2 to 16.
//!
//! **The form.** Each tap is one device sample at an explicit level: under a linear mip filter the
//! fractional level, which the device's linear mip filter blends: the device's blend, which need
@@ -228,9 +228,9 @@ const KAPPA: [(i32, f32); 8] = [
/// there, and blends nothing of level 1 at any mip precision up to 11 bits. Vulkan leaves an
/// anisotropic sampler's level and taps to the implementation ("Texel Anisotropic Filtering": "The
/// particular scheme for anisotropic texture filtering is implementation-dependent"), and an RTX
/// 5080's reads past level 0 at a fractional level whatever its mipmap mode (the lane
/// `runtime_lane::anisotropic_filter` at `MINIFIED_NEAREST`: a linear filter under a nearest mip
/// filter at `maxAnisotropy` 8 off by up to 147 codes).
/// 5080's reads past level 0 at a fractional level whatever its mipmap mode (measured at
/// `MINIFIED_NEAREST`: a linear filter under a nearest mip filter at `maxAnisotropy` 8 off by up to
/// 147 codes).
const MINIFIED_ZERO: f32 = 1.0 / 4096.0;
/// The level handed for level 0 where Metal's level is above 0 under a nearest mip filter or
@@ -1,8 +1,7 @@
//! Metal's anisotropic filter emulated: where a sample takes it, the module's shape, the notes it
//! records and the specialization a runtime sampler slot reads; every module validated by
//! `spirv-val` under its profile. The interpreter leaves `Exp2` unmodelled (the spacing's 6-bit
//! power reads it), so the footprint's values are the GPU lanes' to check (`validation`'s
//! `runtime_lane::anisotropic_filter`); these are shape tests.
//! power reads it), so the footprint's values are a device's to check; these are shape tests.
//!
//! `llvm-as` assembles the fixtures; without it the tests skip visibly.
@@ -28,7 +28,7 @@
//! Metal's where the profile takes `DriverDeviation::MetalColorWrites`, and a lane's the function
//! rounds to nearest even (its NaN `0x7fc00000`) where it takes `MetalFloatColorNans`; a `half`
//! output's on no device: it reaches the attachment held widened by the device's conversion,
//! whose NaN is the device's (`runtime_lane::color_writes`: NVIDIA's stores `0x7fff`, ANV and
//! whose NaN is the device's (measured: NVIDIA's stores `0x7fff`, ANV and
//! RADV store `0xfe00`, lavapipe quiets or canonicalizes a `half` NaN, MoltenVK canonicalizes
//! it); elsewhere the module records the note. An output every return of which holds a constant
//! none of whose lanes is a NaN (`stage_io::returns_no_nan`) stores none, and records no note for
@@ -10,8 +10,8 @@
//!
//! [`footprint`] is the first question for the formats whose answer the format's own structure
//! decides — its block's bytes and texel extent, and how many planes Metal lays its bytes in —
//! and `None` for every format whose footprint the image this crate maps it to decides, which
//! `metal2vulkan-runtime`'s `texture/heap_tiled.rs` reads from that image instead. The two never
//! and `None` for every format whose footprint the image this crate maps it to decides, which the
//! runtime reads from that image instead. The two never
//! answer for one format (`tests::footprint_answers_where_no_image_does`), and every byte count
//! here is held to the bytes of a format the crate **does** hold whose element is the same size
//! (`tests::footprint_bytes_match_a_held_twin`), so no number here is one nobody checked.
+2 -2
View File
@@ -1226,8 +1226,8 @@ macro_rules! formats_held_for_copies {
///
/// Measured on an Apple M3 Max under macOS 27.0.1, plain Metal (the `format-footprints-*`
/// conformance recordings): `newTextureWithDescriptor:` makes a texture of each in every texture
/// type its type rules take (`metal2vulkan-runtime`'s `texture_descriptor.rs`: no cube of a
/// one-plane YCbCr format), in `Shared` and `Private` storage, and `replaceRegion:` and
/// type its type rules take (no cube of a one-plane YCbCr format), in `Shared` and `Private`
/// storage, and `replaceRegion:` and
/// `getBytes:` move each texel's bytes unchanged, 2 or 4 a texel ([`footprint()`]'s element), a
/// fresh texture's reading zero; where Metal keeps the texture compressed (seven of the padded
/// formats, 16 by 16 under `ShaderRead`) both host copies leave their destinations as they were,
+2 -2
View File
@@ -19,8 +19,8 @@
//! it too, measured the same way on the same device, its red at bit 8, green 4, blue 0 and alpha
//! 12, read back off Metal's own words.
//!
//! Metal's store into an 8-bit sRGB format (`R8Unorm_sRGB`, `RG8Unorm_sRGB`; the lane's rule,
//! `runtime_lane::color_writes`, and its in-guest probe's clears and draws on the M3 Max): each
//! Metal's store into an 8-bit sRGB format (`R8Unorm_sRGB`, `RG8Unorm_sRGB`; an in-guest probe's
//! clears and draws on the M3 Max): each
//! channel's value clamped to `[0, 1]` (a NaN 0), times 4095 exactly, rounded to nearest, encoded
//! by Metal's twelve-bit table, as `pack_float_to_srgb_unorm4x8` encodes a color channel. The
//! fragment function encodes the channel by the MSL transfer through the device's `Pow`, as its
@@ -5,14 +5,15 @@
//! float written to a normalized attachment as the exact product with the format's maximum code
//! rounded to nearest, to an 8-bit sRGB one through its twelve-bit encode, and to a half-float one
//! rounded toward zero (`metal::format::write_conversion`, probes on an Apple M3 Max and an M4).
//! ANV, RADV and lavapipe round the `f32` product with ties to even, NVIDIA's 615.71.09 on the
//! RTX 5080 Laptop GPU stores an 8-bit channel's lower code on a tie and up to two `f32` steps above
//! ANV, RADV and lavapipe round the `f32` product with ties to even, NVIDIA's 615.71.09 on the RTX
//! 5080 Laptop GPU stores an 8-bit channel's lower code on a tie and up to two `f32` steps above
//! one (0.5 as `0x7f`, where Metal stores `0x80`), and each encodes sRGB by its own approximation,
//! so near a tie they may store another code (`runtime_lane::color_writes`). Their half-float and small-float channels round toward zero as
//! Metal's do where measured (`DriverDeviation::MetalSmallFloatColorWrites`: RADV on the Radeon
//! 780M, ANV on the Iris Xe and the UHD 770, NVIDIA on the RTX 3090, NaNs aside); only MoltenVK on
//! Apple's GPUs stores Metal's codes for every format (`VkProperty::MetalColorWrites`). The map names each channel's rule so the
//! fragment function can record where the device's conversion is not measured to be Metal's
//! so near a tie they may store another code (measured). Their half-float and small-float channels
//! round toward zero as Metal's do where measured (`DriverDeviation::MetalSmallFloatColorWrites`:
//! RADV on the Radeon 780M, ANV on the Iris Xe and the UHD 770, NVIDIA on the RTX 3090, NaNs
//! aside); only MoltenVK on Apple's GPUs stores Metal's codes for every format
//! (`VkProperty::MetalColorWrites`). The map names each channel's rule so the fragment function can
//! record where the device's conversion is not measured to be Metal's
//! (`PrecisionNote::DeviceColorConversion`); it rounds none of them. On MoltenVK the map keeps the
//! half-float channels alone, which record the device's NaN encoding of a `half` output.
//!
@@ -543,8 +543,8 @@ pub struct PrivateRenderState {
/// `openGLModeEnabled` (default off): changes nothing Metal draws or reflects, and makes two
/// states Metal otherwise refuses (`pipeline::private_state`'s docs): a fragment function
/// writing depth without a depth attachment, its depth going nowhere, and a rasterizing state
/// whose vertex function returns `void`, which rasterizes nothing. The runtime answers both
/// (`metal2vulkan-runtime`'s `new_render_pipeline_state`), the second as the state of the
/// whose vertex function returns `void`, which rasterizes nothing. The runtime answers both,
/// the second as the state of the
/// descriptor with rasterization disabled; the compile reads it not, and its link refuses a
/// rasterizing `void` vertex function whatever the mode
/// ([`DescriptorError::RasterizedVoidVertex`](crate::error::DescriptorError::RasterizedVoidVertex)).
@@ -3,8 +3,8 @@
//! four samples, alpha to coverage off and on, on committed profiles.
//!
//! Vulkan specifies no algorithm for converting the alpha to a coverage mask, where Metal's
//! coverage is its own (a 2x2 ordered dither at two and four samples, measured on an Apple M3 Max
//! by `runtime_lane::alpha_coverage`), so a pipeline that covers by alpha
//! coverage is its own (a 2x2 ordered dither at two and four samples, measured on an Apple M3
//! Max), so a pipeline that covers by alpha
//! (`GraphicsState::alpha_to_coverage`) records `PrecisionNote::DeviceAlphaCoverage` on its
//! fragment stage, and the vertex stage records none; on a profile measured to cover as Metal
//! does (`DriverDeviation::MetalAlphaCoverage`: `moltenvk-m3`, MoltenVK on the M3 Max's macOS 27
@@ -140,7 +140,7 @@ fn stems() -> Vec<String> {
}
/// The pipeline of `rt6_cover` and `fragment` from `fragments` at `samples`, with no attachment
/// (as `runtime_lane::attachmentless` draws it) unless `color`.
/// unless `color`.
fn render(
cover: &Library,
fragment: StageSource,
@@ -9,8 +9,8 @@
//! - A read of an unsigned integer heap group declares no twin and no routine, its query its own
//! class's; it declares the float class, which holds a member of a float format that it reads in
//! that member's own class.
//! - The device lane `runtime_lane::heap_extended_reads` compares such reads and queries through
//! an argument buffer with the same texture's through a slot, bit for bit, on each venue.
//! - A device's reads and queries through an argument buffer are the same texture's through a
//! slot, bit for bit, where measured.
//! - A sample or gather through a constexpr sampler without a mip filter or anisotropy declares the
//! twin and the routine and states no `RuntimeFact::HeapRawSamples`; a `half` gather and a
//! runtime sampler's sample declare them and state the fact; a mip-filtered sampler's sample
@@ -3,11 +3,9 @@
//!
//! - On the CPU interpreter, 192 linear 2D samples Metal took, 16 per format and result type, are
//! Metal's bytes, through a constexpr sampler and through a runtime one: 128 of the one-plane
//! formats (an Apple M3 Max on macOS 26.7, byte-identical to the Apple M4's probe),
//! whose device lane `runtime_lane::extended_range_samples` compares the same samples on each
//! venue, and 64 of the two-plane formats (an Apple M4 on macOS 27.0.1: footprints inside the
//! texture of its linear clamp-to-edge samples), whose device lane
//! `runtime_lane::two_plane_samples` replays every sample of that probe.
//! formats (an Apple M3 Max on macOS 26.7, byte-identical to the Apple M4's probe), and 64 of
//! the two-plane formats (an Apple M4 on macOS 27.0.1: footprints inside the
//! texture of its linear clamp-to-edge samples).
//! - Under every address mode, each border color, a constant offset, and pixel coordinates,
//! through constexpr and runtime samplers (a runtime sampler's `MirrorClampToEdge` too, each
//! tap mirrored once and clamped), nearest samples are the decoded texel at Metal's position and
@@ -1167,8 +1165,7 @@ fn swizzled_samples_and_gathers_are_the_unswizzled_swizzled() {
width: N as u32,
codes: &codes,
};
// The lowering takes no profile's choice here: one profile serves (the device lane
// `runtime_lane::extended_swizzles` runs each venue).
// The lowering takes no profile's choice here: one profile serves.
for (stem, p) in profiles().into_iter().take(1) {
// Each kernel's unswizzled results.
let mut base = BTreeMap::new();
@@ -4499,8 +4499,7 @@ fn a_later_simdgroup_operation_predicates_with_a_whole_quad_exit() {
/// operations a quad whose four invocations are helpers exits before the simdgroup operations after
/// it (one `OpIsHelperInvocationEXT` and a kill per exit), as Metal drops a quad whose every thread
/// is discarded: Vulkan leaves such a quad to the implementation, and lavapipe under
/// `RequireFullQuadsKHR` kept it a lane of a later `simd_sum` (the lane
/// `runtime_lane::discard_hoist`, master's gate at 5991e117).
/// `RequireFullQuadsKHR` kept it a lane of a later `simd_sum` (master's gate at 5991e117).
#[test]
fn a_demoting_site_exits_a_quad_of_helpers_before_a_later_simdgroup_operation() {
let Some(bc) = fixture("fragment_discard_hoist") else {
@@ -17,8 +17,8 @@
//! ordered greater-than more than without the input, and its kill. The functions that write no
//! depth are the same module under it.
//!
//! What the depth stores is the runtime lane's (`runtime_lane::viewport_ranges`, Metal probes 3
//! and 3b). `llvm-as` assembles the fixture; a missing tool skips visibly. No GPU is used.
//! What the depth stores is Metal probes 3 and 3b's. `llvm-as` assembles the fixture; a missing
//! tool skips visibly. No GPU is used.
use std::collections::BTreeMap;
use std::path::Path;
@@ -272,7 +272,7 @@ fn ima_descriptor(library: &Library) -> RenderPipelineDescriptor {
}
/// `stem`'s profile under the identity domains with no buffer robustness and without
/// `vertexAttributeInstanceRateDivisor`, as the new runtime enables neither where a device does
/// `vertexAttributeInstanceRateDivisor`, as the runtime enables neither where a device does
/// not offer them.
fn fixed_function_device(stem: &str) -> Device {
let mut desc = description(stem).unwrap_or_else(|e| panic!("{e}"));
@@ -6,9 +6,8 @@
//! sixty-fourths of its `half` clamp. No query asks the device (`OpImageQueryLod`). A depth
//! texture's query was not measured and is refused.
//!
//! The values are checked on devices by `runtime_lane::kernel_lod` and by the fixture's authored
//! cases on Metal; here the structure. `llvm-as` assembles the fixture; without it the tests skip
//! visibly.
//! The values are checked by the fixture's authored cases on Metal; here the structure. `llvm-as`
//! assembles the fixture; without it the tests skip visibly.
use crate::device::profile::DeviceProfile;
use crate::device::requirements::VkFeature;
@@ -485,8 +485,7 @@ fn a_barrier_and_a_simdgroup_sum_run_partial_threadgroups_as_metal() {
/// A grid of whole threadgroups, of a `dispatchThreads` or a `dispatchThreadgroups`, runs on the
/// partial-threadgroups variant's plan as its ragged grids do, every thread live: as the same
/// regions unflagged, on the one specialization a ragged grid of its threadgroup size takes, with
/// the plain pipeline's words and Metal's. `metal2vulkan-runtime` runs a large kernel's whole
/// grids so.
/// the plain pipeline's words and Metal's.
#[test]
fn whole_grids_run_on_the_partial_plan_with_every_thread_live() {
let (Some(shape_bc), Some(neighbour_bc)) = (
@@ -13,10 +13,9 @@
//! variant where its pipeline reads the weights (`BindError::NeedsVariant` from the base),
//! whose plan states it; a pipeline that reads none draws as it is.
//!
//! What the weights hold is the runtime lane's (`runtime_lane::provoking`) and a Metal probe's
//! (the M3 Max, macOS 27.0.1: the first weight bit for bit, the others within `2^-15`). Every
//! module passes L3. `llvm-as` assembles the fixtures; a missing tool skips visibly. No GPU is
//! used.
//! What the weights hold is a Metal probe's (the M3 Max, macOS 27.0.1: the first weight bit for
//! bit, the others within `2^-15`). Every module passes L3. `llvm-as` assembles the fixtures; a
//! missing tool skips visibly. No GPU is used.
use std::path::Path;
@@ -7,8 +7,7 @@
//! addresses buffers, and through the stage's binding of the status buffer elsewhere.
//!
//! The kernel is the store-buffering litmus of our probe
//! (`metal2vulkan_devtools::litmus::store_buffering`; `runtime_lane::seq_cst_fences` runs it on
//! devices).
//! (`metal2vulkan_devtools::litmus::store_buffering`).
use crate::device::profile::BufferAccess;
use crate::error::{Error, Feature};
@@ -3010,7 +3010,7 @@ define void @{name}(ptr addrspace(1) %src, ptr addrspace(1) %dst, ptr addrspace(
/// On lavapipe's `Device::from_queries` profile the lockstep order gives the stores of every
/// [`row_store_kernel`] barriers under the default domains, and none under the identity domains
/// (the new runtime's), whose kernels take no order: there each kernel's module has no lockstep
/// (the runtime's), whose kernels take no order: there each kernel's module has no lockstep
/// barrier, states no `RowLockstep` and takes no simd class, it does not observe its threadgroup
/// partition with partial threadgroups, and that variant's pipeline runs its grid in tiles
/// (`GridTiles`).
+1 -2
View File
@@ -26,8 +26,7 @@
//! (`arith::pack`, `PrecisionNote::DevicePackConversion`): every format's reads, stores and a
//! read after the function's own write, within the note's bound of the probes's model; and
//! through `half` members, of probe 12's. The interpreter models no `Pow` and leaves a pack of a
//! NaN undefined, so the sRGB formats and NaN stores are the device lane's
//! (`runtime_lane::tile_normalized`).
//! NaN undefined, so the sRGB formats and NaN stores are a device's to check.
//! - The refusals are typed: no tile inputs, a converting format, an attachment without a format,
//! a multisampled pass, a threadgroup variable in a tile function; the binder specializes the
//! render area, refuses an empty one, and binds the attachments in their staging formats, and
@@ -9,7 +9,7 @@
//! threadgroup memory, a SIMD-group or quad function, or a mesh or object stage (`addrspace(3)`,
//! `@air.simd_`, `@air.quad_`, `air.mesh`, `air.object`) is compiled, every entry its ABI declares,
//! on every committed profile under `Device::new`'s default policy and under
//! `Device::from_queries` with the identity domains (the new runtime's), and each module compiled
//! `Device::from_queries` with the identity domains (the runtime's), and each module compiled
//! is read: it declares none of the three capabilities, its requirements name neither the
//! extension (Vulkan's or SPIR-V's) nor its features, and each part compiles modules that
//! declare `Workgroup` variables. Each part counts the modules whose threadgroup arena is sized at
@@ -558,7 +558,7 @@ fn an_unread_attribute_changes_no_word_of_the_module() {
///
/// This is the measurement of the fix. `Device::kernel_inputs_read` narrows a creation's lowering
/// inputs to the attributes the kernel's entry reads, and a creation keys its kernel and compiles
/// it under those (`metal2vulkan-runtime`'s `Variant::compiled`), so the 36 rows ask for one
/// it under those, so the 36 rows ask for one
/// compiled function and the memo of compiled functions answers 35 of them. Before the narrowing
/// each row was a key of its own and each bought a translation of bytes the first already
/// produced; [`an_unread_attribute_changes_no_word_of_the_module`] is what says those were the
+3 -3
View File
@@ -1,14 +1,14 @@
//! The refusal surface, and the basis of every refusal that claims Metal stops an input.
//!
//! `scripts/refusal-surface/refusal_surface.py` reads every typed refusal of the two published
//! crates and of the new runtime from the sources and writes `docs/REFUSALS.md`. Its **Basis**
//! crates and of the runtime from the sources and writes `docs/REFUSALS.md`. Its **Basis**
//! column says where the belief that an input must be refused comes from: derived from the
//! construction site wherever the site states it (a capability a device lacks, a piece not built, a
//! cap of this crate's), and declared in the refusal's own doc comment, as a last line
//! `Basis: <value> (the evidence)`, wherever the claim is about Metal itself, which no construction
//! site can state.
//!
//! The new runtime's refusal enums (each variant of its `Error` whose whole payload is one enum it
//! The runtime's refusal enums (each variant of its `Error` whose whole payload is one enum it
//! declares) are such claims, so every variant of them carries a declared basis, and this test is
//! what makes an absent or malformed one fail. A refusal whose basis is not settled says
//! `Basis: unknown (why)`: the project's rule is that unknown stays visible, not that every row gets
@@ -71,7 +71,7 @@ fn every_metal_refusal_states_its_basis() {
assert!(
out.trim().is_empty(),
"refusals whose basis is absent or malformed:\n{out}\n\
Each variant of the new runtime's refusal enums ends its doc comment with \
Each variant of the runtime's refusal enums ends its doc comment with \
`Basis: <value> (the evidence)`; a basis that is not settled is `Basis: unknown (why)`, \
never nothing. The values are in scripts/refusal-surface/refusal_surface.py."
);
+1 -1
View File
@@ -7,7 +7,7 @@
#
# It is the ordinary rustdoc build of the library with every feature: the crate root shows the new
# API's public module roots, `Budget`, and `CancelToken`, and hides the hidden crate-root
# modules (`env_vars` and `repro`, which the binary and the runtime use). Hidden items and
# modules (`env_vars` and `repro`, which the binary uses). Hidden items and
# submodules inside the roots stay hidden.
# `crates/metal2vulkan/tests/api_surface.rs` keeps that set equal to the pinned surface table.
#