From 8e65408e85fb7c85afa004e3510fcfba5e1687b4 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 5 Nov 2026 15:25:59 -0800 Subject: [PATCH] Resolve the runtime's broken private intra-doc links, and lower its ceiling to 0 CI's private intra-doc link step reported 148 for metal2vulkan-runtime on macOS and 149 on Linux at 3b176b8bd4, against a ceiling of 70, so the step was red on both runners: - 119 links whose explicit target is the item their label already resolves to (`redundant_explicit_links`): 73 from the `degradations!` macro, one per precision-note kind's `PrecisionNote::` link, and 46 written by hand. The target is dropped; the rendered link is the same. - 17 links to `RenderCommandEncoder::` for methods that are the lowering's (`RenderLowering`) since the program's encoder was put in front of it: assemble, begin_current_draws, begin_inline_split, finish_replay, flush_inline, gathering, group_turn, inline_begin (2), inline_split, plan_one, replaying, settle_draw, settle_draws, snapshot_fallback, snapshot_wanted and watched. Each links `RenderLowering::`. - render.rs: `check_tile` (a `ShapeInputs` method) linked `Self::kept_imageblock_bytes`, and `kept_imageblock_bytes` (a `RenderLowering` method) linked `Self::pass_sample_length`; each links the other type's method by its type. The `plain_drawn` field linked its sibling field `replay_plain` by its bare name; it links `Self::replay_plain`. - scheduler: `Order::behind` is `Order::is_behind`. - event_timeline.rs: `Signal::after` is the `after` field of the `Signal::Kept` variant. - pipeline/libraries.rs: `GraphicsContent` is linked by its path in the sibling module (`super::graphics`). - Items built for tests alone are named without a link, as the translator's `DIRECT_ARGUMENTS_FROM_AIR` is: `Allocations::limit_to`, `patched_slot_uses` and `state_locks`. - exit_guard.rs: the module docs describe both exits, but `end_at_once` and `AT_ONCE_NOTICE` are built on Linux with the GNU C library alone and `BOUND` and `MAKING_BOUND` everywhere else, so each runner failed on the other's; the four are named without a link. Docs only; no behaviour changes, so no version moves. The runtime-sources pin moves with these files; the stack re-pins it. Verified (potluck): the counts before are from `RUSTDOCFLAGS=-Dwarnings cargo doc -p metal2vulkan-runtime --all-features --no-deps --document-private-items` on the M3 (macOS 27) and msi-laptop (Linux). (cherry picked from commit b4d88f87c6d6fa4c1dfc3fa9774b2fc540c6b297) --- .github/workflows/ci.yml | 2 +- crates/metal2vulkan-runtime/src/allocations.rs | 2 +- .../src/argument_encoder.rs | 2 +- crates/metal2vulkan-runtime/src/binding.rs | 2 +- .../metal2vulkan-runtime/src/buffer_texture.rs | 18 +++++++++--------- .../src/command_buffer/mod.rs | 4 ++-- crates/metal2vulkan-runtime/src/compute.rs | 4 ++-- crates/metal2vulkan-runtime/src/degradation.rs | 6 ++---- crates/metal2vulkan-runtime/src/detach.rs | 4 ++-- .../metal2vulkan-runtime/src/device/create.rs | 8 ++++---- .../metal2vulkan-runtime/src/event_timeline.rs | 2 +- crates/metal2vulkan-runtime/src/exit_guard.rs | 8 ++++---- .../metal2vulkan-runtime/src/function_table.rs | 4 ++-- .../src/indirect_command_buffer.rs | 6 +++--- crates/metal2vulkan-runtime/src/library.rs | 2 +- .../src/pipeline/libraries.rs | 2 +- .../src/pipeline/render.rs | 4 ++-- crates/metal2vulkan-runtime/src/rate_map.rs | 2 +- .../src/rate_mapped_pass.rs | 2 +- crates/metal2vulkan-runtime/src/render.rs | 12 ++++++------ .../src/render/color_groups.rs | 4 ++-- .../src/render/executions.rs | 6 +++--- .../src/render/inline_first.rs | 6 +++--- .../src/render/inline_splits.rs | 8 ++++---- .../metal2vulkan-runtime/src/render/replay.rs | 4 ++-- .../src/render/snapshot.rs | 4 ++-- crates/metal2vulkan-runtime/src/render_pass.rs | 14 +++++++------- crates/metal2vulkan-runtime/src/sample_copy.rs | 2 +- .../metal2vulkan-runtime/src/scheduler/mod.rs | 2 +- .../src/scheduler/order.rs | 2 +- crates/metal2vulkan-runtime/src/sparse/mod.rs | 2 +- .../src/texture/copy_images.rs | 2 +- .../src/texture/wrapped.rs | 2 +- .../src/texture_descriptor.rs | 6 +++--- 34 files changed, 79 insertions(+), 81 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a953c09d..df61c46af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,7 +150,7 @@ jobs: for row in \ metal2vulkan=0 \ metal2vulkan-air=0 \ - metal2vulkan-runtime=70 \ + metal2vulkan-runtime=0 \ metal2vulkan-validation=0 \ metal2vulkan-conformance=0 \ metal2vulkan-devtools=0 diff --git a/crates/metal2vulkan-runtime/src/allocations.rs b/crates/metal2vulkan-runtime/src/allocations.rs index e2271e781..46480bfb2 100644 --- a/crates/metal2vulkan-runtime/src/allocations.rs +++ b/crates/metal2vulkan-runtime/src/allocations.rs @@ -36,7 +36,7 @@ static DEVICES: Mutex)>> = Mutex::new(Vec::new /// One device's live allocations and its limit. pub(crate) struct Allocations { live: AtomicU32, - /// `maxMemoryAllocationCount`, which the tests may lower ([`Allocations::limit_to`]). + /// `maxMemoryAllocationCount`, which the tests may lower (`Allocations::limit_to`). limit: AtomicU32, /// Allocations refused at the limit. refused: AtomicU32, diff --git a/crates/metal2vulkan-runtime/src/argument_encoder.rs b/crates/metal2vulkan-runtime/src/argument_encoder.rs index 40afb3ca2..40eebb0ba 100644 --- a/crates/metal2vulkan-runtime/src/argument_encoder.rs +++ b/crates/metal2vulkan-runtime/src/argument_encoder.rs @@ -108,7 +108,7 @@ pub enum ArgumentEncoderProblem { Layout(Box), /// `new_argument_encoder_for_buffer_at_index`: the buffer at `index` points to no argument /// buffer, for which Metal answers nil ("No argument buffer at that index"), an - /// [`Error::Nil`](crate::Error::Nil). + /// [`Error::Nil`]. /// /// Basis: metal-documented (Metal's validation says "No argument buffer at that index", for /// which it answers nil). diff --git a/crates/metal2vulkan-runtime/src/binding.rs b/crates/metal2vulkan-runtime/src/binding.rs index fee240d13..d2c8ab495 100644 --- a/crates/metal2vulkan-runtime/src/binding.rs +++ b/crates/metal2vulkan-runtime/src/binding.rs @@ -2777,7 +2777,7 @@ fn bytes_use( /// uses that function made alone. Its uses are then those `command_uses_into` makes: every other /// use is of a slot, buffer or texture no call changed, and the keys, so the resident ones, are /// the same (`render/draw_again/rebound.rs`). Builds with debug assertions check the list against -/// the uses, and count the uses it looked at ([`patched_slot_uses`]). +/// the uses, and count the uses it looked at (`patched_slot_uses`). pub(super) fn patch_buffer_uses( (plan, command, tables): (&BindingPlan, &Command<'_>, &Tables<'_>), changed: &[SlotRef], diff --git a/crates/metal2vulkan-runtime/src/buffer_texture.rs b/crates/metal2vulkan-runtime/src/buffer_texture.rs index 365aae553..617d35926 100644 --- a/crates/metal2vulkan-runtime/src/buffer_texture.rs +++ b/crates/metal2vulkan-runtime/src/buffer_texture.rs @@ -213,7 +213,7 @@ pub struct IoSurfacePlane { /// The value of `kIOSurfaceClientDirection` the surface was made with (an IOSurface /// property outside the public SDK's headers), `None` for a surface made without the key. A /// surface with it is refused, whatever the value - /// ([`AppleOnly::SurfaceClientDirection`](super::AppleOnly::SurfaceClientDirection)). + /// ([`AppleOnly::SurfaceClientDirection`]). pub client_direction: Option, /// The surface's facts a two-plane YCbCr texture over it reads (its OSType, its chroma plane, /// its YCbCr matrix), `None` where the caller gives none: a texture of such a format is then @@ -321,8 +321,8 @@ impl Buffer { /// functions read and write it from the offset rounded down to 16, and blits and the CPU at the /// offset, as on plain Metal. /// - /// Refused: what Metal stops (`Invalid`, with a [`TextureProblem`](super::TextureProblem) - /// or a [`BufferTextureProblem`](super::BufferTextureProblem)); a format of which plain + /// Refused: what Metal stops (`Invalid`, with a [`TextureProblem`] + /// or a [`BufferTextureProblem`]); a format of which plain /// Metal makes no texture alone (`Nil`, `TextureProblem::NoTextureOfFormat` or /// `Unspecialized`, once every rule Metal stops passed and before the buffer's own: offset, /// row pitch, bytes past the buffer); a format with no exact Vulkan format (a 4:2:2 one among @@ -424,7 +424,7 @@ impl Buffer { /// - under 16 bytes a row, the GPU's rows are 16 bytes apart. There Metal's GPU reads every /// row past the first as memory-dependent bytes; the runtime's reads them where its writes /// put them, a near-equivalent announced once - /// ([`Degradation::NarrowSurfaceRows`](super::Degradation::NarrowSurfaceRows)); + /// ([`Degradation::NarrowSurfaceRows`]); /// - where that pitch is below the row, the GPU's rows share bytes: 1 to 15 of them, a whole /// number of texels, between consecutive rows. A plain plane is made, its shadow's copies /// reproducing the sharing with two regions a slice each way, so that a read sees it as @@ -433,12 +433,12 @@ impl Buffer { /// follows the command, the GPU pitch and the row count (`linear_plan.rs`'s **Rows that /// overlap**); a kernel, the only writer such a plane takes here, moves its winner with the /// threadgroup shape, so the earlier row's bytes are one of its answers. Announced once by - /// [`Degradation::CollidingSurfaceRowWrites`](super::Degradation::CollidingSurfaceRowWrites). + /// [`Degradation::CollidingSurfaceRowWrites`]. /// /// Refused: a surface made with `kIOSurfaceClientDirection`, SPI - /// ([`AppleOnly::SurfaceClientDirection`](super::AppleOnly::SurfaceClientDirection)); what - /// Metal stops (`Invalid`, with a [`TextureProblem`](super::TextureProblem) or a - /// [`BufferTextureProblem`](super::BufferTextureProblem): over a surface without planes a + /// ([`AppleOnly::SurfaceClientDirection`]); what + /// Metal stops (`Invalid`, with a [`TextureProblem`] or a + /// [`BufferTextureProblem`]: over a surface without planes a /// type other than 2D or a texture buffer, more than one level, a pitch below the row, another /// pitch or offset, or rows that end past it, which plain Metal asserts on); what Metal makes /// over a plane of a surface with planes and lays out no one way across the GPUs measured @@ -1872,7 +1872,7 @@ pub(super) fn staged_rows_back(layout: &BufferLayout, start: u64, at: u64) -> Ve /// follows the command, the GPU pitch and the row count rather than one rule /// (`linear_plan.rs`'s **Rows that overlap**); a kernel, the only writer such a plane takes, /// moves its winner with the threadgroup shape, so the earlier row's tail is one of its answers -/// ([`Degradation::CollidingSurfaceRowWrites`](super::Degradation::CollidingSurfaceRowWrites)). +/// ([`Degradation::CollidingSurfaceRowWrites`]). pub(super) fn plane_copy_regions( layout: &BufferLayout, (texel_bytes, blocks): (u64, Option), diff --git a/crates/metal2vulkan-runtime/src/command_buffer/mod.rs b/crates/metal2vulkan-runtime/src/command_buffer/mod.rs index e52197f58..f50f7d137 100644 --- a/crates/metal2vulkan-runtime/src/command_buffer/mod.rs +++ b/crates/metal2vulkan-runtime/src/command_buffer/mod.rs @@ -12,7 +12,7 @@ //! //! Statuses follow Metal's: `NotEnqueued`, then `Committed` at `commit`, `Scheduled`, and //! `Completed` or `Error`. The transitions after `Committed` run in the queue's serial context on -//! the device's handler threads ([`contexts`](super::contexts)), in the queue's order: to +//! the device's handler threads ([`contexts`]), in the queue's order: to //! `Scheduled` once its last batch is submitted (every wait of it satisfied), with its scheduled //! handlers; to `Completed` once its work completed, with its completed handlers and the release of //! what it retained. A transition that runs none of the program's code runs where it is seen @@ -2254,7 +2254,7 @@ impl CommandBuffer { } /// The state, locked: a lock its encoders on other threads share (counted, in builds with - /// debug assertions: [`state_locks`]). + /// debug assertions: `state_locks`). pub(super) fn state(&self) -> MutexGuard<'_, State> { #[cfg(debug_assertions)] STATE_LOCKS.with(|locks| locks.set(locks.get() + 1)); diff --git a/crates/metal2vulkan-runtime/src/compute.rs b/crates/metal2vulkan-runtime/src/compute.rs index 3ae764942..913676d1b 100644 --- a/crates/metal2vulkan-runtime/src/compute.rs +++ b/crates/metal2vulkan-runtime/src/compute.rs @@ -17,9 +17,9 @@ //! dispatch bound (`compute/live.rs`); the pipeline state's kept plans give the plan of its //! shape, on the variant the dispatch runs on (compiled when first needed), and //! `instantiate_dispatch` the command's regions, bytes, and push holes. -//! 3. [`binding`](super::binding) gives the descriptors, uploads, and push bytes; the variant +//! 3. [`binding`] gives the descriptors, uploads, and push bytes; the variant //! gives set 0 and one `VkPipeline` per region specialization, and the command buffer set 1, -//! the heap, which its dispatches on the variant share ([`heap_sets`](super::heap_sets)). +//! the heap, which its dispatches on the variant share ([`heap_sets`]). //! 4. Only then is anything recorded, through the tracker's per-command entry //! ([`EncoderCore::command`]) with the buffers the dispatch reads and writes: a serial encoder //! is an ordered one, so a dispatch gets the barrier its uses need after the encoder's earlier diff --git a/crates/metal2vulkan-runtime/src/degradation.rs b/crates/metal2vulkan-runtime/src/degradation.rs index 5ccfc812e..a58582df0 100644 --- a/crates/metal2vulkan-runtime/src/degradation.rs +++ b/crates/metal2vulkan-runtime/src/degradation.rs @@ -9,7 +9,7 @@ //! //! - **One closed vocabulary.** [`Degradation`] lists every kind once, with its code, category //! and cost, in `degradations!`; its precision kinds include one per -//! [`PrecisionNote`](metal2vulkan::pipeline::PrecisionNote), named alike, which the macro maps both +//! [`PrecisionNote`], named alike, which the macro maps both //! ways, so a note without a kind (or two kinds of one note) does not compile. docs/API.md's //! catalogue lists every code, closed both ways by a test. //! - **Codes are a contract.** `metal2vulkan-degrade-`, never renamed; a new degradation is @@ -169,9 +169,7 @@ macro_rules! degradations { #[doc = concat!( "A pipeline stage records [`PrecisionNote::", stringify!($note), - "`](metal2vulkan::pipeline::PrecisionNote::", - stringify!($note), - ")." + "`]." )] $(#[doc = $note_doc])* $note, diff --git a/crates/metal2vulkan-runtime/src/detach.rs b/crates/metal2vulkan-runtime/src/detach.rs index b855581dc..c89f4c94f 100644 --- a/crates/metal2vulkan-runtime/src/detach.rs +++ b/crates/metal2vulkan-runtime/src/detach.rs @@ -308,7 +308,7 @@ impl Device { /// buffer bound a heap set (`reaches`) may reach every texture through its resource ID unnamed, /// so each texture whose bytes were detached after a submitted command buffer made them /// resident is announced now, once - /// ([`Degradation::StaleDetachedReach`](super::Degradation::StaleDetachedReach), with its + /// ([`Degradation::StaleDetachedReach`], with its /// ID), and counted (`WorkCounts::stale_detached_reaches`). Metal's unnamed read of such a /// texture reads the pages the program gave back, which a correct program never relies on; /// the stand-in's reads zero. The trigger is reachability, not a read. On the submitting @@ -323,7 +323,7 @@ impl Device { /// The storage-sink degrade's trigger, the one place it is decided: a command buffer that bound /// a heap set (`reaches`) may reach every texture through its resource ID unnamed, so each /// texture over detached bytes whose stand-in has a sink is announced as it commits, once - /// ([`Degradation::DetachedStorageKeepsWrites`](super::Degradation::DetachedStorageKeepsWrites), + /// ([`Degradation::DetachedStorageKeepsWrites`], /// with its ID), and counted (`WorkCounts::detached_storage_reaches`): a read through a /// storage-class element there reads what an unnamed write left in the sink, where Metal's /// reads zero. In the program's `commit`, with no lock held, so a handler asked for each diff --git a/crates/metal2vulkan-runtime/src/device/create.rs b/crates/metal2vulkan-runtime/src/device/create.rs index 4121690fa..9a676eb29 100644 --- a/crates/metal2vulkan-runtime/src/device/create.rs +++ b/crates/metal2vulkan-runtime/src/device/create.rs @@ -80,13 +80,13 @@ pub struct DeviceOptions { /// `unifiedImageLayoutsVideo`) and the device lists it, the device enables the structure's /// features too; a device that lacks one Vulkan requires of every device listing the /// extension (all of them but `unifiedImageLayoutsVideo`) is refused - /// ([`Error::ExtensionFeature`](crate::Error::ExtensionFeature)) rather than enable the + /// ([`Error::ExtensionFeature`]) rather than enable the /// extension without it. `unifiedImageLayoutsVideo` is enabled where the device has it /// (`vkGetPhysicalDeviceFeatures2` on [`DeviceHandles`](crate::DeviceHandles) answers /// whether it does). One whose registry dependency names an instance extension the /// instance would not enable (`VK_KHR_swapchain` without `VK_KHR_surface` in /// `instance_extensions`, for example) refuses the options before the instance is made - /// ([`Error::InstanceExtensionRequired`](crate::Error::InstanceExtensionRequired)). + /// ([`Error::InstanceExtensionRequired`]). pub device_extensions: Vec, /// Device extensions each device enables only where it can, never refused for one: where the /// device lists it, the instance enables every instance extension its registry dependency @@ -171,7 +171,7 @@ pub struct DeviceOptions { /// default: each kind once per device). Each occurrence's notice is the same /// [`DegradeNotice`] through the same sink (or stderr), on the thread whose call announces /// it, so a program that runs tasks on threads over one device sees each task's: where each - /// kind's notice surfaces is in its [`Degradation`](crate::Degradation) docs. A kind a + /// kind's notice surfaces is in its [`Degradation`] docs. A kind a /// pipeline variant's making announces (a stage's precision notes, specialized or not, and /// the other kinds its stages or requirements state) occurs at each dispatch or draw that /// binds the variant, which announces it on the encoding thread (on the committing or @@ -501,7 +501,7 @@ pub struct DebugMessage { /// `pMessage`; a degrade notice's text. pub text: String, /// The runtime's own notice of a degradation it takes, once per device and kind: never a - /// driver's or a layer's message. Match its [`Degradation`](crate::Degradation), not the text. + /// driver's or a layer's message. Match its [`Degradation`], not the text. pub degradation: Option, } diff --git a/crates/metal2vulkan-runtime/src/event_timeline.rs b/crates/metal2vulkan-runtime/src/event_timeline.rs index de81006a5..3302d41c6 100644 --- a/crates/metal2vulkan-runtime/src/event_timeline.rs +++ b/crates/metal2vulkan-runtime/src/event_timeline.rs @@ -10,7 +10,7 @@ //! every value submitted or set before it, in the scheduler's submission order, so kept values //! rise with their indices; a signal not above them is dropped, as Metal's maximum would make it //! a no-op. A kept signal that follows one still pending on another `VkQueue` waits for that one -//! ([`Signal::after`]), so the semaphore's signals execute in index order; on one `VkQueue`, +//! ([`Signal::Kept::after`]), so the semaphore's signals execute in index order; on one `VkQueue`, //! Vulkan's signal operation order already does. //! - **The host's floor.** A host set never touches the semaphore: it takes effect at once as a //! floor the value never drops below. A GPU wait for a value the floor reached needs no Vulkan diff --git a/crates/metal2vulkan-runtime/src/exit_guard.rs b/crates/metal2vulkan-runtime/src/exit_guard.rs index 3b6a68b90..2e6a0b5cd 100644 --- a/crates/metal2vulkan-runtime/src/exit_guard.rs +++ b/crates/metal2vulkan-runtime/src/exit_guard.rs @@ -57,7 +57,7 @@ //! - **Linux, with the GNU C library**, where it does (`on_exit(3)`, [`exit_handler`]): it waits //! for nothing. Where a section of another thread (a making's included) or a CPU device's work //! (below) is in progress, it ends the process at once with the exit's status -//! ([`end_at_once`]): one line on standard error ([`AT_ONCE_NOTICE`]), the C library's output +//! (`end_at_once`): one line on standard error (`AT_ONCE_NOTICE`), the C library's output //! streams flushed, `_exit`. The exit handlers registered before the hook's last registration //! (the program's, a terminal's restore) then do not run, where Metal's exit runs them //! (docs/API.md, accepted differences). Measured on the M3 Max (macOS 27.0.1): Metal's process @@ -65,10 +65,10 @@ //! it, or a compile in progress. With the waits below, a lavapipe process took 2 s to exit //! while a thread waited for its work, and under the GPU-assisted validation layer 1.4.357 two //! completion tests' processes hung at exit, the layer deadlocked inside a submission. -//! - **Elsewhere** (macOS, where `atexit` gives no status): at most [`BOUND`], and while a +//! - **Elsewhere** (macOS, where `atexit` gives no status): at most `BOUND`, and while a //! driver's making of a `VkPipeline` is in progress in a section (a pool's piece's -//! `vkCreate*Pipelines`, [`driver_making`]), at most [`MAKING_BOUND`], and it says so on -//! standard error as that wait starts: a making outlasts [`BOUND`], and the program need not +//! `vkCreate*Pipelines`, [`driver_making`]), at most `MAKING_BOUND`, and it says so on +//! standard error as that wait starts: a making outlasts `BOUND`, and the program need not //! wait for the command buffer whose making it is before it exits. Seen: with two seconds, two //! lane processes on ANV ended with `SIGSEGV` and `SIGABRT` inside the validation layer 3 and //! 20 s after their test passed, where a bicubic kernel's making took 6.6 s under the lane's diff --git a/crates/metal2vulkan-runtime/src/function_table.rs b/crates/metal2vulkan-runtime/src/function_table.rs index 9bcf56996..862d28d7d 100644 --- a/crates/metal2vulkan-runtime/src/function_table.rs +++ b/crates/metal2vulkan-runtime/src/function_table.rs @@ -129,8 +129,8 @@ pub enum FunctionTableProblem { /// A render pipeline state's `function_handle` or `new_visible_function_table` for `stage`, /// which is not one stage: empty, or more than one. Metal's validation stops each ("stage /// invalid"); plain Metal answers the handle nil, and the table of more than one stage (an - /// [`Error::Nil`](crate::Error::Nil)), and faults on a table of no stage (an - /// [`Error::Invalid`](crate::Error::Invalid); an M4 under macOS 27.0.1). One + /// [`Error::Nil`]), and faults on a table of no stage (an + /// [`Error::Invalid`]; an M4 under macOS 27.0.1). One /// stage the state has no function of answers no handle and makes a table, as plain Metal's. /// /// Basis: metal-measured (an M4, macOS 27.0.1: plain Metal answers the handle nil and the table diff --git a/crates/metal2vulkan-runtime/src/indirect_command_buffer.rs b/crates/metal2vulkan-runtime/src/indirect_command_buffer.rs index 16b7e1f07..949faf3e9 100644 --- a/crates/metal2vulkan-runtime/src/indirect_command_buffer.rs +++ b/crates/metal2vulkan-runtime/src/indirect_command_buffer.rs @@ -363,7 +363,7 @@ impl IndirectCommandBufferDescriptor { /// plain Metal itself refuses, ending its process or failing the call ([`Error::Invalid`]'s own /// doc). What only Metal's API validation layer stops is not here: plain Metal takes it, so the /// runtime takes it too, or, where no exact answer is built, names its own gap -/// ([`RuntimeGap`](crate::RuntimeGap)). +/// ([`RuntimeGap`]). #[non_exhaustive] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum IndirectCommandBufferProblem { @@ -1635,7 +1635,7 @@ impl IndirectCommandBuffer { /// its targets' sizes and what the device drew before, which the runtime does not model: a /// buffer made after a command buffer that encoded a render encoder was scheduled, or after a /// resource state encoder opened, announces - /// [`Degradation::UnmeasuredUniqueIdentifier`](crate::Degradation::UnmeasuredUniqueIdentifier) + /// [`Degradation::UnmeasuredUniqueIdentifier`] /// once a device where this answers. pub fn unique_identifier(&self) -> u64 { self.0 @@ -1648,7 +1648,7 @@ impl IndirectCommandBuffer { /// after a command buffer of its device that encoded a render encoder was scheduled, after a /// resource state encoder of its device opened, or after Metal's own encoders' ranges passed /// what the runtime models, where `unique_identifier` announces - /// [`Degradation::UnmeasuredUniqueIdentifier`](crate::Degradation::UnmeasuredUniqueIdentifier); + /// [`Degradation::UnmeasuredUniqueIdentifier`]; /// false where it answers Metal's number. Fixed at the buffer's making; it announces nothing. pub fn identifier_unmeasured(&self) -> bool { self.0.identifier.degradation().is_some() diff --git a/crates/metal2vulkan-runtime/src/library.rs b/crates/metal2vulkan-runtime/src/library.rs index 3e59e8232..b16b5fbe9 100644 --- a/crates/metal2vulkan-runtime/src/library.rs +++ b/crates/metal2vulkan-runtime/src/library.rs @@ -154,7 +154,7 @@ impl Device { /// `newLibraryWithSource:options:error:` (and its completion-handler form): a library /// compiled from Metal Shading Language source. Not built: the runtime compiles AIR, not /// MSL, so every source is refused, `NotImplemented(LibrarySource)` - /// ([`RuntimeGap::LibrarySource`](crate::RuntimeGap::LibrarySource)), where Metal compiles it. + /// ([`RuntimeGap::LibrarySource`]), where Metal compiles it. /// `MTLCompileOptions` has no counterpart: no option changes the answer. Compile the source /// ahead of time with Apple's `metal` tool and load the metallib with /// [`new_library_with_data`](Self::new_library_with_data). diff --git a/crates/metal2vulkan-runtime/src/pipeline/libraries.rs b/crates/metal2vulkan-runtime/src/pipeline/libraries.rs index f0a675e96..4b8dbb567 100644 --- a/crates/metal2vulkan-runtime/src/pipeline/libraries.rs +++ b/crates/metal2vulkan-runtime/src/pipeline/libraries.rs @@ -5,7 +5,7 @@ //! Where the device enables `VK_EXT_graphics_pipeline_library` and links its libraries fast //! (`graphicsPipelineLibraryFastLinking`; `device/create.rs`), a render variant's `VkPipeline` of //! a graphics key is linked, without link-time optimization, from four libraries, one per part -//! of the pipeline's state (`graphics.rs`, [`GraphicsContent`]): its vertex input, its +//! of the pipeline's state (`graphics.rs`, [`GraphicsContent`](super::graphics::GraphicsContent)): its vertex input, its //! pre-rasterization shaders, its fragment shader and its fragment output. Each part's library is //! the device's, found by the exact content of its part ([`Part`], a digest of everything its //! create info holds: the layout's description, each stage's words, the constants its stages diff --git a/crates/metal2vulkan-runtime/src/pipeline/render.rs b/crates/metal2vulkan-runtime/src/pipeline/render.rs index e7dac5c0b..b9b5f3d86 100644 --- a/crates/metal2vulkan-runtime/src/pipeline/render.rs +++ b/crates/metal2vulkan-runtime/src/pipeline/render.rs @@ -1084,9 +1084,9 @@ impl RenderPipelineState { /// are not Metal's; any other, a tile pipeline's included, a value of one process-wide count /// past them, where Metal's is an address that differs from run to run. No state's is measured /// to be Metal's number: the first answer announces, once a device, - /// [`Degradation::PlainStateUniqueIdentifier`](crate::Degradation::PlainStateUniqueIdentifier) + /// [`Degradation::PlainStateUniqueIdentifier`] /// for a plain state (a tile state's included) and - /// [`Degradation::UnmeasuredUniqueIdentifier`](crate::Degradation::UnmeasuredUniqueIdentifier) + /// [`Degradation::UnmeasuredUniqueIdentifier`] /// for one with indirect command buffer support. pub fn unique_identifier(&self) -> u64 { match &self.0 { diff --git a/crates/metal2vulkan-runtime/src/rate_map.rs b/crates/metal2vulkan-runtime/src/rate_map.rs index 7c9ba0329..5f3f25fe5 100644 --- a/crates/metal2vulkan-runtime/src/rate_map.rs +++ b/crates/metal2vulkan-runtime/src/rate_map.rs @@ -30,7 +30,7 @@ //! - **Where the compile is this crate's bound.** Metal takes a screen of up to 32768 pixels a //! side and any samples; the compile layer compiles only where Apple's compile is measured, //! and refuses the rest, `Error::RateMap` with its -//! [`UnpinnedCompile`](metal2vulkan::bind::UnpinnedCompile): a screen past 16384 a side (where Apple's +//! [`UnpinnedCompile`]: a screen past 16384 a side (where Apple's //! compile crashes or corrupts the map) and sample densities whose compile is not measured. An //! axis of no screen pixels is not among them: it has one tile of no screen and no physical //! pixels whatever its samples, so no coordinate reads its quality function and the density diff --git a/crates/metal2vulkan-runtime/src/rate_mapped_pass.rs b/crates/metal2vulkan-runtime/src/rate_mapped_pass.rs index 7678c4ff9..cbb3a1a5f 100644 --- a/crates/metal2vulkan-runtime/src/rate_mapped_pass.rs +++ b/crates/metal2vulkan-runtime/src/rate_mapped_pass.rs @@ -138,7 +138,7 @@ use metal2vulkan::pipeline::GraphicsState; use std::sync::Arc; /// Why a draw in a rate-mapped pass is not drawn region by region: the compile layer's -/// [`RegionError`](metal2vulkan::bind::RegionError), by kind (the module docs). +/// [`RegionError`], by kind (the module docs). #[non_exhaustive] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum RegionRefusal { diff --git a/crates/metal2vulkan-runtime/src/render.rs b/crates/metal2vulkan-runtime/src/render.rs index b66128560..0ce53a46b 100644 --- a/crates/metal2vulkan-runtime/src/render.rs +++ b/crates/metal2vulkan-runtime/src/render.rs @@ -1189,7 +1189,7 @@ struct Instance { /// whose pipeline is being made, or an execution of render commands, that the instance /// before would have taken (`render/inline_first.rs`). The shadowed textures' copies take /// the two as one: its draws' shadowed textures and uses are gathered into the first of - /// them ([`RenderCommandEncoder::gathering`]), copied in before it, and nothing is copied + /// them ([`RenderLowering::gathering`]), copied in before it, and nothing is copied /// between them. continues: bool, /// It records inline after a split (`render/inline_splits.rs`): its commands, kept until its @@ -1526,7 +1526,7 @@ pub(crate) struct RenderLowering { /// device announces at every occurrence met (`kept_commands.rs`). A chunk of an execution's /// commands whose draws were all plain is kept. replay_plain: bool, - /// The draw being drawn reached that keep's test and passed it ([`replay_plain`]). + /// The draw being drawn reached that keep's test and passed it ([`replay_plain`](Self::replay_plain)). plain_drawn: bool, /// The heap set versions the plain draws it replayed bound (`heap_sets::Bound`), each once, /// which a kept recording of them binds again (`kept_commands::KeptEffects`). @@ -1965,7 +1965,7 @@ impl CommandBuffer { } /// What a render encoder opens with but its core and the secondary command buffer of its first -/// instance ([`RenderCommandEncoder::assemble`]): its pass's layout (a color group's, where the +/// instance ([`RenderLowering::assemble`]): its pass's layout (a color group's, where the /// device draws the pass's colors in groups), that layout's shape and compatible pass, its /// rasterization-rate map, its extended-range shadows and the extended-range colors whose clear /// Metal's tile memory holds off its codes, whether its first instance records inline (and its @@ -2286,7 +2286,7 @@ impl DrawDynamic { } /// No colors or slots: what a draw's set of them is compared with where it names none -/// ([`RenderCommandEncoder::settle_draw`]). +/// ([`RenderLowering::settle_draw`]). static NO_INDICES: BTreeSet = BTreeSet::new(); /// The dynamic states a draw records, beside `VERTEX_INPUT_BINDING_STRIDE` (recorded with the @@ -2587,7 +2587,7 @@ impl ShapeInputs<'_> { /// sample larger than the pass gives ([`pass_sample_length`](Self::pass_sample_length); /// measured: "the pipelineState's per sample imageBlock usage(32) is greater than the /// encoder's perSample imageBlock usage(4)"). An explicit imageblock standing alone runs in - /// a pass of fewer bytes ([`kept_imageblock_bytes`](Self::kept_imageblock_bytes)). + /// a pass of fewer bytes ([`kept_imageblock_bytes`](RenderLowering::kept_imageblock_bytes)). pub(super) fn check_tile(&self, call: &'static str, state: &TileState) -> Result<(), Error> { let descriptor = state.descriptor(); // Plain Metal runs a tile function whatever the state's color formats (a Metal probe: one @@ -7578,7 +7578,7 @@ impl RenderLowering { /// The bytes of each cell of the tile function's explicit imageblock standing alone that this /// pass keeps, where they are fewer than its data (`BindState::kept_imageblock_bytes`); /// `None` for every other tile state. Plain Metal keeps the imageblock's bytes that lie below - /// the pass's imageblock bytes per sample ([`pass_sample_length`](Self::pass_sample_length)) + /// the pass's imageblock bytes per sample ([`pass_sample_length`](ShapeInputs::pass_sample_length)) /// rounded up to 8, the imageblock lying after the colors as the state's /// `imageblock_sample_length` places it, and reads every other word as zero, dropping its /// writes, a dispatch's own included (Metal probes on two M4s: a 16-byte imageblock after an diff --git a/crates/metal2vulkan-runtime/src/render/color_groups.rs b/crates/metal2vulkan-runtime/src/render/color_groups.rs index 1853db7ed..ee732edce 100644 --- a/crates/metal2vulkan-runtime/src/render/color_groups.rs +++ b/crates/metal2vulkan-runtime/src/render/color_groups.rs @@ -250,7 +250,7 @@ struct First { set: Option, } -/// A decisive call's turn in a pass drawn in groups ([`RenderCommandEncoder::group_turn`]). +/// A decisive call's turn in a pass drawn in groups ([`RenderLowering::group_turn`]). #[derive(Clone, Copy)] pub(super) enum Turn { /// A pass of one group: the call runs as in any pass. @@ -766,7 +766,7 @@ impl RenderLowering { } } -/// A resource a draw of a pass drawn in groups may not read ([`RenderCommandEncoder::watched`]). +/// A resource a draw of a pass drawn in groups may not read ([`RenderLowering::watched`]). struct Watched { key: ResourceKey, range: UseRange, diff --git a/crates/metal2vulkan-runtime/src/render/executions.rs b/crates/metal2vulkan-runtime/src/render/executions.rs index db208ae8f..b2833f521 100644 --- a/crates/metal2vulkan-runtime/src/render/executions.rs +++ b/crates/metal2vulkan-runtime/src/render/executions.rs @@ -11,7 +11,7 @@ //! and announcing nothing. A CPU write after the batch was submitted races the GPU, as on //! Metal. So the call records nothing for the commands: //! the instance it is encoded in ends its secondary command buffer there and goes on in a new -//! one, the execution's own secondary standing between the two ([`Piece`](super::Piece)). +//! one, the execution's own secondary standing between the two ([`Piece`]). //! A secondary command buffer must be recorded before a primary executes it, so a pass with an //! execution leaves its whole pass to record later ([`DeferredPass`]), as a segment of its //! encoder (`encoder.rs`, `deferred.rs`): its begin, every instance's secondaries and the @@ -799,7 +799,7 @@ impl RenderCommandEncoder { /// For a range that is not empty, an inherited state made without /// `supportIndirectCommandBuffers` faults Metal's GPU at the encoder: the call is taken, the /// encoder runs nothing, not even its load, clear or store actions, and the command buffer - /// completes with [`CommandBufferError::PageFault`](crate::CommandBufferError::PageFault), the + /// completes with [`CommandBufferError::PageFault`], the /// other encoders run and every event signal fires. A buffer of no command types, or of /// dispatches beside draws of primitives, runs nothing, as plain Metal's; one of dispatches /// alone, or beside other draws (unmeasured in a pass), is @@ -2577,7 +2577,7 @@ impl RenderExecution { } /// Settle at commit, through an encoder of `core` that records nothing, what the host step's - /// draws of the commands compile ([`RenderCommandEncoder::settle_draws`]) for each state the + /// draws of the commands compile ([`RenderLowering::settle_draws`]) for each state the /// records name as the CPU wrote them, into `made`: the encoder's where the buffer inherits /// it, else each live state the CPU set on a command the execution may run /// (`IndirectCommandBuffer::set_render_states`: of its range, or of the buffer for a range diff --git a/crates/metal2vulkan-runtime/src/render/inline_first.rs b/crates/metal2vulkan-runtime/src/render/inline_first.rs index 7dad3828b..c70472117 100644 --- a/crates/metal2vulkan-runtime/src/render/inline_first.rs +++ b/crates/metal2vulkan-runtime/src/render/inline_first.rs @@ -75,12 +75,12 @@ //! - **No secondary at the open.** Such a pass begins no secondary for its first instance as it //! opens: one begins where a command records into that instance's secondary (a draw that does //! not record inline, a visibility query, an execution of render commands) or a split keeps the -//! instance before the next ([`RenderCommandEncoder::begin_current_draws`]). An instance a new +//! instance before the next ([`RenderLowering::begin_current_draws`]). An instance a new //! one replaces, or that the pass ends with nothing recorded, never begins one, and its render //! pass instance runs its loads and stores alone. A secondary begun and ended unused cost every //! such pass a begin, which on ANV resets the command buffer's whole command state. //! - **At the first draw that records: the instance allows it** -//! ([`RenderCommandEncoder::inline_begin`]). Its pipeline is made; the instance is the pass's +//! ([`RenderLowering::inline_begin`]). Its pipeline is made; the instance is the pass's //! first, of no fetched (storage) attachment, view of another format, multiview or //! shader-side test, and the draw writes no memoryless color; nothing the pass's end records //! inside it is pending: no draw whose @@ -183,7 +183,7 @@ impl Begun { } /// What the first draw that records an inline instance made for it before recording starts -/// ([`RenderCommandEncoder::inline_begin`]): its render pass and framebuffer, the command +/// ([`RenderLowering::inline_begin`]): its render pass and framebuffer, the command /// buffer the encoder holds for it, and the instance's shape and the layout's `splits` /// ([`Begun`]). pub(super) struct InlineBegin { diff --git a/crates/metal2vulkan-runtime/src/render/inline_splits.rs b/crates/metal2vulkan-runtime/src/render/inline_splits.rs index bb319a24a..31097b991 100644 --- a/crates/metal2vulkan-runtime/src/render/inline_splits.rs +++ b/crates/metal2vulkan-runtime/src/render/inline_splits.rs @@ -23,7 +23,7 @@ //! that continue it, `Instance::continues`), which is known only once the next instance //! begins or the pass ends. So the later instance's commands (its draws, and the barriers //! between them) are kept as they come (`Kept`), and recorded into the primary command buffer -//! when its group ends ([`RenderCommandEncoder::flush_inline`]): there the end of the +//! when its group ends ([`RenderLowering::flush_inline`]): there the end of the //! instance before it, the barrier, the copies, the steps, the render pass instance's begin, //! and its commands, in their order. The encoder's commands meanwhile record into the command //! buffer before the pass, as for the first instance. Every command keeps its place in @@ -33,7 +33,7 @@ //! before's first (the pass's first instance's go before the pass, into the command buffer //! before it), as each instance's group ends. An instance's writes of the colors the pass //! loads are bounded by its draws' scissors as the end bounds them, the pass's drawn area and -//! reach taken as far as the pass has gone ([`RenderCommandEncoder::plan_one`]): the next copy +//! reach taken as far as the pass has gone ([`RenderLowering::plan_one`]): the next copy //! takes the texels inside them alone. Where the end would find them unbounded by its time, it //! copies more, never fewer. Where neither the instance's draws nor any command of the encoder //! before them used a shadowed texture, nothing is planned: there is nothing to copy, as the @@ -231,8 +231,8 @@ pub(super) struct Later { } /// The copies of the instance a split ends, planned as the split's draw is admitted -/// ([`RenderCommandEncoder::inline_split`]), recorded once its new instance is installed -/// ([`RenderCommandEncoder::begin_inline_split`]); and the new instance's objects and clears +/// ([`RenderLowering::inline_split`]), recorded once its new instance is installed +/// ([`RenderLowering::begin_inline_split`]); and the new instance's objects and clears /// ([`Kept`]). pub(super) struct SplitBegin { copies: Vec, diff --git a/crates/metal2vulkan-runtime/src/render/replay.rs b/crates/metal2vulkan-runtime/src/render/replay.rs index c3bbcbb9a..35c015596 100644 --- a/crates/metal2vulkan-runtime/src/render/replay.rs +++ b/crates/metal2vulkan-runtime/src/render/replay.rs @@ -3,10 +3,10 @@ //! its arguments owned, in order, before the call runs. //! //! - **Encoded again** by opening the pass again from the descriptor -//! ([`RenderCommandEncoder::replaying`]: no refusal of a committed command buffer, the residency +//! ([`RenderLowering::replaying`]: no refusal of a committed command buffer, the residency //! the encoders ended before it left), running each call again, and ending the pass as //! `end_encoding` ends it, but into the ended encoder's place -//! ([`RenderCommandEncoder::finish_replay`]). A call refused as the program made it is refused +//! ([`RenderLowering::finish_replay`]). A call refused as the program made it is refused //! again, and the calls after it run ([`RenderLowering::logged`]); one a lowering thread //! refused failed the command buffer, which keeps no log. //! - **Kept** as the compute encoder's log is (`EncoderCore::end_with_replay`): where a command diff --git a/crates/metal2vulkan-runtime/src/render/snapshot.rs b/crates/metal2vulkan-runtime/src/render/snapshot.rs index ee8e4de68..bb6f2e7d6 100644 --- a/crates/metal2vulkan-runtime/src/render/snapshot.rs +++ b/crates/metal2vulkan-runtime/src/render/snapshot.rs @@ -115,7 +115,7 @@ use metal2vulkan::pipeline::{SlotClass, SlotRef, SnapshotForm, Stage}; use std::collections::BTreeSet; /// What a draw asks to read through snapshots, before its plan -/// ([`RenderCommandEncoder::snapshot_wanted`]): the fragment slots, and the colors they read. +/// ([`RenderLowering::snapshot_wanted`]): the fragment slots, and the colors they read. #[derive(Clone, Debug, Default, PartialEq, Eq)] pub(super) struct Wanted { pub(super) slots: BTreeSet, @@ -532,7 +532,7 @@ pub(super) fn is_snapshot_slot(slots: &BTreeSet, slot: &SlotRef) -> bool { slot.stage == Stage::Fragment && slot.class == SlotClass::Texture && slots.contains(&slot.index) } -/// [`RenderCommandEncoder::snapshot_fallback`]'s message, from anywhere the device is known. +/// [`RenderLowering::snapshot_fallback`]'s message, from anywhere the device is known. pub(super) fn snapshot_fallback(device: &crate::Device, reason: &'static str) { if !crate::pipeline::creation_log_enabled() { return; diff --git a/crates/metal2vulkan-runtime/src/render_pass.rs b/crates/metal2vulkan-runtime/src/render_pass.rs index 0bb302ba5..4c50342a0 100644 --- a/crates/metal2vulkan-runtime/src/render_pass.rs +++ b/crates/metal2vulkan-runtime/src/render_pass.rs @@ -333,7 +333,7 @@ pub struct RenderPassDescriptor { pub visibility_result_buffer: Option, /// `visibilityResultType`: whether the encoder's visibility results replace the words at /// their offsets (`Reset`, the default) or are taken into them (`Accumulate`), as an Apple M3 - /// Max answers it ([`VisibilityResultType`](crate::VisibilityResultType)). + /// Max answers it ([`VisibilityResultType`]). pub visibility_result_type: VisibilityResultType, /// `renderTargetArrayLength`: the layers a layered pass renders (2 or more); 0 or 1 renders /// each attachment's slice alone. @@ -389,7 +389,7 @@ pub enum Attachment { #[derive(Clone, Debug, PartialEq, Eq)] pub enum RenderPassProblem { /// No attachment has a texture and the target width or height is 0: Metal answers nil (an - /// [`Error::Nil`](crate::Error::Nil)). + /// [`Error::Nil`]). /// /// Basis: metal-measured (an Apple M3 Max, macOS 27.0.1: plain Metal answers its render command /// encoder nil for a descriptor with no attachment and a 0 by 0 target). @@ -528,7 +528,7 @@ pub enum RenderPassProblem { MemorylessResolve(Attachment), /// A tile size other than 16x16, 32x16 and 32x32, or a tile with one side 0 (measured: /// "Invalid tile dimensions (8, 8)"; plain Metal answers its encoder nil, an - /// [`Error::Nil`](crate::Error::Nil)). + /// [`Error::Nil`]). /// /// Basis: metal-documented (Metal asserts "Invalid tile dimensions (8, 8)", for which plain /// Metal answers its encoder nil). @@ -539,7 +539,7 @@ pub enum RenderPassProblem { height: u64, }, /// A 32x32 tile at 4 samples (measured: "4X MSAA does not support 32 x 32 tiles"), which - /// Metal's validation stops, an [`Error::Invalid`](crate::Error::Invalid). Plain Metal + /// Metal's validation stops, an [`Error::Invalid`]. Plain Metal /// faults there: its command buffer fails, or it makes no encoder (the re-probe on an M4), so /// the refusal is Metal's answer. /// @@ -551,7 +551,7 @@ pub enum RenderPassProblem { }, /// Per-sample storage, the imageblock sample length rounded up to 8 bytes, past 64 /// (measured: "Per sample storage (72) cannot be greater than (64)"; plain Metal answers its - /// encoder nil, an [`Error::Nil`](crate::Error::Nil)). + /// encoder nil, an [`Error::Nil`]). /// /// Basis: metal-documented (Metal asserts "Per sample storage (72) cannot be greater than /// (64)", for which plain Metal answers its encoder nil). @@ -561,7 +561,7 @@ pub enum RenderPassProblem { }, /// A threadgroup memory length past 32768 bytes (measured: "Requested threadgroup memory /// length exceeds amount supported by device (32768)"; plain Metal answers its encoder nil, an - /// [`Error::Nil`](crate::Error::Nil)). + /// [`Error::Nil`]). /// /// Basis: metal-documented (Metal asserts "Requested threadgroup memory length exceeds amount /// supported by device (32768)", for which plain Metal answers its encoder nil). @@ -571,7 +571,7 @@ pub enum RenderPassProblem { }, /// Tile memory, the per-sample storage of each pixel of a tile plus the threadgroup memory /// length, past 32768 bytes (measured: "Total allocated tile memory (40960) cannot be greater - /// than (32768)"; plain Metal answers its encoder nil, an [`Error::Nil`](crate::Error::Nil)). + /// than (32768)"; plain Metal answers its encoder nil, an [`Error::Nil`]). /// /// Basis: metal-documented (Metal asserts "Total allocated tile memory (40960) cannot be /// greater than (32768)", for which plain Metal answers its encoder nil). diff --git a/crates/metal2vulkan-runtime/src/sample_copy.rs b/crates/metal2vulkan-runtime/src/sample_copy.rs index e26bc9f84..122f268aa 100644 --- a/crates/metal2vulkan-runtime/src/sample_copy.rs +++ b/crates/metal2vulkan-runtime/src/sample_copy.rs @@ -12,7 +12,7 @@ //! ("Compatible Formats for Depth-Stencil to/from Color Copies"): a colour format of that table //! takes one copy; any other colour format of the unit, and a depth/stencil format of another //! Vulkan format, take two, through a multisampled colour image of the aspect's bits, the -//! encoder's own ([`colour_twin`](super::depth_stencil_scratch::colour_twin)): `R32_SFLOAT` for +//! encoder's own ([`colour_twin`]): `R32_SFLOAT` for //! 32-bit depth, `R16_UNORM` for 16-bit, `R8_UNORM` for stencil. The second copy reads what the //! first wrote, past a barrier. A copy into a 32-bit float depth image announces //! `restricted-depth-upload` where the device may clamp. diff --git a/crates/metal2vulkan-runtime/src/scheduler/mod.rs b/crates/metal2vulkan-runtime/src/scheduler/mod.rs index 4e3b3852c..7ec5f11d2 100644 --- a/crates/metal2vulkan-runtime/src/scheduler/mod.rs +++ b/crates/metal2vulkan-runtime/src/scheduler/mod.rs @@ -59,7 +59,7 @@ //! hazard state, in this order: the order Metal follows across queues. A batch held for its host //! step or its checks keeps its place among the tracked accesses: a later commit's batch on //! another queue that conflicts with it waits behind it, its own host step and checks too -//! ([`Order::behind`]). +//! ([`Order::is_behind`]). //! - **Many logical queues on few `VkQueue`s.** A logical queue keeps its `VkQueue` from a //! command buffer's making to its completion, and moves only where it holds no other //! uncompleted one (`queue_share.rs`); each `VkQueue` signals its own timeline semaphore with diff --git a/crates/metal2vulkan-runtime/src/scheduler/order.rs b/crates/metal2vulkan-runtime/src/scheduler/order.rs index 404775311..14299bc25 100644 --- a/crates/metal2vulkan-runtime/src/scheduler/order.rs +++ b/crates/metal2vulkan-runtime/src/scheduler/order.rs @@ -12,7 +12,7 @@ //! for an event (its tracking across queues). The runtime's tracker plans each batch as it is //! submitted, so a batch held for a reason of the runtime's own (its host step, its submission //! checks) must not let a later commit's batch that conflicts with it (a tracked resource's range -//! that one of them writes, or a fence) go before it: such a head is [`behind`](Order::behind) +//! that one of them writes, or a fence) go before it: such a head is [`behind`](Order::is_behind) //! it, and waits. //! - **Which batches keep their place.** Every batch of a line up to the first that waits for //! an event value not yet reached by a submitted signal or the host, or for a binary diff --git a/crates/metal2vulkan-runtime/src/sparse/mod.rs b/crates/metal2vulkan-runtime/src/sparse/mod.rs index 5506c11e3..5d4b5defc 100644 --- a/crates/metal2vulkan-runtime/src/sparse/mod.rs +++ b/crates/metal2vulkan-runtime/src/sparse/mod.rs @@ -117,7 +117,7 @@ fn undefined(ty: &'static str, raw: u64) -> Error { #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum SparseProblem { /// A texture type a sparse heap makes no texture of: 1D, 1D array and texture buffers, for - /// which Metal answers nil (an [`Error::Nil`](crate::Error::Nil)). + /// which Metal answers nil (an [`Error::Nil`]). /// /// Basis: unknown (plain Metal's nil for a 1D, 1D array or buffer texture of a sparse heap is /// not on record with a device or release). diff --git a/crates/metal2vulkan-runtime/src/texture/copy_images.rs b/crates/metal2vulkan-runtime/src/texture/copy_images.rs index 58637e3d7..286286a6c 100644 --- a/crates/metal2vulkan-runtime/src/texture/copy_images.rs +++ b/crates/metal2vulkan-runtime/src/texture/copy_images.rs @@ -4,7 +4,7 @@ //! //! - **Within a copy** ([`Reused`]): a later step of a copy (a band of an interleave copy; the //! next aspect or slice of a heap texture's moves) takes an image an earlier step of it made -//! that [covers](covers) the one it needs, where no image of the step took it already. A copy's +//! that [covers] the one it needs, where no image of the step took it already. A copy's //! steps are recorded one after another into one command buffer, each of their commands after a //! barrier from every command before it to every command after it (`Barrier::everything`, in //! `InterleaveCopy::record` and `SampleCopy::record`), and a step writes each texel of an image diff --git a/crates/metal2vulkan-runtime/src/texture/wrapped.rs b/crates/metal2vulkan-runtime/src/texture/wrapped.rs index 695bf6f91..2a663f4bb 100644 --- a/crates/metal2vulkan-runtime/src/texture/wrapped.rs +++ b/crates/metal2vulkan-runtime/src/texture/wrapped.rs @@ -740,7 +740,7 @@ impl Device { /// /// A runtime extension: Metal makes no texture over a Vulkan image. The descriptor's /// `placement` gives the texture's resource ID as `new_texture`'s does - /// (`resource_ids.rs`), and [`IdPlacement::Outside`](crate::IdPlacement::Outside) gives it + /// (`resource_ids.rs`), and [`IdPlacement::Outside`] gives it /// none, as there: it answers 0, holds no slot, and counts in no plain allocation or /// reservation, so a swapchain image moves no program texture's ID. Unlike `new_texture`, /// the call takes no sampler ID for the device at any placement. diff --git a/crates/metal2vulkan-runtime/src/texture_descriptor.rs b/crates/metal2vulkan-runtime/src/texture_descriptor.rs index 0efb252f0..b4286b4ec 100644 --- a/crates/metal2vulkan-runtime/src/texture_descriptor.rs +++ b/crates/metal2vulkan-runtime/src/texture_descriptor.rs @@ -738,7 +738,7 @@ pub enum TextureProblem { /// there first). ViewOnlyFormat, /// An extent the pixel format does not take: a PVRTC texture that is not square with a - /// power-of-two side, or a 4:2:2 texture of odd width; and, an [`Error::Nil`](crate::Error::Nil) + /// power-of-two side, or a 4:2:2 texture of odd width; and, an [`Error::Nil`] /// of plain Metal, a render target of a 4:2:0 or 4:2:2 two-plane YCbCr format over a surface /// whose width or height is odd. /// @@ -754,7 +754,7 @@ pub enum TextureProblem { /// Basis: metal-measured (an Apple M4, macOS 27.0.1: plain Metal's descriptor validation /// asserts over `ShaderAtomic` of an extended-range format). UsageForFormat, - /// `Unspecialized`, of which Metal makes no texture, an [`Error::Nil`](crate::Error::Nil): + /// `Unspecialized`, of which Metal makes no texture, an [`Error::Nil`]: /// plain Metal answers nil for the texture, a heap's and a buffer's, in every storage mode /// and usage (an M3 Max under macOS 26.7, the consumer's report), once every rule Metal stops /// passed, where [`Device::heap_texture_size_and_align`] answers 0 bytes at the alignment @@ -791,7 +791,7 @@ pub enum TextureProblem { /// A format of which Metal makes no texture from a descriptor alone: the 69 two-plane YCbCr /// formats (`metal::format::ycbcr_format`, which it makes over an IOSurface's planes, /// [`Buffer::new_texture_with_iosurface_plane`]), `RGBA16Float_XR`, `AnyDepth` and - /// `AnyStencil`, an [`Error::Nil`](crate::Error::Nil). Plain Metal answers nil (an Apple M4 + /// `AnyStencil`, an [`Error::Nil`]. Plain Metal answers nil (an Apple M4 /// under macOS 27.0.1; with an M3 Max under 26.7): from the device, a heap and a buffer (the /// linear SPI's too), for every texture type the format takes (a two-plane YCbCr format no /// multisample one, `AnyDepth` and `AnyStencil` a 2D, 2D array, cube and cube array one, which