diff --git a/crates/metal2vulkan-runtime/src/blit.rs b/crates/metal2vulkan-runtime/src/blit.rs index dfe5391b8..44b686135 100644 --- a/crates/metal2vulkan-runtime/src/blit.rs +++ b/crates/metal2vulkan-runtime/src/blit.rs @@ -238,8 +238,9 @@ impl BlitCommandEncoder { /// Record one blit command that reads and writes `uses`: the copies into the heap shadows /// it uses that the encoder has not copied in, and the barrier the uses need after the /// encoder's earlier commands, then the command through `record`. Every blit command goes - /// through here once its checks passed. Refused only as `EncoderCore::plan_shadows` is, for - /// a merge, which no blit needs (the module docs). + /// through here once its checks passed, and its uses name every byte it touches, untracked + /// memory's too (`EncoderCore::command_named`). Refused only as `EncoderCore::plan_shadows` + /// is, for a merge, which no blit needs (the module docs). pub(super) fn command( &mut self, uses: &[Use], @@ -261,7 +262,7 @@ impl BlitCommandEncoder { /// [`command`](Self::command) of a blit command that reads the boxes `reads` of its source /// texture (`FreshUnwritten::reads`): a new texture's unwritten pattern is announced only - /// where a box reaches it (`EncoderCore::command_reading`). + /// where a box reaches it (`EncoderCore::command_named`). pub(super) fn command_reading( &mut self, uses: &[Use], @@ -283,7 +284,7 @@ impl BlitCommandEncoder { let shadows = shadow::copies_used(self.shadows.iter(), uses); let copies = self.core.plan_shadows(&shadows, uses)?; self.core.shadow_copies(&copies); - self.core.command_reading(stages, uses, reads, record); + self.core.command_named(stages, uses, reads, record); self.core.shadows_used(&shadows, uses, &[]); Ok(()) } diff --git a/crates/metal2vulkan-runtime/src/encoder.rs b/crates/metal2vulkan-runtime/src/encoder.rs index 69e8f410b..0fd55841d 100644 --- a/crates/metal2vulkan-runtime/src/encoder.rs +++ b/crates/metal2vulkan-runtime/src/encoder.rs @@ -51,7 +51,7 @@ use super::shadow_merge::ShadowMerge; use super::sparse::encoder::SparseUpdate; use super::texture::decoded_twin::TwinWrite; use super::texture::kept_image::KeptLease; -use super::tracker::{Barrier, EncoderUses, Summary, Use, UseRange}; +use super::tracker::{Barrier, EncoderUses, Reach, Summary, Use, UseRange}; use super::used_resources::EncoderKind; use super::Device; use crate::device::functions::Vk; @@ -685,18 +685,22 @@ impl EncoderCore { self.command_reaching(stages, uses, &BTreeSet::new(), record); } - /// [`command`](Self::command) of a command that reads the boxes `reads` of textures' images - /// (a blit's sources): a read of a new texture's unwritten pattern there is announced only - /// where a box reaches an unwritten texel (`fresh_unwritten.rs`); its other reads as + /// [`command`](Self::command) of a command whose uses name every byte of untracked memory it + /// touches (`tracker::Reach::Named`): a blit encoder's command, a shadow's copy. In an + /// ordered encoder it orders after the earlier such commands per key and range alone, and + /// after every untracked access of the others. It reads the boxes `reads` of textures' + /// images (a blit's sources): a read of a new texture's unwritten pattern there is announced + /// only where a box reaches an unwritten texel (`fresh_unwritten.rs`); its other reads as /// `command`'s. - pub(super) fn command_reading( + pub(super) fn command_named( &mut self, stages: vk::PipelineStageFlags2, uses: &[Use], reads: &[FreshRead], record: impl FnOnce(&Vk, vk::CommandBuffer), ) { - self.command_observing(stages, uses, &BTreeSet::new(), reads, record); + let none = BTreeSet::new(); + self.command_observing(stages, uses, (&none, Reach::Named), reads, record); } /// `command` of a dispatch or draw whose uses of the keys `resident` reach @@ -709,20 +713,21 @@ impl EncoderCore { resident: &BTreeSet, record: impl FnOnce(&Vk, vk::CommandBuffer), ) { - self.command_observing(stages, uses, resident, &[], record); + self.command_observing(stages, uses, (resident, Reach::Unnamed), &[], record); } /// [`command_reaching`](Self::command_reaching) reading the boxes `reads` - /// ([`command_reading`](Self::command_reading)). + /// ([`command_named`](Self::command_named)), whose uses say what untracked memory it touches + /// as `reach` does. fn command_observing( &mut self, stages: vk::PipelineStageFlags2, uses: &[Use], - resident: &BTreeSet, + (resident, reach): (&BTreeSet, Reach), reads: &[FreshRead], record: impl FnOnce(&Vk, vk::CommandBuffer), ) { - let Some(barrier) = self.track(stages, uses, resident, reads) else { + let Some(barrier) = self.track(stages, uses, (resident, reach), reads) else { return; }; let Some(raw) = self.recording() else { @@ -749,7 +754,7 @@ impl EncoderCore { uses: &[Use], resident: &BTreeSet, ) -> Option> { - self.track(stages, uses, resident, &[]) + self.track(stages, uses, (resident, Reach::Unnamed), &[]) } /// Everything of a command [`command_observing`](Self::command_observing) records but its @@ -759,7 +764,7 @@ impl EncoderCore { &mut self, stages: vk::PipelineStageFlags2, uses: &[Use], - resident: &BTreeSet, + (resident, reach): (&BTreeSet, Reach), reads: &[FreshRead], ) -> Option> { // A command that names a detached buffer records nothing, nor does any after it. @@ -778,8 +783,11 @@ impl EncoderCore { // held are the uses' own. let aliased = self.aliased(uses); let tracked = aliased.as_deref().unwrap_or(uses); - let barrier = self.uses.barrier(tracked); - self.uses.record(stages, tracked, barrier); + let barrier = self.uses.barrier(tracked, reach); + self.uses.record_reaching(stages, tracked, barrier, reach); + if barrier.is_some() { + self.device().shared().counts.command_barrier(); + } self.touch_reaching(uses, resident); Some(barrier) } @@ -1218,7 +1226,7 @@ impl EncoderCore { record: impl FnOnce(&Vk, vk::CommandBuffer), ) { if self.uses.ordered() { - self.command(stages, uses, record); + self.command_named(stages, uses, &[], record); return; } if self.skips(uses.iter().map(|used| used.key)) { diff --git a/crates/metal2vulkan-runtime/src/fresh_unwritten.rs b/crates/metal2vulkan-runtime/src/fresh_unwritten.rs index f43b0a993..9ec7fc86d 100644 --- a/crates/metal2vulkan-runtime/src/fresh_unwritten.rs +++ b/crates/metal2vulkan-runtime/src/fresh_unwritten.rs @@ -522,7 +522,7 @@ impl FreshUnwritten { } /// A blit's reads of `read` of `texture` (each the aspects and a box, in the image's levels - /// and layers), for `EncoderCore::command_reading`: none where no texture is noted, nor for a + /// and layers), for `EncoderCore::command_named`: none where no texture is noted, nor for a /// texture over a buffer's bytes. pub(super) fn reads( device: &Device, diff --git a/crates/metal2vulkan-runtime/src/tests/blit_order.rs b/crates/metal2vulkan-runtime/src/tests/blit_order.rs new file mode 100644 index 000000000..f6a1ddac8 --- /dev/null +++ b/crates/metal2vulkan-runtime/src/tests/blit_order.rs @@ -0,0 +1,171 @@ +//! A blit encoder's commands over untracked memory, ordered per key and range (`tracker.rs`, +//! **Inside an encoder**): Metal runs a blit encoder's commands in encoded order, which orders +//! two commands only where their bytes can meet. Copies into disjoint bytes of a heap's untracked +//! buffers take no barrier between them, copies into overlapping bytes still do, and each leaves +//! the bytes it copied; copies into textures of a heap over host pages, two of them over the same +//! bytes, leave the last copy's texels in both and the other texture's in its own. +//! +//! Device tests: compiled only under the validation crate's GPU safety cfgs (`m2v_gpu`, +//! `m2v_cpu_icd`), on the kind of device the cfg selects. + +use super::blit_holds::{device, Host, Scratch, WAIT}; +use crate::{ + BlitCommandEncoder, BlitOption, Buffer, CommandQueue, Device, HeapDescriptor, HeapType, Origin, + Region, ResourceOptions, Size, Texture, TextureDescriptor, +}; +use metal2vulkan::metal::{PixelFormat, TextureUsage}; + +/// Each heap buffer's bytes. +const LENGTH: u64 = 64 << 10; + +/// The textures' side: 64 x 64 `BGRA8Unorm`, one of Metal's tiles of 4-byte elements. +const SIDE: u64 = 64; + +/// `LENGTH` bytes that name their place and `seed`. +fn pattern(seed: u8, length: u64) -> Vec { + (0..length) + .map(|i| (i as u8) ^ (i >> 8) as u8 ^ seed) + .collect() +} + +/// Run one command buffer of a blit encoder `encode` fills; the barriers recorded between +/// ordered encoders' commands meanwhile (`WorkCounts::command_barriers`). +fn barriers( + device: &Device, + queue: &CommandQueue, + encode: impl FnOnce(&mut BlitCommandEncoder), +) -> u64 { + let before = device.work_counts().command_barriers; + let command_buffer = queue.command_buffer().unwrap(); + let mut blit = command_buffer.blit_command_encoder().unwrap(); + encode(&mut blit); + blit.end_encoding().unwrap(); + command_buffer.commit().unwrap(); + command_buffer.wait_until_completed_for(WAIT).unwrap(); + assert_eq!(command_buffer.error(), None); + device.work_counts().command_barriers - before +} + +/// The bytes of a `Shared` buffer. +fn bytes(buffer: &Buffer, length: u64) -> Vec { + let contents = buffer.contents().expect("a Shared buffer's contents"); + // SAFETY: the buffer is `Shared`, `length` bytes long at least, and no command uses it now. + unsafe { std::slice::from_raw_parts(contents.as_ptr(), length as usize) }.to_vec() +} + +#[test] +fn a_blits_copies_into_disjoint_bytes_of_a_heap_take_no_barrier_and_overlapping_ones_do() { + let scratch = Scratch::new("blit-order-buffers"); + let device = device(&scratch.0); + let queue = device.new_command_queue().unwrap(); + // A heap's buffers are untracked (`HazardTrackingMode::Default`). + let descriptor = + HeapDescriptor::new(HeapType::Placement, 4 * LENGTH, ResourceOptions::shared()); + let heap = device.new_heap(&descriptor).unwrap(); + let placed = |offset| { + heap.new_buffer_at_offset(LENGTH, ResourceOptions::shared(), offset) + .unwrap() + }; + let (a, b, c) = (placed(0), placed(LENGTH), placed(LENGTH / 2)); + let source = |seed| { + device + .new_buffer_with_bytes(&pattern(seed, LENGTH), ResourceOptions::shared()) + .unwrap() + }; + let (one, two, three) = (source(1), source(2), source(3)); + + // Disjoint bytes of one heap: no order between them. + let disjoint = barriers(&device, &queue, |blit| { + blit.copy_from_buffer_to_buffer(&one, 0, &a, 0, LENGTH) + .unwrap(); + blit.copy_from_buffer_to_buffer(&two, 0, &b, 0, LENGTH) + .unwrap(); + }); + assert_eq!(disjoint, 0, "copies into disjoint bytes of a heap"); + assert_eq!(bytes(&a, LENGTH), pattern(1, LENGTH)); + assert_eq!(bytes(&b, LENGTH), pattern(2, LENGTH)); + + // Overlapping bytes (c's first half is a's second): the second copy after the first. + let overlapping = barriers(&device, &queue, |blit| { + blit.copy_from_buffer_to_buffer(&one, 0, &a, 0, LENGTH) + .unwrap(); + blit.copy_from_buffer_to_buffer(&three, 0, &c, 0, LENGTH) + .unwrap(); + }); + assert_eq!(overlapping, 1, "copies into overlapping bytes of a heap"); + let half = (LENGTH / 2) as usize; + let mut expected = pattern(1, LENGTH); + expected[half..].copy_from_slice(&pattern(3, LENGTH)[..half]); + assert_eq!(bytes(&a, LENGTH), expected); + assert_eq!(bytes(&c, LENGTH), pattern(3, LENGTH)); +} + +#[test] +fn a_blits_copies_into_textures_of_a_heap_over_host_pages_leave_each_its_texels() { + let scratch = Scratch::new("blit-order-textures"); + let host = Host::new(); + let device = device(&scratch.0); + let queue = device.new_command_queue().unwrap(); + let size = 4 * SIDE * SIDE * 4; + let descriptor = HeapDescriptor::new(HeapType::Placement, size, ResourceOptions::shared()); + // SAFETY: the host memory outlives the heap and its textures (dropped after the device), and + // only their commands use it. + let heap = + match unsafe { device.new_heap_with_bytes_no_copy(host.memory(), &descriptor, None, None) } + { + Ok(heap) => heap, + Err(error) => { + eprintln!("skipped: no heap over host pages here: {error}"); + return; + } + }; + let placed = |offset| -> Texture { + let mut descriptor = + TextureDescriptor::texture_2d(PixelFormat::BGRA8Unorm, SIDE, SIDE, false); + descriptor.usage = TextureUsage::SHADER_READ; + descriptor.resource_options = ResourceOptions::shared(); + descriptor.allow_gpu_optimized_contents = false; + heap.new_texture_at_offset(&descriptor, offset).unwrap() + }; + let tile = SIDE * SIDE * 4; + // `first` and `last` lie over the same bytes, `other` over the next tile. + let (first, other, last) = (placed(0), placed(tile), placed(0)); + let source = |seed| { + device + .new_buffer_with_bytes(&pattern(seed, tile), ResourceOptions::shared()) + .unwrap() + }; + let (one, two, three) = (source(1), source(2), source(3)); + let copy = |blit: &mut BlitCommandEncoder, from: &Buffer, to: &Texture| { + blit.copy_from_buffer_to_texture( + from, + 0, + SIDE * 4, + tile, + Size::new(SIDE, SIDE, 1), + to, + 0, + 0, + Origin::new(0, 0, 0), + BlitOption::None, + ) + .unwrap(); + }; + barriers(&device, &queue, |blit| { + copy(blit, &one, &first); + copy(blit, &two, &other); + copy(blit, &three, &last); + }); + let texels = |texture: &Texture| { + let mut read = vec![0u8; tile as usize]; + let region = Region::new_2d(0, 0, SIDE, SIDE); + texture + .get_bytes(&mut read, SIDE * 4, tile, region, 0, 0) + .unwrap(); + read + }; + // The last copy's texels in both textures over its bytes, the other copy's in its own. + assert_eq!(texels(&last), pattern(3, tile)); + assert_eq!(texels(&first), pattern(3, tile)); + assert_eq!(texels(&other), pattern(2, tile)); +} diff --git a/crates/metal2vulkan-runtime/src/tests/host_aliases.rs b/crates/metal2vulkan-runtime/src/tests/host_aliases.rs index 897811791..fd28d6760 100644 --- a/crates/metal2vulkan-runtime/src/tests/host_aliases.rs +++ b/crates/metal2vulkan-runtime/src/tests/host_aliases.rs @@ -496,7 +496,7 @@ fn a_use_takes_the_keys_of_the_ranges_its_bytes_meet_clipped() { /// them. #[test] fn a_sample_through_a_second_key_waits_for_a_render_through_the_first() { - use super::super::tracker::{EncoderUses, Point, Tracker, Wait}; + use super::super::tracker::{EncoderUses, Point, Reach, Tracker, Wait}; let aliases = Aliases::default(); let (rendered, sampled) = (ResourceKey::new(), ResourceKey::new()); let surface = (0x7f00_0000_0000, 0x7e_9000); @@ -505,7 +505,7 @@ fn a_sample_through_a_second_key_waits_for_a_render_through_the_first() { let summary = |uses: &[Use]| { let mut encoder = EncoderUses::new(true); let uses = aliases.augment(uses).unwrap_or_else(|| uses.to_vec()); - let barrier = encoder.barrier(&uses); + let barrier = encoder.barrier(&uses, Reach::Unnamed); encoder.record(vk::PipelineStageFlags2::NONE, &uses, barrier); encoder.finish() }; diff --git a/crates/metal2vulkan-runtime/src/tests/mod.rs b/crates/metal2vulkan-runtime/src/tests/mod.rs index 6dcdab617..48d2fb442 100644 --- a/crates/metal2vulkan-runtime/src/tests/mod.rs +++ b/crates/metal2vulkan-runtime/src/tests/mod.rs @@ -23,6 +23,8 @@ mod binding_view; mod blit; #[cfg(any(m2v_gpu, m2v_cpu_icd))] mod blit_holds; +#[cfg(any(m2v_gpu, m2v_cpu_icd))] +mod blit_order; mod blit_plan; mod buffer_texture; mod capabilities; diff --git a/crates/metal2vulkan-runtime/src/tests/tracker.rs b/crates/metal2vulkan-runtime/src/tests/tracker.rs index 2eceefc78..859361741 100644 --- a/crates/metal2vulkan-runtime/src/tests/tracker.rs +++ b/crates/metal2vulkan-runtime/src/tests/tracker.rs @@ -4,7 +4,7 @@ use crate::tracker::{ ordered, Access, Barrier, EncoderUses, Footprint, GeometryWrites, IndirectReads, LegacyBarrier, - Point, Summary, Tracker, Use, UseRange, Wait, ENTRIES_PER_KEY, + Point, Reach, Summary, Tracker, Use, UseRange, Wait, ENTRIES_PER_KEY, }; use ash::vk; use std::ops::Range; @@ -60,7 +60,7 @@ fn barrier(src: Access, dst: Access) -> Option { fn encoder(commands: &[&[Use]]) -> Summary { let mut uses = EncoderUses::new(true); for command in commands { - let barrier = uses.barrier(command); + let barrier = uses.barrier(command, Reach::Unnamed); uses.record(vk::PipelineStageFlags2::NONE, command, barrier); } uses.finish() @@ -651,17 +651,17 @@ fn ordered_commands_wait_for_earlier_commands_of_the_encoder() { let again = [reads(1, bytes(0..64), copy_read())]; let overwrite = [writes(1, bytes(0..256), copy_write())]; - assert_eq!(uses.barrier(©_in), None); + assert_eq!(uses.barrier(©_in, Reach::Unnamed), None); uses.record(TRANSFER, ©_in, None); - let before_out = uses.barrier(©_out); + let before_out = uses.barrier(©_out, Reach::Unnamed); assert_eq!(before_out, barrier(copy_write(), copy_read())); uses.record(TRANSFER, ©_out, before_out); // Visible already. - assert_eq!(uses.barrier(&again), None); + assert_eq!(uses.barrier(&again, Reach::Unnamed), None); uses.record(TRANSFER, &again, None); // After the reads, and the write already visible to transfer reads only. assert_eq!( - uses.barrier(&overwrite), + uses.barrier(&overwrite, Reach::Unnamed), barrier( Access::new(TRANSFER, vk::AccessFlags2::TRANSFER_WRITE), copy_write() @@ -675,10 +675,10 @@ fn unordered_encoders_order_nothing_inside() { let write = [writes(1, bytes(0..256), shader_write())]; uses.record(COMPUTE, &write, None); assert_eq!( - uses.barrier(&[reads(1, bytes(0..256), shader_read())]), + uses.barrier(&[reads(1, bytes(0..256), shader_read())], Reach::Unnamed), None ); - assert_eq!(uses.barrier(&write), None); + assert_eq!(uses.barrier(&write, Reach::Unnamed), None); } #[test] @@ -691,18 +691,79 @@ fn untracked_memory_is_one_class_inside_an_encoder() { None, ); assert_eq!( - uses.barrier(&[Use::reads(6, false, bytes(1024..2048), copy_read())]), + uses.barrier( + &[Use::reads(6, false, bytes(1024..2048), copy_read())], + Reach::Unnamed + ), barrier(copy_write(), copy_read()) ); // Tracked resources order per identity. let mut uses = EncoderUses::::new(true); uses.record(TRANSFER, &[writes(5, bytes(0..16), copy_write())], None); - assert_eq!(uses.barrier(&[reads(6, bytes(0..16), copy_read())]), None); - // A tracked and an untracked resource are different memory. assert_eq!( - uses.barrier(&[Use::reads(7, false, bytes(0..16), copy_read())]), + uses.barrier(&[reads(6, bytes(0..16), copy_read())], Reach::Unnamed), None ); + // A tracked and an untracked resource are different memory. + assert_eq!( + uses.barrier( + &[Use::reads(7, false, bytes(0..16), copy_read())], + Reach::Unnamed + ), + None + ); +} + +#[test] +fn named_untracked_memory_orders_per_key_and_range_inside_an_encoder() { + let named = |uses: &mut EncoderUses, command: &[Use]| { + let barrier = uses.barrier(command, Reach::Named); + uses.record_reaching(TRANSFER, command, barrier, Reach::Named); + barrier + }; + let write = |key, range| [Use::writes(key, false, bytes(range), copy_write())]; + let read = |key, range| [Use::reads(key, false, bytes(range), copy_read())]; + // Two blits into disjoint bytes of one heap, and into another's: no order. + let mut uses = EncoderUses::::new(true); + assert_eq!(named(&mut uses, &write(5, 0..16)), None); + assert_eq!(named(&mut uses, &write(5, 16..32)), None); + assert_eq!(named(&mut uses, &write(6, 0..16)), None); + // Overlapping bytes of the same key order. + assert_eq!( + named(&mut uses, &read(5, 8..24)), + barrier(copy_write(), copy_read()) + ); + // A command whose uses do not name what it touches orders after every untracked access, + // and every later command after it. + let mut uses = EncoderUses::::new(true); + assert_eq!(named(&mut uses, &write(5, 0..16)), None); + let shader = [Use::reads(9, false, bytes(0..4), shader_read())]; + assert_eq!( + uses.barrier(&shader, Reach::Unnamed), + barrier(copy_write(), shader_read()) + ); + uses.record( + COMPUTE, + &[Use::writes(9, false, bytes(0..4), shader_write())], + None, + ); + assert_eq!( + uses.barrier(&write(6, 64..128), Reach::Named), + barrier(shader_write(), copy_write()) + ); + // A tracked use of a key and a named untracked use of it are the same bytes (an untracked + // heap's use carries the key of a tracked buffer over its host pages). + let mut uses = EncoderUses::::new(true); + uses.record( + TRANSFER, + &[Use::writes(5, true, bytes(0..16), copy_write())], + None, + ); + assert_eq!( + named(&mut uses, &read(5, 8..24)), + barrier(copy_write(), copy_read()) + ); + assert_eq!(named(&mut uses, &read(5, 16..32)), None); } #[test] @@ -713,12 +774,12 @@ fn a_command_does_not_order_against_itself() { reads(1, bytes(0..64), copy_read()), writes(1, bytes(64..128), copy_write()), ]; - assert_eq!(uses.barrier(©), None); + assert_eq!(uses.barrier(©, Reach::Unnamed), None); uses.record(TRANSFER, ©, None); // The same copy again: after its write (write after write), and after its read (write after // read on 0..64 is not touched; read after write on 64..128 is not read). assert_eq!( - uses.barrier(©), + uses.barrier(©, Reach::Unnamed), barrier( Access::new(TRANSFER, vk::AccessFlags2::TRANSFER_WRITE), copy_write() @@ -730,8 +791,14 @@ fn a_command_does_not_order_against_itself() { fn uses_that_touch_nothing_are_ignored() { let mut uses = EncoderUses::::new(true); uses.record(TRANSFER, &[writes(1, bytes(0..256), copy_write())], None); - assert_eq!(uses.barrier(&[reads(1, bytes(16..16), copy_read())]), None); - assert_eq!(uses.barrier(&[reads(1, bytes(0..16), Access::NONE)]), None); + assert_eq!( + uses.barrier(&[reads(1, bytes(16..16), copy_read())], Reach::Unnamed), + None + ); + assert_eq!( + uses.barrier(&[reads(1, bytes(0..16), Access::NONE)], Reach::Unnamed), + None + ); let summary = one(&[writes(1, bytes(8..8), copy_write())]); assert!(summary.uses().is_empty()); } @@ -939,7 +1006,7 @@ fn random_encoder(next: &mut impl FnMut(u64) -> u64) -> Summary { _ => reads(key, range, shader_read()), }; let command = [used]; - let barrier = uses.barrier(&command); + let barrier = uses.barrier(&command, Reach::Unnamed); uses.record(vk::PipelineStageFlags2::NONE, &command, barrier); } if next(4) == 0 { @@ -1340,7 +1407,7 @@ fn an_encoder_summary_stays_bounded() { let mut uses = EncoderUses::::new(true); for at in 0..1000u64 { let command = [reads(1, bytes(at * 4..at * 4 + 4), copy_read())]; - let barrier = uses.barrier(&command); + let barrier = uses.barrier(&command, Reach::Unnamed); uses.record(TRANSFER, &command, barrier); } let summary = uses.finish(); @@ -1596,11 +1663,11 @@ fn a_split_encoder_waits_in_its_first_part_and_updates_in_its_last() { let read = [reads(1, bytes(0..256), shader_read())]; let mut whole = EncoderUses::::new(true); whole.record(COMPUTE, &write, None); - assert!(whole.barrier(&read).is_some()); + assert!(whole.barrier(&read, Reach::Unnamed).is_some()); let mut split = EncoderUses::::new(true); split.record(COMPUTE, &write, None); split.split(); - assert_eq!(split.barrier(&read), None); + assert_eq!(split.barrier(&read, Reach::Unnamed), None); let (first, second): (Key, Key) = (100, 101); let mut a = EncoderUses::::new(false); diff --git a/crates/metal2vulkan-runtime/src/tracker.rs b/crates/metal2vulkan-runtime/src/tracker.rs index 70290f6f0..7b7baeaba 100644 --- a/crates/metal2vulkan-runtime/src/tracker.rs +++ b/crates/metal2vulkan-runtime/src/tracker.rs @@ -8,8 +8,17 @@ //! in dispatched order", and a memory barrier on a serial encoder is "allowed, but ignored", so //! the order covers untracked resources too (Metal's headers; documented, not measured). Before //! each command, [`EncoderUses::barrier`] compares its uses with the encoder's earlier commands: -//! tracked resources per resource and range, and all untracked memory as one class, since -//! untracked heap resources may alias. +//! tracked resources per resource and range. Untracked memory may alias across resources, so +//! it orders by what a command's uses say of it ([`Reach`]). A command whose uses name every +//! byte of untracked memory it touches (a blit's, a shadow's copy) orders per key and range +//! against the others like it and against tracked uses, as each byte has one key and range +//! wherever it is named: a heap's resources' bytes are the heap's (`Buffer::tracked`), an image +//! bound in a heap's memory is a use of the heap's key, a view's uses are its texture's, a +//! shadow's image and staging are its own, and the uses of a buffer or heap over host pages +//! carry the keys of the others over the same bytes (`host_aliases.rs`). A command that may +//! touch untracked memory its uses do not name (a shader's, through addresses, argument +//! buffers and resident resources) orders against every untracked access, as one class, and +//! every command orders against it. //! - **Between encoders, command buffers and queues** ([`Tracker`]). The device's scheduler //! submits batches (a command buffer's encoders between its event waits and signals) in one //! order over all its logical queues, and [`Tracker::plan`] compares each batch's encoder @@ -150,7 +159,9 @@ pub(super) enum UseRange { } impl UseRange { - /// The range every untracked use takes inside an encoder: all untracked memory is one class. + /// The range every untracked use of a command that may touch untracked memory its uses do + /// not name takes inside an encoder, and every untracked use's in the class all of them + /// order against ([`Reach::Unnamed`]): all untracked memory. const UNTRACKED: UseRange = UseRange::Bytes(0..u64::MAX); /// Whether the range holds nothing. @@ -1009,12 +1020,35 @@ fn merged(uses: impl IntoIterator>) -> Vec { - Tracked(K), + /// A tracked use, or an untracked use of a [`Reach::Named`] command, at its key and range: + /// one key's bytes are the same memory whichever use names them (an untracked heap's use + /// carries the key of a tracked buffer over the same host pages, `host_aliases.rs`). + Key(K), + /// Every untracked access of the encoder's commands, what a [`Reach::Unnamed`] command orders + /// after. Untracked, + /// The untracked accesses of [`Reach::Unnamed`] commands, what a [`Reach::Named`] command + /// orders after. + Unnamed, } /// The uses of one encoder: the order of its commands, and the summaries its commit reads, one @@ -1115,24 +1149,42 @@ impl EncoderUses { self.ordered } - /// The barrier a command with `uses` needs after the encoder's earlier commands: none in an - /// encoder whose commands are not ordered. Nothing changes until [`EncoderUses::record`]. - pub(super) fn barrier(&self, uses: &[Use]) -> Option { + /// The barrier a command with `uses`, which say what untracked memory it touches as `reach` + /// does, needs after the encoder's earlier commands: none in an encoder whose commands are + /// not ordered. Nothing changes until [`EncoderUses::record`]. + pub(super) fn barrier(&self, uses: &[Use], reach: Reach) -> Option { if !self.ordered { return None; } // One encoder runs on one queue: its commands need barriers, never waits. - depend(&self.inside, &inside_uses(uses), (Point::default(), 0)) - .barrier - .needed() + depend( + &self.inside, + &inside_uses(uses, reach, false), + (Point::default(), 0), + ) + .barrier + .needed() } - /// Note a recorded command: it ran in `stages`, with `uses`, after `barrier`. + /// Note a recorded command that may touch untracked memory its uses do not name + /// ([`Reach::Unnamed`]): it ran in `stages`, with `uses`, after `barrier`. pub(super) fn record( &mut self, stages: vk::PipelineStageFlags2, uses: &[Use], barrier: Option, + ) { + self.record_reaching(stages, uses, barrier, Reach::Unnamed); + } + + /// [`record`](Self::record) of a command whose `uses` say what untracked memory it touches + /// as `reach` does. + pub(super) fn record_reaching( + &mut self, + stages: vk::PipelineStageFlags2, + uses: &[Use], + barrier: Option, + reach: Reach, ) { if !self.held.is_empty() { let held = &self.held; @@ -1148,7 +1200,7 @@ impl EncoderUses { if self.ordered { admit( &mut self.inside, - &inside_uses(uses), + &inside_uses(uses, reach, true), barrier, &[], Point::default(), @@ -1579,22 +1631,41 @@ fn coalesce_uses(uses: &mut Vec>) { } } -/// The uses as the encoder orders them: untracked ones as the one class of untracked memory. -fn inside_uses(uses: &[Use]) -> Vec>> { - merged(uses.iter().map(|used| Use { - key: if used.tracked { - Class::Tracked(used.key) - } else { - Class::Untracked - }, +/// The uses of a command of `reach` as the encoder orders them ([`Class`]): to compare with the +/// earlier commands' (`recorded` false), or as it keeps them (`recorded` true). A tracked use is +/// its key's. An untracked use of a [`Reach::Named`] command compares with its key's and with +/// the accesses of the commands that do not name theirs, and is kept as its key's and as an +/// access of all untracked memory; one of a [`Reach::Unnamed`] command compares with every +/// untracked access, and is kept as an access of all untracked memory, and of the commands that +/// do not name theirs. +fn inside_uses( + uses: &[Use], + reach: Reach, + recorded: bool, +) -> Vec>> { + let class = |used: &Use, key: Class, range: UseRange| Use { + key, tracked: used.tracked, - range: if used.tracked { - used.range.clone() - } else { - UseRange::UNTRACKED - }, + range, read: used.read, write: used.write, + }; + merged(uses.iter().flat_map(|used| { + let (first, second) = match (used.tracked, reach, recorded) { + (true, _, _) => (Class::Key(used.key), None), + (false, Reach::Named, false) => (Class::Key(used.key), Some(Class::Unnamed)), + (false, Reach::Named, true) => (Class::Key(used.key), Some(Class::Untracked)), + (false, Reach::Unnamed, false) => (Class::Untracked, None), + (false, Reach::Unnamed, true) => (Class::Untracked, Some(Class::Unnamed)), + }; + let range = match first { + Class::Key(_) => used.range.clone(), + Class::Untracked | Class::Unnamed => UseRange::UNTRACKED, + }; + [Some(class(used, first, range))] + .into_iter() + .chain([second.map(|key| class(used, key, UseRange::UNTRACKED))]) + .flatten() })) } diff --git a/crates/metal2vulkan-runtime/src/work_counts.rs b/crates/metal2vulkan-runtime/src/work_counts.rs index ab27ec737..201c78334 100644 --- a/crates/metal2vulkan-runtime/src/work_counts.rs +++ b/crates/metal2vulkan-runtime/src/work_counts.rs @@ -145,6 +145,7 @@ pub(crate) struct Counters { event_waits_met: AtomicU64, bare_starts: AtomicU64, prefixed_starts: AtomicU64, + command_barriers: AtomicU64, unrun_instances_ended: AtomicU64, untouched_passes_skipped: AtomicU64, inline_passes: AtomicU64, @@ -1102,6 +1103,12 @@ impl Counters { self.prefixed_starts.fetch_add(1, Ordering::Relaxed); } + /// A command of an encoder Metal orders (a blit encoder, a serial compute encoder) was + /// recorded after a barrier for the encoder's earlier commands (`tracker::EncoderUses`). + pub(crate) fn command_barrier(&self) { + self.command_barriers.fetch_add(1, Ordering::Relaxed); + } + /// A render pass's first instance began inline in a primary command buffer of its encoder's /// (`render/inline_first.rs`). pub(crate) fn inline_pass(&self) { @@ -2712,6 +2719,11 @@ pub struct WorkCounts { /// buffer wrote as it opened, with no command buffer of barriers before that encoder for the /// timestamp (`gpu_time.rs`): those batches start bare where nothing else is planned. pub prefixed_starts: u64, + /// Barriers recorded before a command of an encoder Metal orders (a blit encoder, a serial + /// compute encoder) for the encoder's earlier commands (`tracker::EncoderUses`): on MoltenVK + /// each ends the Metal encoder, and the next waits for the one before (`tracker.rs`, + /// **Inside an encoder**, orders a blit's untracked uses by key and range). + pub command_barriers: u64, /// Render pass instances a pass replaced or gave up before running them (a draw that needed /// another shape before any draw recorded, a reroute's instance left behind, a capture that /// recorded nothing, a first instance whose draws record inline instead), whose draws @@ -3738,6 +3750,7 @@ impl Device { event_waits_met: counters.event_waits_met.load(Ordering::Relaxed), bare_starts: counters.bare_starts.load(Ordering::Relaxed), prefixed_starts: counters.prefixed_starts.load(Ordering::Relaxed), + command_barriers: counters.command_barriers.load(Ordering::Relaxed), unrun_instances_ended: counters.unrun_instances_ended.load(Ordering::Relaxed), untouched_passes_skipped: counters.untouched_passes_skipped.load(Ordering::Relaxed), inline_passes: counters.inline_passes.load(Ordering::Relaxed), diff --git a/crates/metal2vulkan-validation/runtime-sources.sha256 b/crates/metal2vulkan-validation/runtime-sources.sha256 index 748e87c12..78a0ae3eb 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -4d0318c7d2198dd337082eec69c7ba4547b4624e87c2395cd9c1f32779e23fb3 +9361a828e84167670dd4f40d1efddfdcd10320f9e6237df114e9f3be65dc4503 diff --git a/docs/REFUSALS.md b/docs/REFUSALS.md index 03cc46429..6479d9585 100644 --- a/docs/REFUSALS.md +++ b/docs/REFUSALS.md @@ -14,7 +14,7 @@ Columns: - `none`: no public API path: malformed or non-Metal input, Apple-private calls, or a cap no valid program of ordinary size meets; - `?`: not assessed yet. -Generated at `7c961244f`. +Generated at `33b2c8325`. ## Totals @@ -64,7 +64,7 @@ Generated at `7c961244f`. | `CoherentMemory` | `coherent(device)` accesses (Vulkan memory model) | devices short of a Vulkan feature the site names | 1: `crates/metal2vulkan/src/lower/sync/memory_model.rs:207` | `rare`: coherent(device) accesses | | `Int64Atomics` | 64-bit atomics | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`) | 2: `crates/metal2vulkan/src/lower/access/atomic.rs:624`, `crates/metal2vulkan/src/lower/access/atomic.rs:633` | `rare`: 64-bit atomics | | `ImageAtomics` | Image atomics beyond 32-bit integers | devices without a capability the site computes (`gaps`); every device (no Vulkan mechanism) | 3: `crates/metal2vulkan-runtime/src/families/formats.rs:464`, `crates/metal2vulkan-runtime/src/families/formats.rs:468` (+1) | `rare`: texture atomics beyond 32-bit integers | -| `DescriptorCount` | Too many descriptors of one kind in a stage or pipeline | devices short of a device limit the site names; devices without VkLimit::MaxUniformBufferRange | 3: `crates/metal2vulkan/src/lower/access/mod.rs:1665`, `crates/metal2vulkan/src/lower/select.rs:1628` (+1) | `app`: many textures or buffers in one stage on a smaller device | +| `DescriptorCount` | Too many descriptors of one kind in a stage or pipeline | devices short of a device limit the site names; devices without VkLimit::MaxUniformBufferRange | 3: `crates/metal2vulkan/src/lower/access/mod.rs:1665`, `crates/metal2vulkan/src/lower/select.rs:1629` (+1) | `app`: many textures or buffers in one stage on a smaller device | | `BufferRange` | A buffer window beyond the descriptor range limits | devices without a capability the site computes (`needs`); devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism) | 7: `crates/metal2vulkan-runtime/src/function_table.rs:569`, `crates/metal2vulkan/src/bind/graphics.rs:3530` (+5) | `app`: a buffer window past a device's descriptor range | | `Int64Arithmetic` | 64-bit integer arithmetic | devices without VkFeature::ShaderInt64 | 2: `crates/metal2vulkan/src/lower/arith/legal.rs:582`, `crates/metal2vulkan/src/lower/select.rs:1121` | `rare`: 64-bit integers on a device without shaderInt64 | | `Float64Arithmetic` | 64-bit float arithmetic | devices without VkFeature::ShaderFloat64 | 2: `crates/metal2vulkan/src/device/metal.rs:230`, `crates/metal2vulkan/src/lower/arith/legal.rs:587` | `rare`: doubles (MSL has none outside Apple's own code) | @@ -130,11 +130,11 @@ Generated at `7c961244f`. | `SparseTexture` | A sparse texture (`MTLTexture.isSparse`) bound at `slot`, where a function observes the residency of its accesses (`sparse_color::resident()`) and... | - | via a helper: 2: `crates/metal2vulkan/src/bind/plan/slots.rs:583`, `crates/metal2vulkan/src/bind/plan/slots.rs:607` | `rare`: sparse residency reads | | `TextureSize` | A texture whose extent, array layers, or level count is past what the device takes for its format, type, and usage (`Capability::Limit` names the... | devices short of a device limit the site names | 1: `crates/metal2vulkan-runtime/src/image_plan.rs:1191` | `app`: a texture past a device's image limits | | `TextureSampleCount` | A texture sample count the device does not take for its format, type, and usage | devices short of a Vulkan property the site names; devices without VkFeature::MultisampleArrayImage; every device (no Vulkan mechanism) | 3: `crates/metal2vulkan-runtime/src/image_plan.rs:1239`, `crates/metal2vulkan-runtime/src/image_plan.rs:593` (+1) | `app`: a sample count a device lacks for the texture | -| `TextureView` | A texture view Vulkan cannot make exactly on this image | every device (no Vulkan mechanism); every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/binding_view.rs:156`, `crates/metal2vulkan-runtime/src/texture.rs:4991` (+5) | `app`: a texture view Vulkan cannot make exactly | -| `TextureSwizzle` | A texture swizzle whose Metal behavior is not measured | devices short of a Vulkan feature the site names; every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/binding_view.rs:167`, `crates/metal2vulkan-runtime/src/texture.rs:975` (+5) | `app`: texture swizzles whose Metal behaviour is unmeasured | +| `TextureView` | A texture view Vulkan cannot make exactly on this image | every device (no Vulkan mechanism); every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/binding_view.rs:156`, `crates/metal2vulkan-runtime/src/texture.rs:5013` (+5) | `app`: a texture view Vulkan cannot make exactly | +| `TextureSwizzle` | A texture swizzle whose Metal behavior is not measured | devices short of a Vulkan feature the site names; every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/binding_view.rs:167`, `crates/metal2vulkan-runtime/src/texture.rs:976` (+5) | `app`: texture swizzles whose Metal behaviour is unmeasured | | `MipmapGeneration` | `generateMipmapsForTexture:` where the device's filter is not shown to give Metal's answer | devices without VkFeature::ShaderInt64; devices without a format's usage; every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/blit_texture.rs:1771`, `crates/metal2vulkan-runtime/src/mipmap_pick.rs:37` (+5) | `app`: generateMipmapsForTexture: where the device's filter is not Metal's | | `HostMemory` | A buffer over the caller's host memory without a copy (`newBufferWithBytesNoCopy:`) | devices without VkExtension::ExtExternalMemoryHost; every device (no Vulkan mechanism); every device (not implemented) | 5: `crates/metal2vulkan-runtime/src/host_memory.rs:393`, `crates/metal2vulkan-runtime/src/host_memory.rs:433` (+3) | `system`: newBufferWithBytesNoCopy: where the device cannot import the memory | -| `GpuTimes` | A command buffer's GPU times (`GPUStartTime`, `GPUEndTime`) on a device whose queue family writes no timestamps (`timestampValidBits` 0) | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2181` | `rare`: GPU times on a queue without timestamps | +| `GpuTimes` | A command buffer's GPU times (`GPUStartTime`, `GPUEndTime`) on a device whose queue family writes no timestamps (`timestampValidBits` 0) | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2186` | `rare`: GPU times on a queue without timestamps | | `CountingVisibility` | A `Counting` visibility result (`MTLVisibilityResultModeCounting`) on a device without `occlusionQueryPrecise` | devices without VkFeature::OcclusionQueryPrecise | 1: `crates/metal2vulkan-runtime/src/visibility.rs:452` | `rare`: counting occlusion queries on a device without precise queries | | `ViewFormatReinterpretation` | A texture view whose format has other components, or components of other widths, than its texture's (`RGBA8Unorm` as `R32Uint`), on a device whose... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/view_plan.rs:568` | `app`: a view of another component layout on a portability subset (MoltenVK) | | `SeparateMultisampledDepthStencil` | A render pass whose depth and stencil attachments are separate multisampled textures that it loads or may store, on a device without maintenance8,... | - | via a helper: 7: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:188`, `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:294` (+5) | `rare`: separate multisampled depth and stencil textures | @@ -162,9 +162,9 @@ Generated at `7c961244f`. | Variant | What it blocks | Where | Sites | Reach | |---|---|---|---|---| -| `Textures` | Textures and texture buffers | every device (runtime piece not built) | 9: `crates/metal2vulkan-runtime/src/blit_texture.rs:162`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:1550` (+7) | `rare`: texture forms the runtime has not built (texture buffers of some forms, X24Stencil8 views) | +| `Textures` | Textures and texture buffers | every device (runtime piece not built) | 9: `crates/metal2vulkan-runtime/src/blit_texture.rs:162`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:1554` (+7) | `rare`: texture forms the runtime has not built (texture buffers of some forms, X24Stencil8 views) | | `ResourceHeap` | The resource-ID heap, descriptor set 1 | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1780` | `rare`: the resource-ID heap's remaining forms | -| `SparseHeaps` | Sparse heaps and their textures | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:456`, `crates/metal2vulkan-runtime/src/texture.rs:1624` (+1) | `rare`: sparse heaps | +| `SparseHeaps` | Sparse heaps and their textures | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:456`, `crates/metal2vulkan-runtime/src/texture.rs:1625` (+1) | `rare`: sparse heaps | | `SparseTileMaps` | What the runtime's emulation of sparse textures does not build yet | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/binding.rs:501`, `crates/metal2vulkan-runtime/src/sparse/texture.rs:30` (+1) | `rare`: sparse texture emulation's unbuilt pieces | | `HeapPastMaxBufferSize` | A heap larger than the device's `maxBufferSize`, which the device can allocate | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/heap.rs:694` | `rare`: a heap past maxBufferSize | | `HeapTextureAlignment` | A heap texture whose image needs an alignment past the heap memory's base alignment (256 KiB) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture/heap.rs:980` | `rare`: a heap texture needing more than 256 KiB alignment | @@ -179,15 +179,15 @@ Generated at `7c961244f`. | `FeatureEnable` | A feature a created device would enable that the runtime's feature chain has no member for, or whose structure no enabled extension exposes | devices without the feature or extension it names | 1: `crates/metal2vulkan-runtime/src/enables.rs:1155` | `none`: device creation with a feature the runtime's chain lacks | | `ExtensionEnable` | An extension a created device would enable that the device lists under none of the names the runtime knows for it | devices without the feature or extension it names | 1: `crates/metal2vulkan-runtime/src/enables.rs:1146` | `none`: device creation with an extension under an unknown name | | `Render` | Render pipelines, passes and draws | every device (runtime piece not built) | 23: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404`, `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:460` (+21) | `system`: render pass, resolve and attachment forms not built (20 sites: see the appendix) | -| `TexelsPastBufferLength` | A 2D array over a buffer whose texels run past the buffer's length, which Metal makes over bytes its buffer's allocation has past the length | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/buffer_texture.rs:260`, `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105` | `rare`: a 2D array over a buffer past its length | -| `OverlappingSurfaceRows` | A texture of an IOSurface plane (`Buffer::new_texture_with_iosurface_plane`, the stand-in for `newTextureWithDescriptor:iosurface:plane:`) whose... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/buffer_texture.rs:262` | `rare`: an IOSurface plane whose rows overlap | +| `TexelsPastBufferLength` | A 2D array over a buffer whose texels run past the buffer's length, which Metal makes over bytes its buffer's allocation has past the length | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/buffer_texture.rs:261`, `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105` | `rare`: a 2D array over a buffer past its length | +| `OverlappingSurfaceRows` | A texture of an IOSurface plane (`Buffer::new_texture_with_iosurface_plane`, the stand-in for `newTextureWithDescriptor:iosurface:plane:`) whose... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/buffer_texture.rs:263` | `rare`: an IOSurface plane whose rows overlap | | `SamplePositionsAtBegin` | A render pass whose custom sample positions Vulkan takes only through what the runtime does not build | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:145`, `crates/metal2vulkan-runtime/src/render_pass.rs:1770` (+1) | `rare`: custom sample positions Vulkan takes only at begin | | `SharedEventAcrossDevices` | A shared event handle opened on a device other than its event's | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/event.rs:376` | `rare`: a shared event opened on another device | | `ViewportDepthRange` | A viewport depth range past `[0, 1]`, which Metal takes, on a device without the features to take it natively or by the vertex stage's... | every device (runtime piece not built) | 7: `crates/metal2vulkan-runtime/src/render.rs:9349`, `crates/metal2vulkan-runtime/src/render_state.rs:1010` (+5) | `rare`: viewport depth outside [0, 1] without the device features | | `NonFiniteDepthBias` | NaN or infinite depth bias factors whose effect differs between flat and sloped triangles, or a draw whose bias adds a clamp that moves a... | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/render_state.rs:1573`, `crates/metal2vulkan-runtime/src/render_state.rs:1576` (+3) | `rare`: NaN or infinite depth bias | | `DepthNeverWithoutAttachment` | A draw under a depth compare of `Never` in a pass without a depth attachment, which fails every fragment, whose fragment function writes color... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/depth_stencil.rs:147` | `rare`: depth compare Never with no depth attachment | | `HiddenDepthStencil` | A draw whose depth/stencil state uses depth or the stencil that the pass lacks, which plain Metal tests against a hidden `float` depth of 1.0 and... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563`, `crates/metal2vulkan-runtime/src/render.rs:6230` | `app`: a depth-stencil state using depth or stencil the pass lacks | -| `IndirectDrawArguments` | An indirect draw whose arguments the binding plan asks to read on the CPU (`DrawCommands::indirect_needs_arguments`) | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/index_bounds.rs:90`, `crates/metal2vulkan-runtime/src/render.rs:2905` (+3) | `rare`: indirect draws whose arguments the CPU must read | +| `IndirectDrawArguments` | An indirect draw whose arguments the binding plan asks to read on the CPU (`DrawCommands::indirect_needs_arguments`) | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/index_bounds.rs:91`, `crates/metal2vulkan-runtime/src/render.rs:2905` (+3) | `rare`: indirect draws whose arguments the CPU must read | | `DepthStencilResolve` | A depth/stencil resolve no Vulkan resolve mode of the device states | every device (runtime piece not built) | 7: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441`, `crates/metal2vulkan-runtime/src/resolve.rs:1247` (+5) | `rare`: depth/stencil resolve modes a device lacks | | `TileAtSampleCount` | The tile memory of a render pass of a sample count Apple's GPUs lack (theirs are 1, 2 and 4), which a Vulkan device may have | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:599`, `crates/metal2vulkan-runtime/src/render_pass.rs:1520` | `none`: tile memory at a sample count Apple's GPUs lack | | `ImageblockMasters` | A draw or tile dispatch whose imageblock is of another size than the pass's, or a draw whose fragment function's layouts are of another alignment... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:7412`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:967` | `rare`: imageblocks of mixed sizes in one pass | @@ -208,19 +208,19 @@ Generated at `7c961244f`. | `FunctionOptions` | A function descriptor's options beyond `CompileToBinary` and `StoreFunctionInMetalPipelinesScript` (`Library::new_function_with_descriptor`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/library.rs:215` | `rare`: function descriptor options beyond CompileToBinary | | `OverlappingTextureCopies` | A blit copy between overlapping regions of one texture's texels (`copyFromTexture:...` with the source's region meeting the destination's, through... (not scheduled) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/blit_texture.rs:1234` | `rare`: overlapping texture copies (Metal races) | | `RebindTextures` | `Buffer::rebind_bytes_no_copy` of a no-copy buffer with a live texture over its bytes, given memory at another offset in its page than the old | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:597`, `crates/metal2vulkan-runtime/src/texture/heap.rs:2431` (+3) | `none`: a runtime extension's rebind with a live texture | -| `PvrtcBlockOrder` | A PVRTC texture's blocks in a Metal block order the runtime does not lay out | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture.rs:5534` | `rare`: PVRTC regions off whole levels | -| `DecodedHeapTexture` | A heap's or a sparse heap's texture of an ASTC format on a device without that ASTC format (`astc.rs`), or a sparse heap's texture of an ETC2 or... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/texture.rs:1632`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1281` | `app`: an ASTC texture in a heap on a device without ASTC | +| `PvrtcBlockOrder` | A PVRTC texture's blocks in a Metal block order the runtime does not lay out | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture.rs:5556` | `rare`: PVRTC regions off whole levels | +| `DecodedHeapTexture` | A heap's or a sparse heap's texture of an ASTC format on a device without that ASTC format (`astc.rs`), or a sparse heap's texture of an ETC2 or... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/texture.rs:1633`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1281` | `app`: an ASTC texture in a heap on a device without ASTC | | `VertexFetchPast4GiB` | A draw (`drawPrimitives:` and its forms, or an indirect command buffer's command) that may read a vertex attribute the pipeline fetches in its... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/vertex_reach.rs:72` | `rare`: vertex fetch past 4 GiB of a bind offset | | `StageInFetchPast4GiB` | A dispatch (`dispatchThreads:threadsPerThreadgroup:` and its forms, or an indirect command buffer's command) whose kernel may read a... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/fetch_reach.rs:126` | `rare`: stage-in fetch past 4 GiB of a bind offset | | `MappedTextureSampling` | A command that would sample a texture of an address-mode map (`TextureDescriptor::address_mode_map`) where the runtime cannot map it at bind... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/address_map.rs:158` | `none`: a runtime extension's texture (address_mode_map) sampled where the runtime cannot map it; no Metal API path | | `LibrarySource` | A library compiled from Metal Shading Language source | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/library.rs:107` | `app`: a library compiled from Metal source (newLibraryWithSource:); the runtime takes metallibs and AIR | | `RestartedStrip` | An indexed strip after `set_primitive_restart_enabled` with an index Vulkan does not restart at, which the runtime draws as a list an index... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/index_rewrite.rs:110`, `crates/metal2vulkan-runtime/src/render.rs:7516` | `none`: a strip after the Apple-private setPrimitiveRestartEnabled:index: whose rewrite pass cannot run as Metal draws | | `PrimitiveIdIndices` | An indexed draw (`drawIndexedPrimitives:`) of a pipeline whose fragment function reads `[[primitive_id]]` on a device whose fragment stage cannot... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render.rs:7890` | `rare`: an indexed draw of a primitive_id pipeline, on a device without geometry or tessellation shaders, whose indices the encoder wrote since its last barrier | -| `RotatedTexture` | A rotated texture (`TextureDescriptor::rotation`) where the runtime does not build what Metal does | every device (runtime piece not built) | 9: `crates/metal2vulkan-runtime/src/blit_texture.rs:1555`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:714` (+7) | `rare`: a rotated drawable's views, blits with images over overlapping rows, rows past its buffer | -| `DetachTextures` | A texture over a no-copy buffer's or heap's bytes (a heap's texture, or a texture over the buffer or over one of the heap's buffers) that no... | every device (runtime piece not built) | 8: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:601`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:621` (+6) | `none`: a runtime extension's detach with a texture no stand-in presents exactly | +| `RotatedTexture` | A rotated texture (`TextureDescriptor::rotation`) where the runtime does not build what Metal does | every device (runtime piece not built) | 9: `crates/metal2vulkan-runtime/src/blit_texture.rs:1555`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:715` (+7) | `rare`: a rotated drawable's views, blits with images over overlapping rows, rows past its buffer | +| `DetachTextures` | A texture over a no-copy buffer's or heap's bytes (a heap's texture, or a texture over the buffer or over one of the heap's buffers) that no... | every device (runtime piece not built) | 8: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:601`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:622` (+6) | `none`: a runtime extension's detach with a texture no stand-in presents exactly | | `TextureBufferLevels` | A texture buffer of more than one level (`TextureDescriptor::mipmap_level_count`, up to its width's full chain) from the device's, a heap's or the... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:540` | `rare`: a texture buffer of more than one level (public, unusual) | | `WriteSwizzle` | A texture of `TextureDescriptor::write_swizzle_enabled` whose swizzle is not the default, with `ShaderWrite` or `RenderTarget` usage, from the... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:547` | `none`: Apple-private writeSwizzleEnabled with a swizzle that writes | -| `DetachedTexelAccess` | `Texture::replace_region` or `get_bytes` of a texture whose bytes (a no-copy buffer's or heap's) are detached (`detach_backing`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture.rs:4779` | `none`: CPU texel access while a runtime extension detached the bytes | +| `DetachedTexelAccess` | `Texture::replace_region` or `get_bytes` of a texture whose bytes (a no-copy buffer's or heap's) are detached (`detach_backing`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture.rs:4801` | `none`: CPU texel access while a runtime extension detached the bytes | | `SurfaceDepthStencil` | A use of a texture of a depth or stencil format (`Depth16Unorm`, `Depth32Float`, `Depth32Float_Stencil8`, `Stencil8`, `X32_Stencil8`) over a plane... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/blit_texture.rs:235`, `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:57` | `rare`: a blit of the stencil of a Depth32Float_Stencil8 texture over a plane of an IOSurface with planes, or a pass on an X32_Stencil8 one's view as Depth32Float_Stencil8 | | `HostHeapUncompressedMultisample` | A multisample texture in a heap over host pages (`Device::new_heap_with_bytes_no_copy`) that Metal keeps uncompressed | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture/heap.rs:1924` | `none`: a multisample texture Metal keeps uncompressed in a runtime extension's heap over host pages | | `PredicationUnbalanced` | An unbalanced command-predication record (`ComputeCommandEncoder::encode_end_if` and the other ends, or `encode_start_else`, with no block open;... | every device (runtime piece not built) | 4: `crates/metal2vulkan-runtime/src/predication.rs:354`, `crates/metal2vulkan-runtime/src/predication.rs:386` (+2) | `none`: an unbalanced Apple-private command-predication record, whose dropped work Metal decides by no rule measured | @@ -242,7 +242,7 @@ Generated at `7c961244f`. | `VertexAmplificationMode` | `setVertexAmplificationMode:value:` | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:209` | `none`: Apple-private (no public header) | | `DepthCleared` | `setDepthCleared` | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:211` | `none`: Apple-private (no public header) | | `StencilCleared` | `setStencilCleared` | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:212` | `none`: Apple-private (no public header) | -| `SurfaceClientDirection` | A texture over an IOSurface made with `kIOSurfaceClientDirection` (`newTextureWithDescriptor:iosurface:plane:` of such a surface) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/buffer_texture.rs:416` | `none`: an IOSurface key in no public header | +| `SurfaceClientDirection` | A texture over an IOSurface made with `kIOSurfaceClientDirection` (`newTextureWithDescriptor:iosurface:plane:` of such a surface) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/buffer_texture.rs:417` | `none`: an IOSurface key in no public header | | `FillUnmeasured` | A texture fill (`fillTexture:level:slice:region:bytes:length:` or a color form) whose answer on Apple's GPU is unmeasured | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/blit_fill.rs:149` | `system`: Apple-private texture fills, which macOS system software encodes | ## 4. Binder refusals at a device limit (`BindError`) @@ -330,11 +330,11 @@ Each refusal's sites, with the function that builds it. - `feature::CoherentMemory`: `crates/metal2vulkan/src/lower/sync/memory_model.rs:207 (check)` - `feature::Int64Atomics`: `crates/metal2vulkan/src/lower/access/atomic.rs:624 (select)`; `crates/metal2vulkan/src/lower/access/atomic.rs:633 (select)` - `feature::ImageAtomics`: `crates/metal2vulkan-runtime/src/families/formats.rs:464 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:468 (atomic_gap)`; `crates/metal2vulkan/src/lower/texture/slot.rs:900 (atomic_format)` -- `feature::DescriptorCount`: `crates/metal2vulkan/src/lower/access/mod.rs:1665 (accept_placement)`; `crates/metal2vulkan/src/lower/select.rs:1628 (finish)`; `crates/metal2vulkan/src/pipeline/link.rs:1061 (limit_error)` +- `feature::DescriptorCount`: `crates/metal2vulkan/src/lower/access/mod.rs:1665 (accept_placement)`; `crates/metal2vulkan/src/lower/select.rs:1629 (finish)`; `crates/metal2vulkan/src/pipeline/link.rs:1061 (limit_error)` - `feature::BufferRange`: `crates/metal2vulkan-runtime/src/function_table.rs:569 (past_storage_buffer_range)`; `crates/metal2vulkan/src/bind/graphics.rs:3530 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3574 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3612 (patch_binding)`; `crates/metal2vulkan/src/bind/instantiate.rs:632 (bind_buffers)`; `crates/metal2vulkan/src/lower/access/function_table.rs:226 (select)`; `crates/metal2vulkan/src/lower/access/mod.rs:1180 (place_slots)` - `feature::Int64Arithmetic`: `crates/metal2vulkan/src/lower/arith/legal.rs:582 (check_scalar)`; `crates/metal2vulkan/src/lower/select.rs:1121 (selector_form)` - `feature::Float64Arithmetic`: `crates/metal2vulkan/src/device/metal.rs:230 (unsupported_features)`; `crates/metal2vulkan/src/lower/arith/legal.rs:587 (check_scalar)` -- `feature::Format`: `crates/metal2vulkan-runtime/src/binding_view.rs:146 (binding_view)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:462 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:469 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:484 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:541 (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:633 (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:2071 (through_buffer)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:518 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:581 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:613 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:850 (texture_buffer_texel)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:269 (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:297 (copy_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:343 (copy_unit)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:346 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:526 (usable_twin)`; `crates/metal2vulkan-runtime/src/families/features.rs:1598 (read_write_tier)`; `crates/metal2vulkan-runtime/src/families/formats.rs:1628 (sparse_missing)`; `crates/metal2vulkan-runtime/src/families/formats.rs:227 (none)`; `crates/metal2vulkan-runtime/src/families/formats.rs:271 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:291 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:306 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:353 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:392 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:474 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:508 (lacking)`; `crates/metal2vulkan-runtime/src/families/formats.rs:522 (unsupported)`; `crates/metal2vulkan-runtime/src/image_plan.rs:539 (check_own_memory)`; `crates/metal2vulkan-runtime/src/image_plan.rs:665 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:782 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:902 (plan_held)`; `crates/metal2vulkan-runtime/src/render.rs:6795 (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1282 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1618 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1711 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:944 (check_target)`; `crates/metal2vulkan-runtime/src/resolve.rs:392 (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/resolve.rs:482 (color)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:177 (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:205 (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs:296 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:600 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:607 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:1995 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3505 (two_planes_refused)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:498 (astc_texels)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:534 (etc_texels)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1810 (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:80 (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:115 (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:278 (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:384 (new_render_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs:114 (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs:380 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:393 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:400 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:410 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:420 (check_format)`; `crates/metal2vulkan-runtime/src/ycbcr.rs:285 (refused)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:184 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1134 (plain_texture)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1814 (extended_sampler)`; `crates/metal2vulkan/src/bind/plan/resources.rs:193 (require_filter_features)`; `crates/metal2vulkan/src/bind/plan/resources.rs:959 (plain_texture)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:304 (finish)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:328 (interleave_split_module)`; `crates/metal2vulkan/src/bind/shadow_copy_in.rs:259 (shadow_copy_in_module)`; `crates/metal2vulkan/src/bind/unused_bits.rs:657 (unused_bits_module)`; `crates/metal2vulkan/src/lower/access/tile.rs:1029 (storage_format)`; `crates/metal2vulkan/src/lower/fragment/color.rs:160 (select_param)`; `crates/metal2vulkan/src/lower/fragment/color.rs:166 (select_param)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1138 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1159 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1165 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1171 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1196 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1371 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1762 (select_read)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1870 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1897 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1916 (select_output)`; `crates/metal2vulkan/src/lower/sampler/select.rs:1093 (select_extended)`; `crates/metal2vulkan/src/lower/sampler/select.rs:691 (texel_in)`; `crates/metal2vulkan/src/lower/stage_io/extended_color.rs:77 (plan)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2262 (entry)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:842 (zeroed_output)`; `crates/metal2vulkan/src/lower/stage_io/word_color.rs:83 (plan)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2342 (select)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2984 (cross_class)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3156 (select_image)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3326 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3363 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3696 (select_write)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1035 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1048 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1054 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:739 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:742 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:753 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:771 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:791 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:815 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:826 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:873 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:908 (atomic_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:917 (atomic_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1657 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1659 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1789 (candidates)`; `crates/metal2vulkan/src/metal/format/mod.rs:2745 (storage_choice_viewed)`; `crates/metal2vulkan/src/metal/format/mod.rs:2763 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2771 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2868 (held_storage_choice)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1087 (extended_write_mask)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:428 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:474 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:546 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:957 (reads_alpha_to_coverage)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:978 (reads_alpha_to_coverage)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:449 (rotated_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:593 (alpha_in_red_blend)` +- `feature::Format`: `crates/metal2vulkan-runtime/src/binding_view.rs:146 (binding_view)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:462 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:469 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:484 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:541 (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:633 (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:2071 (through_buffer)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:519 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:582 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:614 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:851 (texture_buffer_texel)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:269 (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:297 (copy_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:343 (copy_unit)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:346 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:526 (usable_twin)`; `crates/metal2vulkan-runtime/src/families/features.rs:1598 (read_write_tier)`; `crates/metal2vulkan-runtime/src/families/formats.rs:1628 (sparse_missing)`; `crates/metal2vulkan-runtime/src/families/formats.rs:227 (none)`; `crates/metal2vulkan-runtime/src/families/formats.rs:271 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:291 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:306 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:353 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:392 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:474 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:508 (lacking)`; `crates/metal2vulkan-runtime/src/families/formats.rs:522 (unsupported)`; `crates/metal2vulkan-runtime/src/image_plan.rs:539 (check_own_memory)`; `crates/metal2vulkan-runtime/src/image_plan.rs:665 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:782 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:902 (plan_held)`; `crates/metal2vulkan-runtime/src/render.rs:6795 (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1282 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1618 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1711 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:944 (check_target)`; `crates/metal2vulkan-runtime/src/resolve.rs:392 (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/resolve.rs:482 (color)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:177 (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:205 (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs:296 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:604 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:611 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:1996 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3527 (two_planes_refused)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:498 (astc_texels)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:534 (etc_texels)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1810 (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:80 (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:115 (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:278 (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:384 (new_render_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs:114 (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs:380 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:393 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:400 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:410 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:420 (check_format)`; `crates/metal2vulkan-runtime/src/ycbcr.rs:285 (refused)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:184 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1134 (plain_texture)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1814 (extended_sampler)`; `crates/metal2vulkan/src/bind/plan/resources.rs:193 (require_filter_features)`; `crates/metal2vulkan/src/bind/plan/resources.rs:959 (plain_texture)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:304 (finish)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:328 (interleave_split_module)`; `crates/metal2vulkan/src/bind/shadow_copy_in.rs:259 (shadow_copy_in_module)`; `crates/metal2vulkan/src/bind/unused_bits.rs:657 (unused_bits_module)`; `crates/metal2vulkan/src/lower/access/tile.rs:1029 (storage_format)`; `crates/metal2vulkan/src/lower/fragment/color.rs:160 (select_param)`; `crates/metal2vulkan/src/lower/fragment/color.rs:166 (select_param)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1138 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1159 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1165 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1171 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1196 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1371 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1762 (select_read)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1870 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1897 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1916 (select_output)`; `crates/metal2vulkan/src/lower/sampler/select.rs:1093 (select_extended)`; `crates/metal2vulkan/src/lower/sampler/select.rs:691 (texel_in)`; `crates/metal2vulkan/src/lower/stage_io/extended_color.rs:77 (plan)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2262 (entry)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:842 (zeroed_output)`; `crates/metal2vulkan/src/lower/stage_io/word_color.rs:83 (plan)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2342 (select)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2984 (cross_class)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3156 (select_image)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3326 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3363 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3696 (select_write)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1035 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1048 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1054 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:739 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:742 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:753 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:771 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:791 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:815 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:826 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:873 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:908 (atomic_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:917 (atomic_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1657 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1659 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1789 (candidates)`; `crates/metal2vulkan/src/metal/format/mod.rs:2745 (storage_choice_viewed)`; `crates/metal2vulkan/src/metal/format/mod.rs:2763 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2771 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2868 (held_storage_choice)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1087 (extended_write_mask)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:428 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:474 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:546 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:957 (reads_alpha_to_coverage)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:978 (reads_alpha_to_coverage)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:449 (rotated_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:593 (alpha_in_red_blend)` - `feature::DivergentImplicitLod`: `crates/metal2vulkan/src/lower/sampler/select.rs:352 (select_sampling)` - `feature::ImplicitLodOutsideFragment`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:136 (query_min_level)`; `crates/metal2vulkan/src/lower/sampler/select.rs:229 (query_level_measured)`; `crates/metal2vulkan/src/lower/sampler/select.rs:255 (query_min_level)` - `feature::MinLodClamp`: `crates/metal2vulkan/src/lower/sampler/select.rs:1572 (select_one)`; `crates/metal2vulkan/src/lower/sampler/select.rs:973 (min_lod)` @@ -396,11 +396,11 @@ Each refusal's sites, with the function that builds it. - `feature::SparseTexture`: `crates/metal2vulkan/src/bind/plan/slots.rs:583 (check_sparse_textures)`; `crates/metal2vulkan/src/bind/plan/slots.rs:607 (check_sparse_textures)` - `feature::TextureSize`: `crates/metal2vulkan-runtime/src/image_plan.rs:1191 (check_image_limits)` - `feature::TextureSampleCount`: `crates/metal2vulkan-runtime/src/image_plan.rs:1239 (check_image_limits)`; `crates/metal2vulkan-runtime/src/image_plan.rs:593 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:603 (plan_held)` -- `feature::TextureView`: `crates/metal2vulkan-runtime/src/binding_view.rs:156 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:4991 (view)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:1420 (make_second_twin)`; `crates/metal2vulkan-runtime/src/texture/view_shadow.rs:298 (apart_refusal)`; `crates/metal2vulkan-runtime/src/view_plan.rs:431 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:481 (check_view)`; `crates/metal2vulkan-runtime/src/view_plan.rs:503 (check_view)` -- `feature::TextureSwizzle`: `crates/metal2vulkan-runtime/src/binding_view.rs:167 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:975 (may_view)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1102 (plain_texture)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2587 (select_one)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3391 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3738 (select_write)`; `crates/metal2vulkan/src/lower/texture/slice.rs:307 (select)` +- `feature::TextureView`: `crates/metal2vulkan-runtime/src/binding_view.rs:156 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:5013 (view)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:1420 (make_second_twin)`; `crates/metal2vulkan-runtime/src/texture/view_shadow.rs:298 (apart_refusal)`; `crates/metal2vulkan-runtime/src/view_plan.rs:431 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:481 (check_view)`; `crates/metal2vulkan-runtime/src/view_plan.rs:503 (check_view)` +- `feature::TextureSwizzle`: `crates/metal2vulkan-runtime/src/binding_view.rs:167 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:976 (may_view)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1102 (plain_texture)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2587 (select_one)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3391 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3738 (select_write)`; `crates/metal2vulkan/src/lower/texture/slice.rs:307 (select)` - `feature::MipmapGeneration`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1771 (mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_pick.rs:37 (pick_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:262 (plan_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:270 (plan_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:275 (plan_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:304 (plan_mipmaps)`; `crates/metal2vulkan/src/bind/mipmap_filter.rs:973 (mipmap_filter_module)` - `feature::HostMemory`: `crates/metal2vulkan-runtime/src/host_memory.rs:393 (not_importable)`; `crates/metal2vulkan-runtime/src/host_memory.rs:433 (refuse_unwritable)`; `crates/metal2vulkan-runtime/src/host_memory.rs:652 (new)`; `crates/metal2vulkan-runtime/src/host_memory.rs:657 (new)`; `crates/metal2vulkan-runtime/src/host_memory.rs:675 (new)` -- `feature::GpuTimes`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2181 (gpu_times)` +- `feature::GpuTimes`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2186 (gpu_times)` - `feature::CountingVisibility`: `crates/metal2vulkan-runtime/src/visibility.rs:452 (check_mode)` - `feature::ViewFormatReinterpretation`: `crates/metal2vulkan-runtime/src/view_plan.rs:568 (reinterpretation_refused)` - `feature::SeparateMultisampledDepthStencil`: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:188 (sampled_candidate)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:294 (by_draws)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:336 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:376 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:777 (plan)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:651 (nan_write)`; `crates/metal2vulkan-runtime/src/texture/signed_depth.rs:191 (sample_strip)` @@ -423,10 +423,10 @@ Each refusal's sites, with the function that builds it. - `feature::CommandPredication`: `crates/metal2vulkan/src/bind/replay/predication.rs:414 (predication_step_module)` - `feature::ProgramScopeBinding`: `crates/metal2vulkan-air/src/abi/module.rs:77 (decode)`; `crates/metal2vulkan/src/error/mod.rs:267 (from)` - `feature::SeqCstFence`: `crates/metal2vulkan/src/lower/sync/barrier.rs:443 (require_seq_cst)` -- `gap::Textures`: `crates/metal2vulkan-runtime/src/blit_texture.rs:162 (check_depth_view)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:1550 (view_usage)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1473 (compile_error)`; `crates/metal2vulkan-runtime/src/texture.rs:1440 (image_error)`; `crates/metal2vulkan-runtime/src/texture.rs:2160 (storage_over_buffer)`; `crates/metal2vulkan-runtime/src/texture.rs:2951 (new_image_starting)`; `crates/metal2vulkan-runtime/src/texture.rs:3994 (image)`; `crates/metal2vulkan-runtime/src/texture.rs:5462 (host_copy)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:207 (new_surface_planes_texture)` +- `gap::Textures`: `crates/metal2vulkan-runtime/src/blit_texture.rs:162 (check_depth_view)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:1554 (view_usage)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1473 (compile_error)`; `crates/metal2vulkan-runtime/src/texture.rs:1441 (image_error)`; `crates/metal2vulkan-runtime/src/texture.rs:2161 (storage_over_buffer)`; `crates/metal2vulkan-runtime/src/texture.rs:2973 (new_image_starting)`; `crates/metal2vulkan-runtime/src/texture.rs:4016 (image)`; `crates/metal2vulkan-runtime/src/texture.rs:5484 (host_copy)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:207 (new_surface_planes_texture)` - `gap::ResourceHeap`: `crates/metal2vulkan-runtime/src/binding.rs:1780 (descriptor)` -- `gap::SparseHeaps`: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:456 (first_slice)`; `crates/metal2vulkan-runtime/src/texture.rs:1624 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture.rs:4686 (make_aliasable)` -- `gap::SparseTileMaps`: `crates/metal2vulkan-runtime/src/binding.rs:501 (slot_tile_map)`; `crates/metal2vulkan-runtime/src/sparse/texture.rs:30 (sparse_refusal)`; `crates/metal2vulkan-runtime/src/texture.rs:1657 (plan_sparse_texture)` +- `gap::SparseHeaps`: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:456 (first_slice)`; `crates/metal2vulkan-runtime/src/texture.rs:1625 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture.rs:4708 (make_aliasable)` +- `gap::SparseTileMaps`: `crates/metal2vulkan-runtime/src/binding.rs:501 (slot_tile_map)`; `crates/metal2vulkan-runtime/src/sparse/texture.rs:30 (sparse_refusal)`; `crates/metal2vulkan-runtime/src/texture.rs:1658 (plan_sparse_texture)` - `gap::HeapPastMaxBufferSize`: `crates/metal2vulkan-runtime/src/heap.rs:694 (heap_size)` - `gap::HeapTextureAlignment`: `crates/metal2vulkan-runtime/src/texture/heap.rs:980 (check_heap_base)` - `gap::HeapTextureMemory`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1418 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1425 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1919 (host_heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2132 (memory_shadow)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:489 (memory_refusal)` @@ -439,16 +439,16 @@ Each refusal's sites, with the function that builds it. - `gap::AccelerationStructures`: `crates/metal2vulkan-runtime/src/binding.rs:1606 (unexpected)` - `gap::FeatureEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1155 (of)` - `gap::ExtensionEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1146 (of)` -- `gap::Render`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:460 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:684 (check_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:795 (attachment_twin)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:283 (check_sizes)`; `crates/metal2vulkan-runtime/src/kept_bytes.rs:138 (settle)`; `crates/metal2vulkan-runtime/src/linear_attachment.rs:293 (settle)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:197 (plan)`; `crates/metal2vulkan-runtime/src/pipeline/render.rs:1116 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:5542 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:6726 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:7733 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:514 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1226 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1585 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1639 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1700 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1933 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:1010 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1027 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1091 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:901 (attach)`; `crates/metal2vulkan-runtime/src/resolve.rs:969 (color_copy)` -- `gap::TexelsPastBufferLength`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:260 (refusal_error)`; `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105 (surface_depth_twin)` -- `gap::OverlappingSurfaceRows`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:262 (refusal_error)` +- `gap::Render`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:460 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:684 (check_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:796 (attachment_twin)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:283 (check_sizes)`; `crates/metal2vulkan-runtime/src/kept_bytes.rs:138 (settle)`; `crates/metal2vulkan-runtime/src/linear_attachment.rs:293 (settle)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:197 (plan)`; `crates/metal2vulkan-runtime/src/pipeline/render.rs:1116 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:5542 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:6726 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:7733 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:514 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1226 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1585 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1639 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1700 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1933 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:1010 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1027 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1091 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:901 (attach)`; `crates/metal2vulkan-runtime/src/resolve.rs:969 (color_copy)` +- `gap::TexelsPastBufferLength`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:261 (refusal_error)`; `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105 (surface_depth_twin)` +- `gap::OverlappingSurfaceRows`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:263 (refusal_error)` - `gap::SamplePositionsAtBegin`: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:145 (stencil_scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1770 (positioned_stand_in)`; `crates/metal2vulkan-runtime/src/sample_positions.rs:185 (grid)` - `gap::SharedEventAcrossDevices`: `crates/metal2vulkan-runtime/src/event.rs:376 (new_shared_event_with_handle)` - `gap::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render.rs:9349 (draw_settings)`; `crates/metal2vulkan-runtime/src/render_state.rs:1010`; `crates/metal2vulkan-runtime/src/render_state.rs:1178 (depth_ranges_refused)`; `crates/metal2vulkan-runtime/src/render_state.rs:1545 (bias_holds)`; `crates/metal2vulkan-runtime/src/render_state.rs:1564 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:503 (depth_range)`; `crates/metal2vulkan-runtime/src/render_state.rs:731 (compensation)` - `gap::NonFiniteDepthBias`: `crates/metal2vulkan-runtime/src/render_state.rs:1573 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:1576 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:347 (set_depth_bias)`; `crates/metal2vulkan-runtime/src/render_state.rs:439 (draw_viewports)`; `crates/metal2vulkan-runtime/src/render_state.rs:581 (compensation)` - `gap::DepthNeverWithoutAttachment`: `crates/metal2vulkan-runtime/src/depth_stencil.rs:147 (failing_draw)` - `gap::HiddenDepthStencil`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563 (hidden)`; `crates/metal2vulkan-runtime/src/render.rs:6230 (hidden_depth_stencil)` -- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:90 (new)`; `crates/metal2vulkan-runtime/src/render.rs:2905 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7489 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7543 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7574 (draw_resident)` +- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:91 (new)`; `crates/metal2vulkan-runtime/src/render.rs:2905 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7489 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7543 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7574 (draw_resident)` - `gap::DepthStencilResolve`: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441 (draws_run)`; `crates/metal2vulkan-runtime/src/resolve.rs:1247 (plan)`; `crates/metal2vulkan-runtime/src/resolve.rs:653 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:751 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:771 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:812 (split_steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:824 (split_steps)` - `gap::TileAtSampleCount`: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:599`; `crates/metal2vulkan-runtime/src/render_pass.rs:1520 (layout)` - `gap::ImageblockMasters`: `crates/metal2vulkan-runtime/src/render.rs:7412 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:967 (dispatch_tiles_resident)` @@ -469,19 +469,19 @@ Each refusal's sites, with the function that builds it. - `gap::FunctionOptions`: `crates/metal2vulkan-runtime/src/library.rs:215 (new_function_with_descriptor)` - `gap::OverlappingTextureCopies`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1234 (texture_copies_of_bytes)` - `gap::RebindTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:597 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2431 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2446 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2457 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2500 (dma_buf_heap_images_again)` -- `gap::PvrtcBlockOrder`: `crates/metal2vulkan-runtime/src/texture.rs:5534 (host_copy)` -- `gap::DecodedHeapTexture`: `crates/metal2vulkan-runtime/src/texture.rs:1632 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1281 (heap_plan)` +- `gap::PvrtcBlockOrder`: `crates/metal2vulkan-runtime/src/texture.rs:5556 (host_copy)` +- `gap::DecodedHeapTexture`: `crates/metal2vulkan-runtime/src/texture.rs:1633 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1281 (heap_plan)` - `gap::VertexFetchPast4GiB`: `crates/metal2vulkan-runtime/src/render/vertex_reach.rs:72 (check_vertex_reach)` - `gap::StageInFetchPast4GiB`: `crates/metal2vulkan-runtime/src/fetch_reach.rs:126 (check_stage_in_reach)` - `gap::MappedTextureSampling`: `crates/metal2vulkan-runtime/src/address_map.rs:158 (resolve)` - `gap::LibrarySource`: `crates/metal2vulkan-runtime/src/library.rs:107 (new_library_with_source)` - `gap::RestartedStrip`: `crates/metal2vulkan-runtime/src/index_rewrite.rs:110 (new)`; `crates/metal2vulkan-runtime/src/render.rs:7516 (draw_resident)` - `gap::PrimitiveIdIndices`: `crates/metal2vulkan-runtime/src/render.rs:7890 (draw_resident)` -- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1555 (texel_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:714 (turned_plane)`; `crates/metal2vulkan-runtime/src/rotated.rs:185 (new)`; `crates/metal2vulkan-runtime/src/rotated.rs:201 (new)`; `crates/metal2vulkan-runtime/src/shadow.rs:594 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:4949 (view)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:100 (check_rotated_reach)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:322 (copied_image)`; `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:238 (new_usage_shadow)` -- `gap::DetachTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:601 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:621 (make_texture_over)`; `crates/metal2vulkan-runtime/src/detach.rs:149 (detach_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2639 (heap_texture_at)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:143 (new_stand_in)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:248 (stand_in_while_detached)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:298 (stand_ins)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:304 (stand_ins)` +- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1555 (texel_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:715 (turned_plane)`; `crates/metal2vulkan-runtime/src/rotated.rs:185 (new)`; `crates/metal2vulkan-runtime/src/rotated.rs:201 (new)`; `crates/metal2vulkan-runtime/src/shadow.rs:598 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:4971 (view)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:100 (check_rotated_reach)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:322 (copied_image)`; `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:238 (new_usage_shadow)` +- `gap::DetachTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:601 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:622 (make_texture_over)`; `crates/metal2vulkan-runtime/src/detach.rs:149 (detach_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2639 (heap_texture_at)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:143 (new_stand_in)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:248 (stand_in_while_detached)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:298 (stand_ins)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:304 (stand_ins)` - `gap::TextureBufferLevels`: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:540 (check_made)` - `gap::WriteSwizzle`: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:547 (check_made)` -- `gap::DetachedTexelAccess`: `crates/metal2vulkan-runtime/src/texture.rs:4779 (refuse_detached_texels)` +- `gap::DetachedTexelAccess`: `crates/metal2vulkan-runtime/src/texture.rs:4801 (refuse_detached_texels)` - `gap::SurfaceDepthStencil`: `crates/metal2vulkan-runtime/src/blit_texture.rs:235 (unit)`; `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:57 (surface_depth_twin)` - `gap::HostHeapUncompressedMultisample`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1924 (host_heap_plan)` - `gap::PredicationUnbalanced`: `crates/metal2vulkan-runtime/src/predication.rs:354 (nil)`; `crates/metal2vulkan-runtime/src/predication.rs:386 (start_else)`; `crates/metal2vulkan-runtime/src/predication.rs:438 (end_if)`; `crates/metal2vulkan-runtime/src/predication.rs:558 (end_loop)` @@ -498,7 +498,7 @@ Each refusal's sites, with the function that builds it. - `apple::VertexAmplificationMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:209 (check)` - `apple::DepthCleared`: `crates/metal2vulkan-runtime/src/apple_only.rs:211 (check)` - `apple::StencilCleared`: `crates/metal2vulkan-runtime/src/apple_only.rs:212 (check)` -- `apple::SurfaceClientDirection`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:416 (new_texture_with_iosurface_plane)` +- `apple::SurfaceClientDirection`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:417 (new_texture_with_iosurface_plane)` - `apple::FillUnmeasured`: `crates/metal2vulkan-runtime/src/blit_fill.rs:149 (unmeasured)` - `bind::DescriptorRangeExceeded`: `crates/metal2vulkan/src/bind/instantiate.rs:626 (bind_buffers)` - `bind::TexelBufferTooLarge`: `crates/metal2vulkan/src/bind/instantiate.rs:865 (texel_ranges)`