diff --git a/crates/metal2vulkan-runtime/src/command_buffer/mod.rs b/crates/metal2vulkan-runtime/src/command_buffer/mod.rs index cf682e879..2ef53a1d3 100644 --- a/crates/metal2vulkan-runtime/src/command_buffer/mod.rs +++ b/crates/metal2vulkan-runtime/src/command_buffer/mod.rs @@ -4023,6 +4023,12 @@ impl CommandBufferShared { CommandBufferError::PREDICATION_OPEN_AT_UNIT_END_DESCRIPTION.to_owned(), ); } + // An indirect mesh draw's object grid lay past the device's task limits + // (`render/mesh_arguments.rs`): the command buffer failed. + if report.mesh_grid_past_limits && state.error.is_none() { + state.status = CommandBufferStatus::Error; + state.error = Some(CommandBufferError::MeshGridPastLimits); + } // A predicated loop would have run past its copies (`predication.rs`): the // command buffer failed. if state.predication.halted() && state.error.is_none() { diff --git a/crates/metal2vulkan-runtime/src/error.rs b/crates/metal2vulkan-runtime/src/error.rs index 46dd9197d..a86720ef3 100644 --- a/crates/metal2vulkan-runtime/src/error.rs +++ b/crates/metal2vulkan-runtime/src/error.rs @@ -1639,6 +1639,13 @@ pub enum CommandBufferError { /// the device's budget, so nothing is drawn short silently. The first records fault of the /// command buffer, where it is a tessellation draw's, as its scan saw it. TessellationRecordsOverflow(TessellationRecordsOverflow), + /// An indirect mesh draw's object grid, as the GPU wrote it, lay past the device's task + /// stage limits (`maxTaskWorkGroupCount`, `maxTaskWorkGroupTotalCount`): such draws drew + /// nothing. Metal draws every object grid measured (16,777,216 threadgroups along `x` on an M3 + /// Max), and Vulkan cannot launch one past the limits, so nothing is drawn short silently. A + /// direct draw of such a grid is refused as it is encoded (`Unsupported{MeshShading}` naming + /// the limit). + MeshGridPastLimits, /// A host step refused a command it recorded from an indirect command buffer's records /// (`Degradation::HostReplayedIndirectCommands`): what `commit` refuses where the CPU wrote /// the records, such as a command's pipeline state of other color formats than the pass's. @@ -1988,7 +1995,8 @@ impl CommandBufferError { /// revoked queue's, `PageFault` (3), and /// `Internal` (1), also for the runtime's refusals (a cubic argument sampler's reach among /// them, a sampler state left out of an argument-sampler listing, a host step's object nothing - /// made, a named use rebound before the submission, and a predicated loop past its copies); a + /// made, a named use rebound before the submission, a predicated loop past its copies, and a + /// mesh grid past the device's limits); a /// command buffer committed as failed, the code the program chose; a pipeline's failed making, /// its cause's; a failure the driver relayed, Metal's. /// @@ -2005,6 +2013,7 @@ impl CommandBufferError { | CommandBufferError::TessellationRecordsOverflow(_) | CommandBufferError::DetachedBacking => 8, CommandBufferError::Internal(_) + | CommandBufferError::MeshGridPastLimits | CommandBufferError::SparseHeapSplit | CommandBufferError::SparseMappingArguments(_) | CommandBufferError::SparseMappingSplit @@ -2062,6 +2071,7 @@ impl CommandBufferError { | CommandBufferError::CubicArgumentSampler | CommandBufferError::MeshRecordsOverflow(_) | CommandBufferError::TessellationRecordsOverflow(_) + | CommandBufferError::MeshGridPastLimits | CommandBufferError::Refused | CommandBufferError::PipelineCreation(_) | CommandBufferError::EncodedUseRebound diff --git a/crates/metal2vulkan-runtime/src/families/features.rs b/crates/metal2vulkan-runtime/src/families/features.rs index 19c9778e3..089ecd061 100644 --- a/crates/metal2vulkan-runtime/src/families/features.rs +++ b/crates/metal2vulkan-runtime/src/families/features.rs @@ -1379,11 +1379,10 @@ impl FeatureRow { } // Mesh pipelines (`new_mesh_render_pipeline_state`, the encoder's mesh draws): // `meshShader` and `taskShader`, then what the binder does not implement yet: a - // `drawMeshThreads` that leaves a partial object threadgroup, and an object - // function's threadgroup memory arguments. Indirect mesh draws wait for a GPU pass that bounds - // their counts by the device's limits; an indirect command buffer's mesh draws are - // render commands first. - F::MeshShading => first([ + // `drawMeshThreads` that leaves a partial object threadgroup. Indirect mesh draws + // read the counts an arguments pass writes (`render/mesh_arguments.rs`); an indirect + // command buffer's mesh draws are render commands first. + F::MeshShading | F::IndirectMeshDrawArguments => first([ needs_features( f, Feature::MeshShading, @@ -1391,15 +1390,6 @@ impl FeatureRow { ), not_implemented(Feature::MeshShading), ]), - F::IndirectMeshDrawArguments => first([ - needs_features( - f, - Feature::MeshShading, - &[VkFeature::MeshShader, VkFeature::TaskShader], - ), - gap(G::IndirectDrawArguments), - not_implemented(Feature::MeshShading), - ]), F::IcbMeshDraws => first([ needs_features( f, diff --git a/crates/metal2vulkan-runtime/src/families/limits.rs b/crates/metal2vulkan-runtime/src/families/limits.rs index b66e78c73..8cf06a35a 100644 --- a/crates/metal2vulkan-runtime/src/families/limits.rs +++ b/crates/metal2vulkan-runtime/src/families/limits.rs @@ -931,27 +931,31 @@ impl LimitRow { }, ]), // Mesh grids: `meshShader`, then the device's group counts, along each axis (a grid - // may lie along one) and in all. Object grids: `taskShader` too, then the device's - // task group counts likewise. Payloads: `taskShader`, then `maxTaskPayloadSize`. + // may lie along one, up to the 65,535 threadgroups an axis past which Metal draws + // nothing: `bind::METAL_MESH_GRID_AXIS`, measured on the M3 Max) and in all. Object + // grids: `taskShader` too, then the device's task group counts likewise. Payloads: + // `taskShader`, then `maxTaskPayloadSize`. L::MeshThreadgroupsPerGrid => { let counts = l.mesh.max_mesh_work_group_count; + let axis = match need { + Need::AtLeast(n) => { + Need::AtLeast(n.min(u64::from(metal2vulkan::bind::METAL_MESH_GRID_AXIS))) + } + other => other, + }; + let along = |i: u8| { + self::at_least( + axis, + Feature::MeshShading, + VkLimit::MaxMeshWorkGroupCount(i), + u64::from(counts[usize::from(i)]), + ) + }; first([ needs_features(f, Feature::MeshShading, &[VkFeature::MeshShader]), - at_least( - Feature::MeshShading, - VkLimit::MaxMeshWorkGroupCount(0), - counts[0], - ), - at_least( - Feature::MeshShading, - VkLimit::MaxMeshWorkGroupCount(1), - counts[1], - ), - at_least( - Feature::MeshShading, - VkLimit::MaxMeshWorkGroupCount(2), - counts[2], - ), + along(0), + along(1), + along(2), at_least( Feature::MeshShading, VkLimit::MaxMeshWorkGroupTotalCount, diff --git a/crates/metal2vulkan-runtime/src/owned_kernel.rs b/crates/metal2vulkan-runtime/src/owned_kernel.rs index 03c859473..ce6dafb92 100644 --- a/crates/metal2vulkan-runtime/src/owned_kernel.rs +++ b/crates/metal2vulkan-runtime/src/owned_kernel.rs @@ -108,6 +108,9 @@ pub(super) enum OwnedModule { /// `bind::mesh_scan_module`: a scanned emulated mesh draw's mesh threadgroups, records and /// draw (`render/mesh.rs`). MeshScan, + /// `bind::mesh_arguments_module` of one form: an indirect mesh draw's group counts, as Metal + /// draws them within the device's limits (`render/mesh_arguments.rs`). + MeshArguments(metal2vulkan::bind::MeshArgumentsForm), /// `bind::plane_words_module`: a blit's color words of a two-plane extended-range texture /// moved between its texels and a buffer (`two_planes.rs`). PlaneWords, @@ -337,6 +340,13 @@ impl OwnedModule { .map_err(Error::Compile)?; Ok((module.spirv.to_vec(), 3, 0)) } + OwnedModule::MeshArguments(form) => { + let module = + metal2vulkan::bind::mesh_arguments_module(device.compile_device(), form) + .map_err(Error::Compile)?; + let push_bytes = metal2vulkan::bind::MeshArgumentsModule::PUSH_BYTES; + Ok((module.spirv.to_vec(), 3, push_bytes)) + } OwnedModule::PlaneWords => { let module = metal2vulkan::bind::plane_words_module(device.compile_device()) .map_err(Error::Compile)?; @@ -502,6 +512,8 @@ pub(super) struct OwnedKernels { shadow_copy_ins: HashMap, mipmap_filters: HashMap, mesh_scan: Option, + mesh_arguments_mesh: Option, + mesh_arguments_object: Option, plane_words: Option, plane_copy: Option, index_rewrites: HashMap<(RewriteProgram, RewritePhase), OwnedKernel>, @@ -541,6 +553,8 @@ impl OwnedKernels { self.shadow_merge, self.depth_magnitude, self.mesh_scan, + self.mesh_arguments_mesh, + self.mesh_arguments_object, self.plane_words, self.plane_copy, self.rotate_texels, @@ -681,6 +695,12 @@ impl OwnedKernels { | OwnedModule::TwinDecode(_) | OwnedModule::TessellationScan(_) => return None, OwnedModule::MeshScan => &mut self.mesh_scan, + OwnedModule::MeshArguments(metal2vulkan::bind::MeshArgumentsForm::Mesh) => { + &mut self.mesh_arguments_mesh + } + OwnedModule::MeshArguments(metal2vulkan::bind::MeshArgumentsForm::Object) => { + &mut self.mesh_arguments_object + } OwnedModule::PlaneWords => &mut self.plane_words, OwnedModule::PlaneCopy => &mut self.plane_copy, OwnedModule::RotateTexels => &mut self.rotate_texels, diff --git a/crates/metal2vulkan-runtime/src/render.rs b/crates/metal2vulkan-runtime/src/render.rs index b915edb31..666c963ab 100644 --- a/crates/metal2vulkan-runtime/src/render.rs +++ b/crates/metal2vulkan-runtime/src/render.rs @@ -395,6 +395,7 @@ mod inline_splits; mod late_resolve; mod lowering_worker; mod mesh; +mod mesh_arguments; mod pass_start_reads; mod pass_steps; mod pending; @@ -1138,6 +1139,8 @@ enum Before { Bounds(BoundsSteps), /// An emulated mesh draw's dispatch (`render/mesh.rs`). Mesh(mesh::MeshSteps), + /// An indirect mesh draw's arguments pass (`render/mesh_arguments.rs`). + MeshArguments(mesh_arguments::ArgumentsSteps), /// An emulated tessellation draw's scan (`render/tessellation_scan.rs`). Tessellation(tessellation_scan::TessellationSteps), /// An index rewrite pass (`index_rewrite.rs`). @@ -1151,6 +1154,7 @@ impl Before { Before::Copy(copy) => copy.uses(), Before::Bounds(pass) => pass.uses(), Before::Mesh(steps) => steps.uses(), + Before::MeshArguments(steps) => steps.uses(), Before::Tessellation(steps) => steps.uses(), Before::Rewrite(pass) => pass.uses(), } @@ -1170,6 +1174,7 @@ impl Before { Before::Copy(copy) => copy.record_in(raw, command_buffer), Before::Bounds(pass) => pass.record_in(raw, command_buffer), Before::Mesh(steps) => steps.record_in(raw, command_buffer), + Before::MeshArguments(steps) => steps.record_in(raw, command_buffer), Before::Tessellation(steps) => steps.record_in(raw, command_buffer), Before::Rewrite(pass) => pass.record_in(raw, command_buffer), } @@ -8436,6 +8441,19 @@ impl RenderLowering { (self.core.set_zero(&objects, (&mut writes, offsets))?, &[]) } }; + // An indirect mesh draw's arguments pass, whose scratch its draw reads + // (`render/mesh_arguments.rs`). + let arguments = match (commands.mesh_arguments, indirect, empty || culled) { + (Some(form), Some(source), false) => Some(mesh_arguments::ArgumentsPass::new( + &mut self.core, + source, + form, + )?), + (Some(_), None, false) => { + return Err(internal("a mesh arguments pass without its arguments")) + } + _ => None, + }; // The Vulkan draws: the binder's, the index bounds pass's two, or the index rewrite // pass's one. let sized = device.shared().sized_index_bind; @@ -8456,6 +8474,30 @@ impl RenderLowering { } (Some(pass), ..) => one(pass.draw(sized)), (_, Some(pass), Some(source), _, _) => (pass.draws(source, commands.draw, sized)?, 2), + // An indirect mesh draw's counts are its arguments pass's. + ( + _, + _, + _, + _, + metal2vulkan::vk::DrawCommand::DrawMeshTasksIndirect { + draw_count, stride, .. + }, + ) if arguments.is_some() => { + let (raw, at) = arguments + .as_ref() + .map(mesh_arguments::ArgumentsPass::scratch) + .ok_or_else(|| internal("a mesh arguments pass gone"))?; + one(( + None, + Some(raw), + metal2vulkan::vk::DrawCommand::DrawMeshTasksIndirect { + offset: at, + draw_count, + stride, + }, + )) + } // A scanned emulated mesh draw's arguments are its work buffer's. ( _, @@ -8502,7 +8544,9 @@ impl RenderLowering { // An emulated mesh draw's dispatch, or an emulated tessellation draw's scan, which reads // what an earlier draw or tile dispatch of the encoder wrote behind a memory barrier, or // writes what one read or wrote, records before the draw's render pass instance too. - let scanned = commands.mesh_dispatch.is_some() || commands.tessellation_dispatch.is_some(); + let scanned = commands.mesh_dispatch.is_some() + || commands.tessellation_dispatch.is_some() + || arguments.is_some(); let mesh_uses: Vec> = match scanned { true => uses .iter() @@ -8560,12 +8604,13 @@ impl RenderLowering { if writes_fragments || (after_geometry && (reads_fragments || !self.command_barrier)) { return Err(Error::NotImplemented(RuntimeGap::IndirectRenderCommands)); } - // A scan reads Metal's arguments where the draw reads them, after their copy. + // A scan reads Metal's arguments where the draw reads them, after their copy. An arguments + // pass, which writes no Metal resource, waits only for what wrote them. let mesh_before = match self.replaying { true => after_geometry, false => { (self.core.uses().written(&mesh_uses) && !self.unordered.written(&mesh_uses)) - || self.core.uses().accessed(&mesh_uses) + || (arguments.is_none() && self.core.uses().accessed(&mesh_uses)) || before_instance } }; @@ -8947,6 +8992,13 @@ impl RenderLowering { false => steps.record(&mut self.core), } } + if let Some(pass) = arguments { + let steps = pass.into_steps(&mut self.core); + match mesh_before { + true => self.steps_before().push(Before::MeshArguments(steps)), + false => steps.record(&mut self.core), + } + } if let Some(steps) = tessellation_steps { steps.retain(&mut self.core); match mesh_before { diff --git a/crates/metal2vulkan-runtime/src/render/mesh.rs b/crates/metal2vulkan-runtime/src/render/mesh.rs index 350380d1b..7ff7b77dc 100644 --- a/crates/metal2vulkan-runtime/src/render/mesh.rs +++ b/crates/metal2vulkan-runtime/src/render/mesh.rs @@ -40,10 +40,14 @@ //! regions of their own threadgroup sizes would reorder its primitives), and an object //! function's arena with the lengths `setObjectThreadgroupMemoryLength:atIndex:` set //! ([`RenderCommandEncoder::set_object_threadgroup_memory_length`]) past the device's workgroup -//! memory for the object stage (`Unsupported{ThreadgroupMemorySize}` naming the limit). On a -//! device with `VK_EXT_mesh_shader` an indirect draw is -//! `NotImplemented(IndirectDrawArguments)`: the binder asks for its arguments on the CPU, since -//! nothing bounds its GPU-written group counts by the device's limits yet. +//! memory for the object stage (`Unsupported{ThreadgroupMemorySize}` naming the limit). +//! - **Metal's grids**, measured on the M3 Max (macOS 27.0.1), direct and indirect alike: without +//! an object function a grid with an axis past 65,535 draws nothing, as does one of more than +//! 1,048,575 threadgroups (`bind::mesh_arguments`); with one, every object grid measured +//! draws. On a device with `VK_EXT_mesh_shader` an indirect draw reads the counts its arguments +//! pass writes (`render/mesh_arguments.rs`): Metal's, or none where Metal draws nothing, and an +//! object grid past the device's task limits draws nothing and fails the command buffer +//! (`CommandBufferError::MeshGridPastLimits`). //! - **Emulated** on a device without `VK_EXT_mesh_shader`, whose pipeline's object and mesh //! functions are compute stages and whose mesh function writes records //! (`GraphicsState::mesh_records`): each draw has a work buffer ([`MeshWork`], uploaded per draw) @@ -861,9 +865,10 @@ impl RenderCommandEncoder { /// `indirect_buffer_offset`, the threadgroups' counts. Refused as /// [`draw_mesh_threadgroups`](Self::draw_mesh_threadgroups) is, as an indirect draw's /// arguments are (`render.rs`'s module docs), and for an indirect buffer of another device. - /// On a device with `VK_EXT_mesh_shader` the draw is `NotImplemented(IndirectDrawArguments)`, - /// and on one without it, of a pipeline with an object function, `NotImplemented(MeshShading)` - /// (the module docs). + /// On a device with `VK_EXT_mesh_shader` the draw's counts are an arguments pass's: Metal's + /// where Metal draws them, and an object grid past the device's task limits fails the command + /// buffer (`CommandBufferError::MeshGridPastLimits`). On one without it, a draw of a pipeline + /// with an object function is `NotImplemented(MeshShading)` (the module docs). pub fn draw_mesh_threadgroups_indirect( &mut self, indirect_buffer: &Buffer, diff --git a/crates/metal2vulkan-runtime/src/render/mesh_arguments.rs b/crates/metal2vulkan-runtime/src/render/mesh_arguments.rs new file mode 100644 index 000000000..ace22dc6b --- /dev/null +++ b/crates/metal2vulkan-runtime/src/render/mesh_arguments.rs @@ -0,0 +1,204 @@ +//! The arguments pass of an indirect mesh draw on a device with `VK_EXT_mesh_shader` +//! (`DrawCommands::mesh_arguments`; the module and its rule are `bind::MeshArguments`'s). +//! +//! `vkCmdDrawMeshTasksIndirectEXT` requires every group count within the device's limits for the +//! draw's first stage, which Metal's GPU-written arguments need not be, and Metal draws nothing +//! for some grids the device would launch. So the draw reads the counts this pass writes: +//! +//! - **Before the pass** (hoisted, as an emulated mesh draw's dispatches are, `render/mesh.rs`): +//! one invocation of the device's module of the draw's form reads Metal's arguments and writes +//! the draw's counts into 12 bytes of the command buffer's upload arena: Metal's where Metal +//! draws them and the device launches them, else zero. A barrier from everything before, and +//! one to everything after. +//! - **In the pass**, the draw's `vkCmdDrawMeshTasksIndirectEXT` from those bytes. +//! - **Where it records**: as an emulated mesh draw's steps (`render.rs`): before the render pass, +//! or, where an earlier draw or tile dispatch of the encoder wrote the arguments behind a memory +//! barrier, before the draw's own render pass instance, after the writer's. A write since the +//! last barrier, which Metal does not order before the draw, is read as it was before the pass. +//! - **An object grid past the device's task limits**, which Metal draws (every count measured, +//! 16,777,216 along `x`), draws nothing and fails the command buffer +//! (`CommandBufferError::MeshGridPastLimits`): nothing is drawn short silently. + +use crate::device::functions::Vk; +use crate::draw_source::DrawSource; +use crate::encoder::EncoderCore; +use crate::error::{internal, Error}; +use crate::owned_kernel::{OwnedKernel, OwnedModule, OwnedSets}; +use crate::resource::ResourceKey; +use crate::tracker::{Access, Barrier, Use, UseRange}; +use crate::upload::Upload; +use ash::vk; +use metal2vulkan::bind::{ + ExecutionStatus, IndirectRef, MeshArguments, MeshArgumentsForm, MeshArgumentsModule, +}; + +/// One draw's pass, planned: its scratch, kernel and set, and its read of Metal's arguments. +pub(crate) struct ArgumentsPass { + scratch: Upload, + kernel: OwnedKernel, + sets: OwnedSets, + push: [u8; 4], + uses: Vec>, +} + +impl ArgumentsPass { + /// The pass of the indirect mesh draw of `form` that reads its arguments from `indirect`, in + /// `core`'s command buffer. Refused as uploads, kernels and descriptor sets are. + pub(crate) fn new( + core: &mut EncoderCore, + indirect: &DrawSource<'_>, + form: MeshArgumentsForm, + ) -> Result { + let device = core.device().clone(); + let alignment = device + .properties() + .description + .limits + .min_storage_buffer_offset_alignment; + let pass = MeshArguments::new(IndirectRef::new(0, indirect.at), form, alignment) + .ok_or_else(|| internal("a mesh arguments pass at an offset not a multiple of 4"))?; + let kernel = device.owned_kernel(OwnedModule::MeshArguments(form))?; + let (scratch, status) = { + let mut state = core.command_buffer().state(); + let scratch = + state + .uploads + .upload(&device, &[], u64::from(MeshArguments::SCRATCH_BYTES))?; + (scratch, state.status_words(&device)?) + }; + let mut set = [(vk::Buffer::null(), 0, 0); 3]; + set[MeshArgumentsModule::SOURCE_BINDING as usize] = ( + indirect.raw, + pass.source_range.offset, + pass.source_range.range, + ); + set[MeshArgumentsModule::SCRATCH_BINDING as usize] = + (scratch.raw(), scratch.offset(), scratch.len()); + set[MeshArgumentsModule::STATUS_BINDING as usize] = + (status.raw(), status.offset(), ExecutionStatus::BYTES as u64); + let sets = OwnedSets::write(&device, &kernel, &[set.to_vec()])?; + Ok(ArgumentsPass { + scratch, + kernel, + sets, + push: pass.push_constants, + uses: reads(indirect), + }) + } + + /// The scratch's `VkBuffer` and offset: the draw's arguments. + pub(crate) fn scratch(&self) -> (vk::Buffer, u64) { + (self.scratch.raw(), self.scratch.offset()) + } + + /// Hold the pass's set in `core`'s command buffer until it completes; what is left records + /// its dispatch (`render.rs`). Call it once the draw records. + pub(crate) fn into_steps(self, core: &mut EncoderCore) -> ArgumentsSteps { + let steps = ArgumentsSteps { + kernel: self.kernel, + sets: self.sets.sets.clone(), + push: self.push, + uses: self.uses, + }; + core.retain(self.sets); + steps + } +} + +/// The pass's read of Metal's 12 bytes of arguments, in the compute stage. +fn reads(indirect: &DrawSource<'_>) -> Vec> { + let read = Access::new( + vk::PipelineStageFlags2::COMPUTE_SHADER, + vk::AccessFlags2::SHADER_STORAGE_READ, + ); + let (arguments, offset) = indirect.metal(); + let (identity, range) = arguments.tracked(offset..offset + 12); + vec![Use::reads( + identity.key, + identity.tracked, + UseRange::Bytes(range), + read, + )] +} + +/// A planned pass's dispatch, its set held by the command buffer +/// ([`ArgumentsPass::into_steps`]). +pub(crate) struct ArgumentsSteps { + kernel: OwnedKernel, + sets: Vec, + push: [u8; 4], + uses: Vec>, +} + +impl ArgumentsSteps { + /// The pass's read of Metal's arguments. + pub(crate) fn uses(&self) -> &[Use] { + &self.uses + } + + /// Record the dispatch into `core`'s command buffer before the pass, between a barrier from + /// everything before and one to everything after. + pub(crate) fn record(&self, core: &mut EncoderCore) { + core.barrier(Barrier::everything()); + core.command( + vk::PipelineStageFlags2::COMPUTE_SHADER, + &self.uses, + |raw, command_buffer| { + // SAFETY: the encoder's command buffer is recording outside a render pass. + unsafe { self.dispatch(raw, command_buffer) } + }, + ); + core.barrier(Barrier::everything()); + } + + /// Record the dispatch into `command_buffer` between a barrier from everything before and + /// one to everything after: before a render pass instance of the encoder's pass, after the + /// instances before it (`render.rs`). + /// + /// # Safety + /// + /// `command_buffer` is the encoder's, recording outside a render pass, and only the encoder + /// records it. + pub(crate) unsafe fn record_in(&self, raw: &Vk, command_buffer: vk::CommandBuffer) { + // SAFETY: as the caller states; barriers need nothing more. + unsafe { + Barrier::everything().record(raw, command_buffer); + self.dispatch(raw, command_buffer); + Barrier::everything().record(raw, command_buffer); + } + } + + /// The module's one invocation. + /// + /// # Safety + /// + /// `command_buffer` is recording outside a render pass, and only one encoder records it. + unsafe fn dispatch(&self, raw: &Vk, command_buffer: vk::CommandBuffer) { + // SAFETY: as the caller states; the kernel is the device's, its set and the buffers it + // names live until the command buffer completes (retained by `into_steps`), and the push + // range is the kernel's. + unsafe { + raw.cmd_bind_pipeline( + command_buffer, + vk::PipelineBindPoint::COMPUTE, + self.kernel.pipeline, + ); + raw.cmd_bind_descriptor_sets( + command_buffer, + vk::PipelineBindPoint::COMPUTE, + self.kernel.layout, + 0, + &self.sets, + &[], + ); + raw.cmd_push_constants( + command_buffer, + self.kernel.layout, + vk::ShaderStageFlags::COMPUTE, + 0, + &self.push, + ); + raw.cmd_dispatch(command_buffer, 1, 1, 1); + } + } +} diff --git a/crates/metal2vulkan-validation/src/candidate/engine/graphics/tests.rs b/crates/metal2vulkan-validation/src/candidate/engine/graphics/tests.rs index 2c090cbe4..3087a8d19 100644 --- a/crates/metal2vulkan-validation/src/candidate/engine/graphics/tests.rs +++ b/crates/metal2vulkan-validation/src/candidate/engine/graphics/tests.rs @@ -2427,9 +2427,9 @@ fn public_fragment_imageblock_cases_plan_their_storage_image() { } /// A draw whose imageblock the product does not model reaches the render executor's plan as the -/// product's typed refusal, never as a draw: a layered pass (the binder, the per-layer imageblock) -/// and a depth attachment behind a writer that does not declare early fragment tests (link: the -/// late test could drop a fragment after its write). +/// product's typed refusal, never as a draw: a layered pass (the binder, the per-layer imageblock). +/// A depth attachment behind a writer that does not declare early fragment tests links and plans: +/// the write runs after the depth test (the writer under early tests, or its draws testing first). #[test] fn imageblock_draws_the_product_does_not_model_are_refused_typed() { let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("corpus"); @@ -2502,14 +2502,11 @@ fn imageblock_draws_the_product_does_not_model_are_refused_typed() { ..render.clone() }; let shape = render_shape(&late_depth, true).unwrap(); - let refused = compile_in_process(&lavapipe, &late_depth, libraries, &shape).err(); - imageblocks( - "a late depth test", - match &refused { - Some(Error::Unsupported(refusal)) => Some(refusal), - _ => None, - }, - ); + let pipeline = compile_in_process(&lavapipe, &late_depth, libraries, &shape) + .unwrap_or_else(|error| panic!("a late depth test links: {error}")); + pipeline + .plan(&lavapipe, &shape) + .unwrap_or_else(|error| panic!("a late depth test plans: {error}")); } /// The graphics state of the public fixture `fragment_rate_map_position` drawn by its generated diff --git a/crates/metal2vulkan-validation/src/candidate/platform/enables.rs b/crates/metal2vulkan-validation/src/candidate/platform/enables.rs index 789cd268b..6c57148b7 100644 --- a/crates/metal2vulkan-validation/src/candidate/platform/enables.rs +++ b/crates/metal2vulkan-validation/src/candidate/platform/enables.rs @@ -1333,6 +1333,7 @@ const EXTENSIONS: &[ExtensionName] = { Some(X::ExtPrimitiveTopologyListRestart), ), e(c"VK_EXT_provoking_vertex", Some(X::ExtProvokingVertex)), + e(c"VK_EXT_post_depth_coverage", Some(X::ExtPostDepthCoverage)), e(c"VK_EXT_mesh_shader", Some(X::ExtMeshShader)), e(c"VK_KHR_shader_float_controls2", None), e(c"VK_KHR_maintenance5", Some(X::KhrMaintenance5)), diff --git a/crates/metal2vulkan-validation/src/candidate/platform/enables/opened_chains.txt b/crates/metal2vulkan-validation/src/candidate/platform/enables/opened_chains.txt index 1ec4d79b0..f2651517a 100644 --- a/crates/metal2vulkan-validation/src/candidate/platform/enables/opened_chains.txt +++ b/crates/metal2vulkan-validation/src/candidate/platform/enables/opened_chains.txt @@ -1,71 +1,71 @@ -amd-780m-hawkpoint-radv device Stated 68f2588a97b1d00b7fda30a6717f2d4c882747e7adc6ed7b8fddab71d3e69dd5 members=144 extensions=48 -amd-780m-hawkpoint-radv device RobustnessOff 19f3458023e230c20759e772278174ea9cd9eedcc9ef837a8c5fa00f421d7218 members=140 extensions=48 -amd-780m-hawkpoint-radv restricted Stated e6aa81fddadd2dd84046d43c32f1b88f9135b872af013f0e97a2069e06ec09c0 members=143 extensions=30 -amd-780m-hawkpoint-radv restricted RobustnessOff fc45d9162c16e638d4b68291b1e835d1249e3b2ce616c8bab7a1a9c33d572c88 members=139 extensions=30 -amd-780m-radv device Stated 68f2588a97b1d00b7fda30a6717f2d4c882747e7adc6ed7b8fddab71d3e69dd5 members=144 extensions=48 -amd-780m-radv device RobustnessOff 19f3458023e230c20759e772278174ea9cd9eedcc9ef837a8c5fa00f421d7218 members=140 extensions=48 -amd-780m-radv restricted Stated e6aa81fddadd2dd84046d43c32f1b88f9135b872af013f0e97a2069e06ec09c0 members=143 extensions=30 -amd-780m-radv restricted RobustnessOff fc45d9162c16e638d4b68291b1e835d1249e3b2ce616c8bab7a1a9c33d572c88 members=139 extensions=30 -amd-rdna2-apu-radv device Stated 4d78a7edecef689dc7643cbd964a5d8cb06363b75e97884725d26d8eea76d109 members=145 extensions=48 -amd-rdna2-apu-radv device RobustnessOff ce2fce03a4ca9c13698551befc47f2a73a4255af93a7c5426ce993a6486d670d members=141 extensions=48 -amd-rdna2-apu-radv restricted Stated 02c7ebd2ff53c52803b09042dbad510687064e9bbe3ea085895890b4d55a4ba9 members=144 extensions=30 -amd-rdna2-apu-radv restricted RobustnessOff f0a6a66605238a00b409d73e6444814d9e86fc1f3943a766e89928256c428073 members=140 extensions=30 -amd-rdna3-radv device Stated 68f2588a97b1d00b7fda30a6717f2d4c882747e7adc6ed7b8fddab71d3e69dd5 members=144 extensions=48 -amd-rdna3-radv device RobustnessOff 19f3458023e230c20759e772278174ea9cd9eedcc9ef837a8c5fa00f421d7218 members=140 extensions=48 -amd-rdna3-radv restricted Stated e6aa81fddadd2dd84046d43c32f1b88f9135b872af013f0e97a2069e06ec09c0 members=143 extensions=30 -amd-rdna3-radv restricted RobustnessOff fc45d9162c16e638d4b68291b1e835d1249e3b2ce616c8bab7a1a9c33d572c88 members=139 extensions=30 -gate-lavapipe device Stated 964c5502ab7024b24fd75fd2094e769d80e1e8a4a1180e3a4bb388b3c3a36020 members=141 extensions=45 -gate-lavapipe device RobustnessOff d1079e6a7175cb36f55b520da867881eb96944deb06fe055bc49c03cadb43518 members=137 extensions=45 -gate-lavapipe restricted Stated 5e01545e4351257990a0dc40c78b8a41fc2d3a9bb5d74c732cfa3b1ce0636653 members=140 extensions=27 -gate-lavapipe restricted RobustnessOff d97dc44586ec6bc9504a6c45bfa0199bb2b8581189e9ce57200d0efdd45a3f73 members=136 extensions=27 -gate-lavapipe-x86_64 device Stated 964c5502ab7024b24fd75fd2094e769d80e1e8a4a1180e3a4bb388b3c3a36020 members=141 extensions=45 -gate-lavapipe-x86_64 device RobustnessOff d1079e6a7175cb36f55b520da867881eb96944deb06fe055bc49c03cadb43518 members=137 extensions=45 -gate-lavapipe-x86_64 restricted Stated 5e01545e4351257990a0dc40c78b8a41fc2d3a9bb5d74c732cfa3b1ce0636653 members=140 extensions=27 -gate-lavapipe-x86_64 restricted RobustnessOff d97dc44586ec6bc9504a6c45bfa0199bb2b8581189e9ce57200d0efdd45a3f73 members=136 extensions=27 -intel-arl-anv device Stated f0a25125c6094f8f3e8db2e9274b756268c623bda26fc416f056ecbac4aa830d members=143 extensions=46 -intel-arl-anv device RobustnessOff efc69f808cc653af20f6f164f6d6ea078602d29ff4a34b176210fe02034ec2e4 members=139 extensions=46 -intel-arl-anv restricted Stated 0135b11b603992667d96859feab4fdcb0493f94477bf3e2e2dfb7082fa5e5d21 members=142 extensions=28 -intel-arl-anv restricted RobustnessOff 32f876de000574951b3d3f35f4af67e2a20113427ec6e2077b33c41d42f97aa5 members=138 extensions=28 -intel-irisxe-anv device Stated 198db7c401f06fdec22b59bcd929334b5887babd3d3e771778dcd4c0c7614e7a members=130 extensions=42 -intel-irisxe-anv device RobustnessOff c08c277f18c2364f047930e11f069b5764c3ddb63b9c7487f2c4178f1e504ba8 members=126 extensions=42 -intel-irisxe-anv restricted Stated 49cc0035d2de301213f9f2e98dea6a3cf0b866eb86b61a5bdfc41881e22e612e members=129 extensions=24 -intel-irisxe-anv restricted RobustnessOff 7af378bd837859632d8b69c9e304c50f0ff079dc3fab702ccc52ef73953f2c39 members=125 extensions=24 -intel-irisxe-rplp-anv device Stated 198db7c401f06fdec22b59bcd929334b5887babd3d3e771778dcd4c0c7614e7a members=130 extensions=42 -intel-irisxe-rplp-anv device RobustnessOff c08c277f18c2364f047930e11f069b5764c3ddb63b9c7487f2c4178f1e504ba8 members=126 extensions=42 -intel-irisxe-rplp-anv restricted Stated 49cc0035d2de301213f9f2e98dea6a3cf0b866eb86b61a5bdfc41881e22e612e members=129 extensions=24 -intel-irisxe-rplp-anv restricted RobustnessOff 7af378bd837859632d8b69c9e304c50f0ff079dc3fab702ccc52ef73953f2c39 members=125 extensions=24 -intel-uhd770-rpls-anv device Stated 198db7c401f06fdec22b59bcd929334b5887babd3d3e771778dcd4c0c7614e7a members=130 extensions=42 -intel-uhd770-rpls-anv device RobustnessOff c08c277f18c2364f047930e11f069b5764c3ddb63b9c7487f2c4178f1e504ba8 members=126 extensions=42 -intel-uhd770-rpls-anv restricted Stated 49cc0035d2de301213f9f2e98dea6a3cf0b866eb86b61a5bdfc41881e22e612e members=129 extensions=24 -intel-uhd770-rpls-anv restricted RobustnessOff 7af378bd837859632d8b69c9e304c50f0ff079dc3fab702ccc52ef73953f2c39 members=125 extensions=24 -lavapipe device Stated 964c5502ab7024b24fd75fd2094e769d80e1e8a4a1180e3a4bb388b3c3a36020 members=141 extensions=45 -lavapipe device RobustnessOff d1079e6a7175cb36f55b520da867881eb96944deb06fe055bc49c03cadb43518 members=137 extensions=45 -lavapipe restricted Stated 5e01545e4351257990a0dc40c78b8a41fc2d3a9bb5d74c732cfa3b1ce0636653 members=140 extensions=27 -lavapipe restricted RobustnessOff d97dc44586ec6bc9504a6c45bfa0199bb2b8581189e9ce57200d0efdd45a3f73 members=136 extensions=27 +amd-780m-hawkpoint-radv device Stated 142a18dda7c8bd49732e27caab79fba3e5df6fab0959d39f08d43d660679789d members=145 extensions=49 +amd-780m-hawkpoint-radv device RobustnessOff c0d1e790d12ee0863651ad1fe302fd5029be1a5f9140507404773b5dd961742f members=141 extensions=49 +amd-780m-hawkpoint-radv restricted Stated 76737f911894cdca4ea7fe898669ceafb629be7eb9b1b4873aa7a500b0552b1a members=144 extensions=31 +amd-780m-hawkpoint-radv restricted RobustnessOff 062e8509d8aa9fc66e19b444c94d5bda5d83016ac790f4e3f1d72db1cc3c801e members=140 extensions=31 +amd-780m-radv device Stated 142a18dda7c8bd49732e27caab79fba3e5df6fab0959d39f08d43d660679789d members=145 extensions=49 +amd-780m-radv device RobustnessOff c0d1e790d12ee0863651ad1fe302fd5029be1a5f9140507404773b5dd961742f members=141 extensions=49 +amd-780m-radv restricted Stated 76737f911894cdca4ea7fe898669ceafb629be7eb9b1b4873aa7a500b0552b1a members=144 extensions=31 +amd-780m-radv restricted RobustnessOff 062e8509d8aa9fc66e19b444c94d5bda5d83016ac790f4e3f1d72db1cc3c801e members=140 extensions=31 +amd-rdna2-apu-radv device Stated 82613d77788e67676838c47c032838d062453dd428439c40df9206efa8e92fc2 members=146 extensions=49 +amd-rdna2-apu-radv device RobustnessOff 82d9c5828263377b87534297859bfba2ce40938dc842b57a927a717ff70b6456 members=142 extensions=49 +amd-rdna2-apu-radv restricted Stated d9e6075102c122ad6bd6700dc757892964157bce5c19f4d6cdd067e9226f077d members=145 extensions=31 +amd-rdna2-apu-radv restricted RobustnessOff 911f2ae8917554a05877cf0ff313ef84676731abea292eba77fb89c384c5f5f5 members=141 extensions=31 +amd-rdna3-radv device Stated 142a18dda7c8bd49732e27caab79fba3e5df6fab0959d39f08d43d660679789d members=145 extensions=49 +amd-rdna3-radv device RobustnessOff c0d1e790d12ee0863651ad1fe302fd5029be1a5f9140507404773b5dd961742f members=141 extensions=49 +amd-rdna3-radv restricted Stated 76737f911894cdca4ea7fe898669ceafb629be7eb9b1b4873aa7a500b0552b1a members=144 extensions=31 +amd-rdna3-radv restricted RobustnessOff 062e8509d8aa9fc66e19b444c94d5bda5d83016ac790f4e3f1d72db1cc3c801e members=140 extensions=31 +gate-lavapipe device Stated 97dd8626ea4a34fcab04a0b8cd27589a82ce3133892907262eb150ad0a68cebd members=142 extensions=46 +gate-lavapipe device RobustnessOff 5e9fa8f68bc40c0d0d9b08006ca2aff16710380c276ebb7952ca598273c2dff3 members=138 extensions=46 +gate-lavapipe restricted Stated 9c1be18040960d89167cd62e01c0cdbab1247d6ae2751a5b03ee8167eaa27a1f members=141 extensions=28 +gate-lavapipe restricted RobustnessOff 19346af315a976be86c4d89aaefa8bfaa69006ec28fe78cfed397440a25e1e7c members=137 extensions=28 +gate-lavapipe-x86_64 device Stated 97dd8626ea4a34fcab04a0b8cd27589a82ce3133892907262eb150ad0a68cebd members=142 extensions=46 +gate-lavapipe-x86_64 device RobustnessOff 5e9fa8f68bc40c0d0d9b08006ca2aff16710380c276ebb7952ca598273c2dff3 members=138 extensions=46 +gate-lavapipe-x86_64 restricted Stated 9c1be18040960d89167cd62e01c0cdbab1247d6ae2751a5b03ee8167eaa27a1f members=141 extensions=28 +gate-lavapipe-x86_64 restricted RobustnessOff 19346af315a976be86c4d89aaefa8bfaa69006ec28fe78cfed397440a25e1e7c members=137 extensions=28 +intel-arl-anv device Stated d1d8f91b6de56f112365c71f49e98bab64db312a2011d0ac14f2eff0f24f4141 members=144 extensions=47 +intel-arl-anv device RobustnessOff 00c54512727f7f65f55153beba617bc3d36dda971093d14a5c929ee8b6f3d502 members=140 extensions=47 +intel-arl-anv restricted Stated 5168f89821e8d6426075c2662a71a18d4efb52739d286b897d50833352da2ef2 members=143 extensions=29 +intel-arl-anv restricted RobustnessOff 6d07a31f79af2a948c678f5a2ee9189fa0a3e6ebbd5992baa954d9151b6b0d44 members=139 extensions=29 +intel-irisxe-anv device Stated a0ab894b0692c4110394ccd5aac994e4b03df978b8879edc8b53a02de9fd0d81 members=131 extensions=43 +intel-irisxe-anv device RobustnessOff 2a6c4e107127f8a369eb7d5b51499894a972b9d80dd453466a2724fa1689fc5d members=127 extensions=43 +intel-irisxe-anv restricted Stated f468d5a9629ad6d7dbde06ae74cd80de164c20f68339b09b50c7ebd3f857aba8 members=130 extensions=25 +intel-irisxe-anv restricted RobustnessOff 447cd5bcf90dd8fb33adad510a4a4963e25c9b790e55a90e8b2b5bcf40196887 members=126 extensions=25 +intel-irisxe-rplp-anv device Stated a0ab894b0692c4110394ccd5aac994e4b03df978b8879edc8b53a02de9fd0d81 members=131 extensions=43 +intel-irisxe-rplp-anv device RobustnessOff 2a6c4e107127f8a369eb7d5b51499894a972b9d80dd453466a2724fa1689fc5d members=127 extensions=43 +intel-irisxe-rplp-anv restricted Stated f468d5a9629ad6d7dbde06ae74cd80de164c20f68339b09b50c7ebd3f857aba8 members=130 extensions=25 +intel-irisxe-rplp-anv restricted RobustnessOff 447cd5bcf90dd8fb33adad510a4a4963e25c9b790e55a90e8b2b5bcf40196887 members=126 extensions=25 +intel-uhd770-rpls-anv device Stated a0ab894b0692c4110394ccd5aac994e4b03df978b8879edc8b53a02de9fd0d81 members=131 extensions=43 +intel-uhd770-rpls-anv device RobustnessOff 2a6c4e107127f8a369eb7d5b51499894a972b9d80dd453466a2724fa1689fc5d members=127 extensions=43 +intel-uhd770-rpls-anv restricted Stated f468d5a9629ad6d7dbde06ae74cd80de164c20f68339b09b50c7ebd3f857aba8 members=130 extensions=25 +intel-uhd770-rpls-anv restricted RobustnessOff 447cd5bcf90dd8fb33adad510a4a4963e25c9b790e55a90e8b2b5bcf40196887 members=126 extensions=25 +lavapipe device Stated 97dd8626ea4a34fcab04a0b8cd27589a82ce3133892907262eb150ad0a68cebd members=142 extensions=46 +lavapipe device RobustnessOff 5e9fa8f68bc40c0d0d9b08006ca2aff16710380c276ebb7952ca598273c2dff3 members=138 extensions=46 +lavapipe restricted Stated 9c1be18040960d89167cd62e01c0cdbab1247d6ae2751a5b03ee8167eaa27a1f members=141 extensions=28 +lavapipe restricted RobustnessOff 19346af315a976be86c4d89aaefa8bfaa69006ec28fe78cfed397440a25e1e7c members=137 extensions=28 lunarg-desktop-baseline-2023 device Stated 874afb3cbcd8a813f7d1dffaf2b3108c612fa8910dee201427eeec23b291383a members=56 extensions=5 lunarg-desktop-baseline-2023 device RobustnessOff 3d72e0d627ce569a8a6750f24d89b3d1afc4b2c175c30ddb66428a92fdc37584 members=53 extensions=5 lunarg-desktop-baseline-2023 restricted Stated 874afb3cbcd8a813f7d1dffaf2b3108c612fa8910dee201427eeec23b291383a members=56 extensions=5 lunarg-desktop-baseline-2023 restricted RobustnessOff 3d72e0d627ce569a8a6750f24d89b3d1afc4b2c175c30ddb66428a92fdc37584 members=53 extensions=5 -moltenvk-m3 device Stated 5472a8522c4d442b37c18839e5e2bcba4bfdf3c33f371a80773473c9462fbdec members=113 extensions=34 -moltenvk-m3 device RobustnessOff 503ff67e7aac3df8846d123d8284d0d6341092fb35813dc19a8f4dff8b3dae70 members=110 extensions=34 -moltenvk-m3 restricted Stated 2bc2afb190da2862d60f3b2704519d23f731955b139577cd4f7f3c664361f6c6 members=111 extensions=15 -moltenvk-m3 restricted RobustnessOff 0158036adc6c623fddbd24085ada8feb6d4f2e1257d66aed0527e99a1bc82753 members=108 extensions=15 -moltenvk-m4 device Stated 5472a8522c4d442b37c18839e5e2bcba4bfdf3c33f371a80773473c9462fbdec members=113 extensions=34 -moltenvk-m4 device RobustnessOff 503ff67e7aac3df8846d123d8284d0d6341092fb35813dc19a8f4dff8b3dae70 members=110 extensions=34 -moltenvk-m4 restricted Stated 2bc2afb190da2862d60f3b2704519d23f731955b139577cd4f7f3c664361f6c6 members=111 extensions=15 -moltenvk-m4 restricted RobustnessOff 0158036adc6c623fddbd24085ada8feb6d4f2e1257d66aed0527e99a1bc82753 members=108 extensions=15 -nvidia-pascal-linux device Stated 25cef3849ac73edab7b763f62e3cc2b6a2f8cd1a3b54e7a022a085d6848658c5 members=130 extensions=38 -nvidia-pascal-linux device RobustnessOff b1e15f88f3b2edc3c91df57669faeef66b241f40c936fe5b103e221fa998ad69 members=126 extensions=38 -nvidia-pascal-linux restricted Stated 7d6810a8205d5b9880059c351399ac970bfa1e6af8a268b237a96a3fba854ffc members=129 extensions=20 -nvidia-pascal-linux restricted RobustnessOff 0b79f9f0106bf7e4b4fe5d43157f2a474e1c7336601333601ed09648456b80eb members=125 extensions=20 -nvidia-rtx50-linux device Stated fcd8242a4af87b94f50c3c185bb0a11f05ddd5124f56e85bd05ea84da46c5a15 members=142 extensions=46 -nvidia-rtx50-linux device RobustnessOff 50f7c0b75eeb10e7094da078eb354eb41f110872fe261981947ddbda17873759 members=138 extensions=46 -nvidia-rtx50-linux restricted Stated 80ac830f2526af348bbeea69bb97b670c341539011e78615603e3522cd42321f members=141 extensions=28 -nvidia-rtx50-linux restricted RobustnessOff 33b7beb2f9e9b2f3c143380e2ae352ac875e5ca1317b7e073527386c1b2603bc members=137 extensions=28 -nvidia-rtx5080-laptop device Stated fcd8242a4af87b94f50c3c185bb0a11f05ddd5124f56e85bd05ea84da46c5a15 members=142 extensions=46 -nvidia-rtx5080-laptop device RobustnessOff 50f7c0b75eeb10e7094da078eb354eb41f110872fe261981947ddbda17873759 members=138 extensions=46 -nvidia-rtx5080-laptop restricted Stated 80ac830f2526af348bbeea69bb97b670c341539011e78615603e3522cd42321f members=141 extensions=28 -nvidia-rtx5080-laptop restricted RobustnessOff 33b7beb2f9e9b2f3c143380e2ae352ac875e5ca1317b7e073527386c1b2603bc members=137 extensions=28 +moltenvk-m3 device Stated e83bed9b2c2c6f0ed3ebd04307a5369c22a8ee652b756a47ce99ce7f42aa497f members=113 extensions=35 +moltenvk-m3 device RobustnessOff 9f0ce89959369ef015ef5f2d0e5ea915d33f3987bdbd4146df78c05851a4e2fb members=110 extensions=35 +moltenvk-m3 restricted Stated ab2133cb912dcc9e4bbde970cbd8502c74070868798924517fb37e210a865482 members=111 extensions=16 +moltenvk-m3 restricted RobustnessOff e1e2dd5a0da37d45b3b5891a0e8d7b0b81960a5579dad5b0ebec2dd7e066a3ae members=108 extensions=16 +moltenvk-m4 device Stated e83bed9b2c2c6f0ed3ebd04307a5369c22a8ee652b756a47ce99ce7f42aa497f members=113 extensions=35 +moltenvk-m4 device RobustnessOff 9f0ce89959369ef015ef5f2d0e5ea915d33f3987bdbd4146df78c05851a4e2fb members=110 extensions=35 +moltenvk-m4 restricted Stated ab2133cb912dcc9e4bbde970cbd8502c74070868798924517fb37e210a865482 members=111 extensions=16 +moltenvk-m4 restricted RobustnessOff e1e2dd5a0da37d45b3b5891a0e8d7b0b81960a5579dad5b0ebec2dd7e066a3ae members=108 extensions=16 +nvidia-pascal-linux device Stated c3d33bbf7a06a09584ff84024f854e14bbc80b83b02b4baca0f4f8c27542df71 members=131 extensions=39 +nvidia-pascal-linux device RobustnessOff ea9789ddde0e130f4174a5e574047c6e8a272b1bca255ff246166aa8bf02eb73 members=127 extensions=39 +nvidia-pascal-linux restricted Stated 31aed02f87c2701b2a03515f275525c517a5ff89dbd792e201cb65d9e0c8d871 members=130 extensions=21 +nvidia-pascal-linux restricted RobustnessOff 64b40348bf5b472549bc98de9bc77f552f8cd0f01f44921d66c865110865728e members=126 extensions=21 +nvidia-rtx50-linux device Stated 21b12ec094edf0b349395cc9859361dab6d10710b7c5ce11ea66fc6ee5d7c7ea members=143 extensions=47 +nvidia-rtx50-linux device RobustnessOff de13a5cfc02235eaa51e3c0fb64319ecfcfc1900d901181665a85bca262be171 members=139 extensions=47 +nvidia-rtx50-linux restricted Stated 740358b38d36c5cff7dab18038b9e2a833353fb2645227ae78ee88b74d72200d members=142 extensions=29 +nvidia-rtx50-linux restricted RobustnessOff 7210627a9b2d124dda5ef4079be63c65021be791b730b118bde6937e03df6425 members=138 extensions=29 +nvidia-rtx5080-laptop device Stated 21b12ec094edf0b349395cc9859361dab6d10710b7c5ce11ea66fc6ee5d7c7ea members=143 extensions=47 +nvidia-rtx5080-laptop device RobustnessOff de13a5cfc02235eaa51e3c0fb64319ecfcfc1900d901181665a85bca262be171 members=139 extensions=47 +nvidia-rtx5080-laptop restricted Stated 740358b38d36c5cff7dab18038b9e2a833353fb2645227ae78ee88b74d72200d members=142 extensions=29 +nvidia-rtx5080-laptop restricted RobustnessOff 7210627a9b2d124dda5ef4079be63c65021be791b730b118bde6937e03df6425 members=138 extensions=29 roadmap-2022 device Stated ea14a46708f56d5478ab06ec0852c15420809b3e7d942a028f6d6289a46e12fd members=42 extensions=1 roadmap-2022 device RobustnessOff bea5bd603a66d567ab6f940ab92a878cf3d449d44d4ca8e300ef41956271b1cb members=41 extensions=1 roadmap-2022 restricted Stated dc3f83af671640f6f93547f5e595a81efd20e15be8b01b66847fddba2db1332c members=51 extensions=1 diff --git a/crates/metal2vulkan-validation/src/runtime_lane/mesh_barriers.rs b/crates/metal2vulkan-validation/src/runtime_lane/mesh_barriers.rs index 369fdf5d5..aa70c8392 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/mesh_barriers.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/mesh_barriers.rs @@ -23,8 +23,9 @@ //! On a device without `VK_EXT_mesh_shader` the reader's compute work (its object function, the //! scan, its mesh function) reads what the writer wrote behind the barrier, so it records before //! the reader's own render pass instance, which the barrier began, after the writer's. There the -//! indirect draw of the object reader is refused (`NotImplemented(MeshShading)`); on a device with -//! the extension every indirect draw is (`NotImplemented(IndirectDrawArguments)`). +//! indirect draw of the object reader is refused (`NotImplemented(MeshShading)`). On a device with +//! the extension an indirect draw's arguments pass reads the arguments where the emulation's scan +//! does (`render/mesh_arguments.rs`). use super::render_state::{texels, texture}; use super::{buffer_with, read_buffer, validated_device, Messages, ScratchCache, WAIT}; @@ -36,7 +37,7 @@ use metal2vulkan::pipeline::{ColorAttachmentDescriptor, MeshPipelineDescriptor, use metal2vulkan_devtools::{engine_dir, llvm_assemble}; use metal2vulkan_runtime::{ Buffer, ClearColor, CommandQueue, Device, Error, Library, LoadAction, PipelineOptions, - RenderPassDescriptor, RenderPipelineState, ResourceRef, RuntimeGap, Size, StoreAction, + RenderPassDescriptor, RenderPipelineState, ResourceRef, Size, StoreAction, }; /// the Metal probe's group `g2`, as an M4 printed it without API validation: `PX @@ -323,8 +324,8 @@ impl Lane { } /// Each case draws the pixels and leaves the control words Metal did, behind a barrier after the -/// mesh stage and after the fragment stage (the module docs), but the indirect draws a device -/// refuses, as the module docs say. +/// mesh stage and after the fragment stage (the module docs), but the emulation's indirect draw +/// of the object reader, refused, as the module docs say. #[test] fn readers_behind_a_barrier_read_the_writers_words() { let cache = ScratchCache::new().unwrap(); @@ -337,12 +338,10 @@ fn readers_behind_a_barrier_read_the_writers_words() { let metals = metals(case); match (reader, lane.run(case, (writer, barrier, reader))) { (_, Ok(lines)) => assert_eq!(lines, metals, "{case} on {name}"), - ( - Reader::GridIndirect | Reader::ObjectIndirect, - Err(Error::NotImplemented(RuntimeGap::IndirectDrawArguments)), - ) => eprintln!("{case} on {name}: refused; Metal's: {metals:?}"), (Reader::ObjectIndirect, Err(Error::Bind(BindError::Unsupported(u)))) - if u.feature == Feature::MeshShading && u.needs == Needs::NotImplemented => + if u.feature == Feature::MeshShading + && u.needs == Needs::NotImplemented + && super::mesh_draws::emulates(&lane.device) => { eprintln!("{case} on {name}: refused, emulated; Metal's: {metals:?}") } diff --git a/crates/metal2vulkan-validation/src/runtime_lane/mesh_draws.rs b/crates/metal2vulkan-validation/src/runtime_lane/mesh_draws.rs index afa0fa07c..a34f62306 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/mesh_draws.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/mesh_draws.rs @@ -20,10 +20,15 @@ //! an 8 by 2 grid); a grid with a zero axis draws nothing, and so do threads that fill no //! threadgroup; an object threadgroup that sets no grid launches nothing. //! -//! On a device with `VK_EXT_mesh_shader` an indirect draw is refused -//! (`NotImplemented(IndirectDrawArguments)`) until a GPU pass bounds its counts by the device's -//! limits, and a `drawMeshThreads` that leaves a partial object threadgroup is refused -//! (`NotImplemented(MeshShading)`); Metal's answers for them are printed (a partial object +//! On a device with `VK_EXT_mesh_shader` an indirect draw reads the counts its arguments pass +//! writes, which must draw Metal's words too; a grid Metal draws nothing for (an axis past 65,535, +//! or more than 1,048,575 threadgroups: [`PAST_CASES`], measured on the M3 Max under macOS 27.0.1, +//! direct and indirect alike) draws nothing, and an object threadgroup that sets one launches +//! nothing ([`OBJECT_PAST_CASES`]); an object grid past the device's task limits, which +//! Metal draws, fails the command buffer typed +//! (`CommandBufferError::MeshGridPastLimits`, [`object_grids_past_the_task_limits_fail_typed`]). +//! A `drawMeshThreads` that leaves a partial object threadgroup is refused +//! (`NotImplemented(MeshShading)`); Metal's answers for it are printed (a partial object //! threadgroup runs the threads left). What Metal's validation //! stops draws as plain Metal does: a threadgroup of more than 1024 threads and a misaligned //! argument offset draw nothing, and a draw of the other kind, which stops plain Metal too, is @@ -50,9 +55,9 @@ use metal2vulkan::metal::{PixelFormat, PrimitiveType}; use metal2vulkan::pipeline::{ColorAttachmentDescriptor, MeshPipelineDescriptor, StageSource}; use metal2vulkan_devtools::{engine_dir, llvm_assemble}; use metal2vulkan_runtime::{ - Buffer, ClearColor, CommandQueue, Degradation, Device, DrawProblem, Error, Invalid, Library, - LoadAction, PipelineOptions, Problem, RenderCommandEncoder, RenderPassDescriptor, - RenderPipelineState, RuntimeGap, Size, StoreAction, + Buffer, ClearColor, CommandBufferError, CommandQueue, Degradation, Device, DrawProblem, Error, + Invalid, Library, LoadAction, PipelineOptions, Problem, RenderCommandEncoder, + RenderPassDescriptor, RenderPipelineState, Size, StoreAction, }; /// the Metal probe's group `g3` (`mesh_draws_grid` without an object function), as it printed it on @@ -187,6 +192,45 @@ const GRID_CASES: [(&str, Draw); 7] = [ ("grid-groups-0", Draw::Groups([0, 2, 1], [1; 3], [4, 1, 1])), ]; +/// Grids of `mesh_draws_grid` Metal draws nothing for (the module docs), each `RESULT +/// drawn=0` on the M3 Max: a direct and an indirect grid with an axis past 65,535, and an +/// indirect grid of 2^20 threadgroups. +const PAST_CASES: [(&str, Draw); 4] = [ + ( + "grid-groups-65536", + Draw::Groups([65536, 1, 1], [1; 3], [1, 1, 1]), + ), + ( + "grid-indirect-1x1x65536", + Draw::Indirect([1, 1, 65536], 0, [1; 3], [1, 1, 1]), + ), + ( + "grid-indirect-1024x1024", + Draw::Indirect([1024, 1024, 1], 0, [1; 3], [1, 1, 1]), + ), + ( + "grid-groups-1024x1024", + Draw::Groups([1024, 1024, 1], [1; 3], [1, 1, 1]), + ), +]; + +/// Object draws whose object threadgroups each set a mesh grid Metal launches nothing for (the +/// module docs; `ctl.x + group.x` by `ctl.y`): 1024 by 1024 and 1025 by 1024, 65,536 and 65,537 +/// along `x`. The M3 Max (macOS 27.0.1) launches no mesh threadgroup from an object threadgroup +/// that sets such a grid, whatever the others set. +const OBJECT_PAST_CASES: [(&str, [u32; 4], Draw); 2] = [ + ( + "object-grid-1024x1024", + [1024, 1024, 0, 0], + Draw::Groups([2, 1, 1], [1; 3], [1, 1, 1]), + ), + ( + "object-grid-65536", + [65536, 1, 0, 0], + Draw::Groups([2, 1, 1], [1; 3], [1, 1, 1]), + ), +]; + /// The probe's cases of `mesh_draws_object` and `mesh_draws_mesh`, each with the object /// function's `ctl` (bound at object buffer 0). const OBJECT_CASES: [(&str, [u32; 4], Draw); 6] = [ @@ -401,8 +445,8 @@ fn mesh_refused(refused: &Error, device: &str) -> bool { } } -/// Each grid case draws the words Metal drew (the module docs), but the indirect one where the -/// device has `VK_EXT_mesh_shader`, refused. +/// Each grid case draws the words Metal drew (the module docs), and each of [`PAST_CASES`] +/// nothing. #[test] fn mesh_draws_store_metals_words() { let cache = ScratchCache::new().unwrap(); @@ -424,16 +468,17 @@ fn mesh_draws_store_metals_words() { for (case, draw) in GRID_CASES { let mut held = Vec::new(); let drawn = lane.run(case, &state, |e| encode(&lane.device, e, draw, &mut held)); - match (draw, drawn) { - ( - Draw::Indirect(..), - Err(Error::NotImplemented(RuntimeGap::IndirectDrawArguments)), - ) => { - let metals = metals(GRID_ANSWERS, case); - eprintln!("{case} on {name}: refused; Metal's: {metals:?}"); - } - (_, Ok(lines)) => assert_eq!(lines, metals(GRID_ANSWERS, case), "{case} on {name}"), - (_, Err(error)) => panic!("{case} on {name}: {error}"), + match drawn { + Ok(lines) => assert_eq!(lines, metals(GRID_ANSWERS, case), "{case} on {name}"), + Err(error) => panic!("{case} on {name}: {error}"), + } + } + for (case, draw) in PAST_CASES { + let mut held = Vec::new(); + let drawn = lane.run(case, &state, |e| encode(&lane.device, e, draw, &mut held)); + match drawn { + Ok(lines) => assert_eq!(lines, [format!("RESULT {case} drawn=0")], "{case}"), + Err(error) => panic!("{case} on {name}: {error}"), } } } @@ -445,8 +490,9 @@ fn mesh_draws_store_metals_words() { } /// Each object case draws the words Metal drew (the module docs), but the indirect one and those -/// that leave a partial object threadgroup, refused; a device without `VK_EXT_mesh_shader` -/// announces its emulated draws once ([`EMULATED_MESH`]), and another none. +/// that leave a partial object threadgroup, refused, and each of [`OBJECT_PAST_CASES`] nothing; a +/// device without `VK_EXT_mesh_shader` announces its emulated draws once ([`EMULATED_MESH`]), and +/// another none. #[test] fn object_draws_store_metals_words() { let cache = ScratchCache::new().unwrap(); @@ -475,13 +521,11 @@ fn object_draws_store_metals_words() { }); let metals = metals(OBJECT_ANSWERS, case); match (draw, drawn) { - ( - Draw::Indirect(..), - Err(Error::NotImplemented(RuntimeGap::IndirectDrawArguments)), - ) => eprintln!("{case} on {name}: refused; Metal's: {metals:?}"), // The emulation's indirect draw with an object function. (Draw::Indirect(..), Err(Error::Bind(BindError::Unsupported(u)))) - if u.feature == Feature::MeshShading && u.needs == Needs::NotImplemented => + if u.feature == Feature::MeshShading + && u.needs == Needs::NotImplemented + && emulates(&lane.device) => { eprintln!("{case} on {name}: refused, emulated; Metal's: {metals:?}") } @@ -497,6 +541,18 @@ fn object_draws_store_metals_words() { (_, Err(error)) => panic!("{case} on {name}: {error}"), } } + for (case, ctl, draw) in OBJECT_PAST_CASES { + let mut held = Vec::new(); + let bytes: Vec = ctl.iter().flat_map(|w| w.to_le_bytes()).collect(); + let drawn = lane.run(case, &state, |e| { + e.set_object_bytes(&bytes, 0)?; + encode(&lane.device, e, draw, &mut held) + }); + match drawn { + Ok(lines) => assert_eq!(lines, [format!("RESULT {case} drawn=0")], "{case}"), + Err(error) => panic!("{case} on {name}: {error}"), + } + } // Exactly the emulation's kind where it draws, beside what the state's making forces // (its stages' notes: `FastMathRewrites` on ANV), the `Shared` buffers, and the reads of // each pass's GPU times its timing line prints (`gpu_times::read_kinds`: @@ -519,6 +575,79 @@ fn object_draws_store_metals_words() { ); } +/// An indirect draw of 70,000 object threadgroups, each launching no mesh threadgroup (`ctl` +/// zero), which Metal runs and draws nothing for: on a device whose task stage launches no more +/// than 65,536 along `x` (RADV, lavapipe) the arguments pass draws nothing and the command buffer +/// fails with `CommandBufferError::MeshGridPastLimits`; on one that launches them (NVIDIA's +/// 4,194,304) it completes, drawing nothing; an emulated draw is refused as the object case's. +#[test] +fn object_grids_past_the_task_limits_fail_typed() { + let cache = ScratchCache::new().unwrap(); + let messages = Messages::default(); + { + let device = validated_device(TEST_DEVICE, &messages, cache.path()).unwrap(); + let name = device.name().to_owned(); + let lane = Lane::new(device); + let state = match lane.pipeline(Some("mesh_draws_object"), "mesh_draws_mesh") { + Ok(state) => state, + Err(refused) if mesh_refused(&refused, &name) => return, + Err(error) => panic!("mesh_draws_object on {name}: {error}"), + }; + let counts = [70_000u32, 1, 1]; + let task = lane + .device + .compile_device() + .profile() + .limits() + .mesh + .max_task_work_group_count; + let targets = [0, 1].map(|_| texture(&lane.device, PixelFormat::RGBA32Uint, SIDE)); + let mut pass = RenderPassDescriptor::new(); + for (attachment, target) in pass.color_attachments.iter_mut().zip(&targets) { + attachment.texture = Some(target.clone()); + attachment.load_action = LoadAction::Clear; + attachment.store_action = StoreAction::Store; + } + let ctl = buffer_with(&lane.device, &[0u8; 16]).unwrap(); + let bytes: Vec = counts.iter().flat_map(|w| w.to_le_bytes()).collect(); + let arguments = buffer_with(&lane.device, &bytes).unwrap(); + let command_buffer = lane.queue.command_buffer().unwrap(); + let mut encoder = command_buffer.render_command_encoder(&pass).unwrap(); + encoder.set_render_pipeline_state(&state).unwrap(); + encoder.set_object_buffer(Some(&ctl), 0, 0).unwrap(); + let one = Size::new(1, 1, 1); + let drawn = encoder.draw_mesh_threadgroups_indirect(&arguments, 0, one, Size::new(2, 1, 1)); + encoder.end_encoding().unwrap(); + command_buffer.commit().unwrap(); + command_buffer.wait_until_completed_for(WAIT).unwrap(); + match drawn { + Err(Error::Bind(BindError::Unsupported(u))) + if u.feature == Feature::MeshShading + && u.needs == Needs::NotImplemented + && emulates(&lane.device) => + { + eprintln!("object grid past the task limits on {name}: refused, emulated"); + } + Ok(()) => { + let past = counts[0] > task[0]; + let want = past.then_some(CommandBufferError::MeshGridPastLimits); + assert_eq!(command_buffer.error(), want, "{name}: task limits {task:?}"); + assert!(texels(&targets[0], 16).iter().all(|&b| b == 0), "{name}"); + eprintln!( + "object grid past the task limits on {name} (task limits {task:?}): {:?}", + command_buffer.error() + ); + } + Err(error) => panic!("object grid past the task limits on {name}: {error}"), + } + } + let reported = messages.take(); + assert!( + reported.is_empty(), + "the validation layer reported: {reported:#?}" + ); +} + /// The pixels Metal draws for `cases` drawn in order in one pass, as case `name`: each case's /// pixels from its probe lines (`answers`), a later case's over an earlier one's, since Metal /// rasterizes an encoder's primitives in order and the pass neither blends nor tests depth. diff --git a/crates/metal2vulkan-validation/src/runtime_lane/provoking_mesh.rs b/crates/metal2vulkan-validation/src/runtime_lane/provoking_mesh.rs index 498a6e374..5021c7ad7 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/provoking_mesh.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/provoking_mesh.rs @@ -326,10 +326,14 @@ fn run(withheld: bool, emulated: bool) { .withheld_features .insert(VkFeature::ProvokingVertexLast); } + // The extension's features go with it. if emulated { options .withheld_extensions .insert(VkExtension::ExtMeshShader); + options + .withheld_features + .extend([VkFeature::TaskShader, VkFeature::MeshShader]); } }) .unwrap(); diff --git a/crates/metal2vulkan/src/bind/graphics.rs b/crates/metal2vulkan/src/bind/graphics.rs index 6398a6e2d..31324c23f 100644 --- a/crates/metal2vulkan/src/bind/graphics.rs +++ b/crates/metal2vulkan/src/bind/graphics.rs @@ -276,9 +276,11 @@ //! object stage's `threadgroup_lengths`, 0 where unset), each rounded up to 16 as a kernel's //! are; its arena with them past the object stage's workgroup memory limit is //! `Unsupported{ThreadgroupMemorySize}` naming it (`RuntimeFact::ObjectThreadgroupArena`). A -//! mesh function's arguments, which no encoder sets, are not implemented. An indirect draw asks -//! for its arguments on the CPU, since nothing bounds its GPU-written counts by the device's -//! limits yet. A mesh function writes `Layer` in every variant: a pass of more layers than +//! mesh function's arguments, which no encoder sets, are not implemented. A mesh grid Metal +//! draws nothing for (an axis past 65,535, or more than 1,048,575 threadgroups: +//! `bind::mesh_arguments`) launches nothing. An indirect draw reads the counts an arguments +//! pass writes (`DrawCommands::mesh_arguments`, `MeshArguments`): Metal's where Metal draws +//! them and the device's first stage launches them, else none. A mesh function writes `Layer` in every variant: a pass of more layers than //! `maxMeshOutputLayers`, into which a mesh function choosing its slice could render, is //! `Unsupported{MeshShading}` naming it. A view mapping with a viewport offset, or with a slice //! offset where the mesh function chooses its slice, is not implemented: the mesh function does @@ -309,6 +311,7 @@ use crate::bind::instantiate::{ DescriptorRange, FieldBytes, IndexBufferRef, IndirectRef, PushConstantWrite, PushHole, RangeError, RootTable, }; +use crate::bind::mesh_arguments::{metal_mesh_grid_draws_nothing, MeshArgumentsForm}; use crate::bind::neutral::{zero_buffer_bytes, NeutralResource}; use crate::bind::plan::compute::{internal, not_implemented, spec_key, tile_memory}; use crate::bind::plan::resources::{separate_samplers, ResourcePlanner}; @@ -516,6 +519,15 @@ pub struct DrawCommands { /// chunk draws that replace `draw` ([`TessellationDispatch`] states the consumer contract). /// `None` for every other draw. pub tessellation_dispatch: Option, + /// An indirect mesh draw on a device with `VK_EXT_mesh_shader`, whose first stage's group + /// counts `vkCmdDrawMeshTasksIndirectEXT` requires within the device's limits: the form of + /// the arguments pass the consumer records before the draw + /// ([`MeshArguments`](crate::bind::MeshArguments), which it makes with the device's + /// `minStorageBufferOffsetAlignment`), whose scratch the draw then reads in place of Metal's + /// arguments (`draw` keeps Metal's offset; the consumer substitutes the scratch's buffer and + /// offset). Its read of Metal's 12 bytes is among `uses`, in the compute stage. `None` for + /// every other draw. + pub mesh_arguments: Option, } /// No draw's commands: empty vectors and a draw of no vertices, which @@ -541,6 +553,7 @@ impl Default for DrawCommands { uses: Vec::new(), index_overrun: None, index_bounds_pass: false, + mesh_arguments: None, amplifications: Vec::new(), specialization: None, mesh_dispatch: None, @@ -3172,8 +3185,8 @@ fn size_value(keys: &DispatchKeys, key: SpecKey, l: [u32; 3]) -> Option { /// `maxTaskWorkGroup*`), and a direct one its grid of the first stage's threadgroups /// ([`check_grid`]). A grid the object function sets is bounded in the shader /// (`lower::mesh`). Each stage takes its grid from `NumWorkgroups` (`MultiRegion` 0), as does an -/// indirect draw, whose GPU-written counts the consumer reads on the CPU -/// (`indirect_needs_arguments`). A draw that launches nothing is made with the smallest +/// indirect draw, whose counts its arguments pass writes within the device's limits +/// (`DrawCommands::mesh_arguments`). A draw that launches nothing is made with the smallest /// threadgroups its stages can be made with. fn mesh_draw( t: &MeshTemplate, @@ -3184,6 +3197,16 @@ fn mesh_draw( return Err(internal(format!("a mesh draw of {draw:?}"))); }; let command = match (&t.object, *draw) { + // A mesh grid Metal draws nothing for (`bind::mesh_arguments`). + (None, _) + if matches!(command, vk::DrawCommand::DrawMeshTasks { + group_count_x: x, + group_count_y: y, + group_count_z: z, + } if metal_mesh_grid_draws_nothing([x, y, z])) => + { + mesh_tasks([0; 3], [0; 3]) + } (None, _) => command, (Some(_), _) if mesh_draws_nothing(lo) => mesh_tasks([0; 3], [0; 3]), (Some(_), DrawCall::MeshThreads { threads, .. }) => { @@ -4177,6 +4200,7 @@ fn instantiate( specialization: specialization_out, mesh_dispatch: mesh_dispatch_out, tessellation_dispatch: tessellation_dispatch_out, + mesh_arguments: mesh_arguments_out, } = out; let overrun = index_overrun(t.robust_index_fetch, draw); let (command, base) = vk_draw(draw, overrun); @@ -4573,10 +4597,7 @@ fn instantiate( // The CPU reads the arguments of an indirect draw whose base vertex and instance the profile // emulates, of a multiview plan, or without `drawIndirectFirstInstance`, and of an indexed one - // whose index fetch nothing bounds, which the GPU pass may bound instead. An indirect mesh - // draw's GPU-written group counts must lie within the device's limits - // (`VUID-VkDrawMeshTasksIndirectCommandEXT-TaskEXT-07326` and its siblings), which nothing - // bounds yet. + // whose index fetch nothing bounds, which the GPU pass may bound instead. // An emulated tessellation draw's scan reads its arguments (through their copy), and its // chunk draws are one instance each, from 0. let arguments_elsewhere = @@ -4585,8 +4606,17 @@ fn instantiate( draw, DrawCall::Indirect { .. } | DrawCall::PatchesIndirect { .. } ) - && tessellation_dispatch.is_none() - || matches!(command, vk::DrawCommand::DrawMeshTasksIndirect { .. }); + && tessellation_dispatch.is_none(); + // An indirect mesh draw's GPU-written group counts must lie within the device's limits + // (`VUID-VkDrawMeshTasksIndirectCommandEXT-TaskEXT-07326` and its siblings): the arguments + // pass writes the counts the draw reads. + let mesh_arguments = match (command, &t.mesh) { + (vk::DrawCommand::DrawMeshTasksIndirect { .. }, Some(m)) => Some(match m.object { + Some(_) => MeshArgumentsForm::Object, + None => MeshArgumentsForm::Mesh, + }), + _ => None, + }; let index_unbounded = indirect_indices_unbounded(t.robust_index_fetch, draw); let amplifications = amplification_writes(t)?; let (mesh_dispatch, specialization) = match mesh { @@ -4600,15 +4630,12 @@ fn instantiate( Some(indices) => uses.push(indices), None => draw_uses(uses, draw, overrun, t.tessellation.as_ref()), } - // A mesh draw that reads its arguments reads 12 bytes; an emulated one's scan reads them in - // the compute stage. - if let vk::DrawCommand::DrawMeshTasksIndirect { .. } = command { - uses.push(indirect_use(12)); - } + // An indirect mesh draw's arguments pass, or an emulated one's scan, reads Metal's 12 bytes + // in the compute stage. let scanned = mesh_dispatch .as_ref() .is_some_and(|d| matches!(d.mesh, MeshGroups::Scanned { arguments: Some(_) })); - if scanned { + if scanned || mesh_arguments.is_some() { uses.push(ResourceUse { resource: UseTarget::Indirect, access: AccessSet::READ, @@ -4619,6 +4646,7 @@ fn instantiate( } *indirect_needs_arguments = arguments_elsewhere || index_unbounded; *index_bounds_pass = index_unbounded && !arguments_elsewhere; + *mesh_arguments_out = mesh_arguments; *draw_command = command; *overrun_out = overrun; *amplifications_out = amplifications; diff --git a/crates/metal2vulkan/src/bind/graphics/tests.rs b/crates/metal2vulkan/src/bind/graphics/tests.rs index a6ea60c1d..29f253a4a 100644 --- a/crates/metal2vulkan/src/bind/graphics/tests.rs +++ b/crates/metal2vulkan/src/bind/graphics/tests.rs @@ -1709,8 +1709,8 @@ fn object_draws_specialize_each_stage_within_its_limits() { ] { assert_eq!(instantiate(&t, &state, &draw).err(), refusal, "{draw:?}"); } - // Indirect: its object threadgroups' counts, read on the CPU; an object threadgroup Metal - // draws nothing for reads none. + // Indirect: its object threadgroups' counts, through the object form of the arguments pass; + // an object threadgroup Metal draws nothing for reads none. let indirect = |lo| DrawCall::MeshThreadgroupsIndirect { indirect: IndirectRef::new(1, 12), threads_per_object_group: lo, @@ -1721,19 +1721,21 @@ fn object_draws_specialize_each_stage_within_its_limits() { cmds.draw, vk::DrawCommand::DrawMeshTasksIndirect { offset: 12, .. } )); - assert!(cmds.indirect_needs_arguments && cmds.uses.len() == 1); + assert!(!cmds.indirect_needs_arguments && cmds.uses.len() == 1); + assert_eq!(cmds.mesh_arguments, Some(MeshArgumentsForm::Object)); let cmds = instantiate(&t, &state, &indirect([0, 1, 1])).expect("indirect nothing"); assert_eq!(cmds.draw, tasks(0, 0, 0)); - assert!(cmds.uses.is_empty() && !cmds.indirect_needs_arguments); + assert!(cmds.uses.is_empty() && cmds.mesh_arguments.is_none()); } /// A mesh draw is `vkCmdDrawMeshTasksEXT` of its threadgroups, made with its threadgroup's size as /// its specialization (`MultiRegion` 0 beside the plan's constants) and writing its grid in /// `DispatchRegion`; `drawMeshThreads` launches the whole threadgroups its threads fill, and writes /// their threads as its grid where the threads leave a partial threadgroup (Metal's builtins report -/// them, a probe); what Metal draws nothing for launches nothing; the device's mesh limits refuse -/// typed; an indirect draw reads 12 bytes of arguments, on the CPU; and a mesh draw of any other -/// pipeline, or another draw of a mesh pipeline, is `InvalidMeshDraw`. +/// them, a probe); what Metal draws nothing for launches nothing, a grid with an axis past 65,535 +/// or of more than 1,048,575 threadgroups among it; the device's mesh limits refuse typed; an +/// indirect draw's arguments pass reads 12 bytes of arguments in the compute stage; and a mesh +/// draw of any other pipeline, or another draw of a mesh pipeline, is `InvalidMeshDraw`. #[test] fn mesh_draws_specialize_their_threadgroup_within_the_device() { let state = BindState::default(); @@ -1799,13 +1801,16 @@ fn mesh_draws_specialize_their_threadgroup_within_the_device() { .expect("region") .to_vec() ); - // Metal draws nothing: no thread, past 1024 threads, no threadgroup. Past the device's 256 - // threads but within Metal's 1024 is the device's limit. + // Metal draws nothing: no thread, past 1024 threads, no threadgroup, a grid past Metal's + // (`bind::mesh_arguments`). Past the device's 256 threads but within Metal's 1024 is the + // device's limit. for (draw, what) in [ (mesh([3, 1, 1], [0, 1, 1]), "no thread"), (mesh([3, 1, 1], [1025, 1, 1]), "past 1024"), (mesh([3, 0, 1], [512, 1, 1]), "no threadgroup"), (threads([15, 1, 1], [16, 1, 1]), "no whole threadgroup"), + (mesh([1, 65536, 1], [1; 3]), "65,536 along y"), + (mesh([65535, 65535, 1], [1; 3]), "past Metal's total"), ] { let cmds = instantiate(&t, &state, &draw).expect(what); let vk::DrawCommand::DrawMeshTasks { @@ -1846,14 +1851,6 @@ fn mesh_draws_specialize_their_threadgroup_within_the_device() { mesh([1; 3], [16, 32, 1]), limit(VkLimit::MaxMeshWorkGroupInvocations, 512, 256), ), - ( - mesh([1, 65536, 1], [1; 3]), - limit(VkLimit::MaxMeshWorkGroupCount(1), 65536, 65535), - ), - ( - mesh([65535, 65535, 1], [1; 3]), - limit(VkLimit::MaxMeshWorkGroupTotalCount, 65535 * 65535, 1 << 22), - ), ] { assert_eq!(instantiate(&t, &state, &draw).err(), refusal, "{draw:?}"); } @@ -1872,8 +1869,13 @@ fn mesh_draws_specialize_their_threadgroup_within_the_device() { // A draw that launches nothing takes a threadgroup the stage can be made with. let cmds = instantiate(&flat, &state, &mesh([1; 3], [0, 1, 1])).expect("nothing"); assert!(values(cmds.specialization.as_ref().expect("key")).contains(&(5, 32))); - // Indirect: 12 bytes of arguments, read on the CPU; at an offset that is not a multiple of 4, - // nothing. + // A grid Metal draws nothing for launches nothing, past the device's limits too. + for groups in [[65536, 1, 1], [1024, 1024, 1], [1, 1, 70000]] { + let cmds = instantiate(&t, &state, &mesh(groups, [32, 1, 1])).expect("nothing"); + assert_eq!(cmds.draw, tasks(0, 0, 0), "{groups:?}"); + } + // Indirect: 12 bytes of arguments, read by the mesh form of the arguments pass; at an offset + // that is not a multiple of 4, nothing. let indirect = |offset| DrawCall::MeshThreadgroupsIndirect { indirect: IndirectRef::new(1, offset), threads_per_object_group: [1; 3], @@ -1888,20 +1890,21 @@ fn mesh_draws_specialize_their_threadgroup_within_the_device() { stride: 12, } ); - assert!(cmds.indirect_needs_arguments && !cmds.index_bounds_pass); + assert!(!cmds.indirect_needs_arguments && !cmds.index_bounds_pass); + assert_eq!(cmds.mesh_arguments, Some(MeshArgumentsForm::Mesh)); assert_eq!( cmds.uses, [ResourceUse { resource: UseTarget::Indirect, access: AccessSet::READ, - class: AccessClass::Indirect, - stages: vk::PipelineStageFlags2::DRAW_INDIRECT, + class: AccessClass::Storage, + stages: vk::PipelineStageFlags2::COMPUTE_SHADER, range: Some(ByteRange { offset: 0, len: 12 }), }] ); let cmds = instantiate(&t, &state, &indirect(2)).expect("misaligned"); assert_eq!(cmds.draw, tasks(0, 0, 0)); - assert!(cmds.uses.is_empty() && !cmds.indirect_needs_arguments); + assert!(cmds.uses.is_empty() && cmds.mesh_arguments.is_none()); // A draw of primitives with a mesh pipeline, and a mesh draw with another. assert_eq!( instantiate(&t, &state, &primitives(0, 3, (0, 1))).err(), diff --git a/crates/metal2vulkan/src/bind/mesh_arguments.rs b/crates/metal2vulkan/src/bind/mesh_arguments.rs new file mode 100644 index 000000000..57954a176 --- /dev/null +++ b/crates/metal2vulkan/src/bind/mesh_arguments.rs @@ -0,0 +1,419 @@ +//! The arguments pass of an indirect mesh draw on a device with `VK_EXT_mesh_shader`. +//! +//! `drawMeshThreadgroupsWithIndirectBuffer:` reads its group counts (an +//! `MTLDispatchThreadgroupsIndirectArguments`) as it runs. `vkCmdDrawMeshTasksIndirectEXT` requires +//! every count within the device's task or mesh limits, so the draw cannot read Metal's arguments +//! in place: the consumer records [`MeshArguments`] first, one invocation of the crate-owned +//! module [`mesh_arguments_module`] that reads Metal's three words and writes the +//! `VkDrawMeshTasksIndirectCommandEXT` the draw reads into a consumer-provided scratch of +//! [`MeshArguments::SCRATCH_BYTES`]. +//! +//! **What Metal draws**, measured by our probe on an M3 Max (macOS 27.0.1), direct and indirect +//! draws alike, with and without API validation, which stops none of them: +//! +//! - Without an object function the counts are the mesh grid. A grid with an axis past +//! [`METAL_MESH_GRID_AXIS`] (65,535) draws nothing; so does one of exactly 2^20 threadgroups +//! (1024 by 1024, 128 by 128 by 64, 4096 by 256) and every one measured of 2^21 or more. Grids +//! of up to [`METAL_MESH_GRID_TOTAL`] (1,048,575, Apple's limit for the family) draw whole. Past +//! that Metal is erratic (17 by 61,681 and 65,535 by 24 drew, 1025 by 1025 and 33 by 32,768 did +//! not), and the module draws nothing, Metal's answer at 2^20 and above 2^21. +//! - With an object function the counts are the object grid, which Metal draws at every count +//! measured (16,777,216 along `x`). The mesh grid an object threadgroup sets follows the rule +//! above (65,536 along `x` or `y`, 1024 by 1024 and 2048 by 1024 launch nothing from it; 1023 by +//! 1025 and 65,535 by 16 launch whole), which the object function's lowering holds it to +//! (`lower::mesh`). +//! +//! **The module's rule** ([`MeshGridRule`], its constants): where Metal draws nothing, it writes +//! zero counts, which draw nothing. Where Metal draws and the counts lie within the device's +//! limits for the first stage (`maxMeshWorkGroupCount` and `maxMeshWorkGroupTotalCount`, or the +//! task stage's), it copies them. Where Metal draws and they do not (an object grid past the task +//! stage's limits), it writes zero counts and sets `MESH_GRID_PAST_LIMITS` in the command buffer's +//! `ExecutionStatus`, which the consumer reports as a command-buffer error: Metal draws them. +//! Every committed profile with the extension holds Metal's mesh grids within its mesh limits. +//! +//! **The module** (fixed per device and form): one `GLCompute` entry `main` with local size +//! `(1, 1, 1)`, no loops, three storage buffers in set 0 and one push constant: +//! +//! | Binding | Buffer | Range | +//! |---|---|---| +//! | [`MeshArgumentsModule::SOURCE_BINDING`] | the Metal indirect buffer | [`MeshArguments::source_range`] | +//! | [`MeshArgumentsModule::SCRATCH_BINDING`] | the consumer's scratch | [`MeshArguments::SCRATCH_BYTES`] | +//! | [`MeshArgumentsModule::STATUS_BINDING`] | the `ExecutionStatus` buffer | `ExecutionStatus::BYTES` | +//! +//! The push constant ([`MeshArguments::push_constants`], `COMPUTE`, offset 0) is the byte distance +//! from the bound source range's start to the arguments (a multiple of 4), since a storage +//! descriptor's offset must be a multiple of `minStorageBufferOffsetAlignment` where Metal's +//! argument offset is only 4-aligned. Reads of the source are contained (an index past the bound +//! range reads 0). +//! +//! **Synchronization** (consumer): the source write → `SHADER_READ` in `COMPUTE_SHADER` before +//! the pass; the scratch `SHADER_WRITE` → `INDIRECT_COMMAND_READ` in `DRAW_INDIRECT` between the +//! pass and the draw. + +use std::sync::Arc; + +use crate::bind::instantiate::{BufferRange, IndirectRef}; +use crate::bind::replay::checked_mul; +use crate::bind::status::{StatusBits, StatusWord}; +use crate::budget::{Budget, Meter}; +use crate::device::requirements::Requirements; +use crate::device::Device; +use crate::error::{Error, InternalError, InternalKind}; +use crate::pipeline::sym::{ + PushField, ResourceKind, ResourceSlot, SlotClass, SlotRef, Stage, Symbol, SyntheticBinding, +}; +use crate::spirv::builder::constructs::{ArmEnd, ArmFn}; +use crate::spirv::builder::{FunctionBuilder, ModuleBuilder}; +use crate::spirv::error::BResult; +use crate::spirv::ids::{GlobalId, TypeId, Value}; +use crate::spirv::ir::{ + natural_layout, AtomicOp, BinOp, ConstBits, Constant, ExecMode, ExecModel, LayoutRule, + MemAccess, Scope, Semantics, StorageClass, Type, TypedModule, UnOp, +}; + +/// The most mesh threadgroups along an axis of a grid Metal draws without an object function +/// (the module docs). +pub const METAL_MESH_GRID_AXIS: u32 = 65_535; + +/// The most mesh threadgroups of a grid Metal draws whole without an object function (the module +/// docs). +pub const METAL_MESH_GRID_TOTAL: u32 = 1_048_575; + +/// Whether Metal draws nothing for a mesh grid of `groups` without an object function: an axis +/// past [`METAL_MESH_GRID_AXIS`], or more than [`METAL_MESH_GRID_TOTAL`] threadgroups. +pub(crate) fn metal_mesh_grid_draws_nothing(groups: [u32; 3]) -> bool { + let total: u128 = groups.iter().map(|&g| u128::from(g)).product(); + groups.iter().any(|&g| g > METAL_MESH_GRID_AXIS) || total > u128::from(METAL_MESH_GRID_TOTAL) +} + +/// The first stage of an indirect mesh draw, whose threadgroups Metal's arguments count. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub enum MeshArgumentsForm { + /// The mesh function's, of a pipeline without an object function. + Mesh, + /// The object function's. + Object, +} + +/// A grid's limits: the largest count along each axis, and the largest product. +#[non_exhaustive] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub struct MeshGridLimits { + /// The largest count along `x`, `y` and `z`. + pub axes: [u32; 3], + /// The largest product of the three counts. + pub total: u32, +} + +/// What [`mesh_arguments_module`] of one form holds the counts to (the module docs): Metal's +/// limits, past which it draws nothing, and the device's for the draw's first stage. +#[non_exhaustive] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub struct MeshGridRule { + /// Metal's limits, or `None` where Metal draws every grid (an object grid). + pub metal: Option, + /// The device's limits for the first stage: mesh or task. + pub device: MeshGridLimits, +} + +impl MeshGridRule { + /// The rule of `form` on a device of `limits`. + pub fn of(form: MeshArgumentsForm, limits: &crate::device::MeshLimits) -> MeshGridRule { + match form { + MeshArgumentsForm::Mesh => MeshGridRule { + metal: Some(MeshGridLimits { + axes: [METAL_MESH_GRID_AXIS; 3], + total: METAL_MESH_GRID_TOTAL, + }), + device: MeshGridLimits { + axes: limits.max_mesh_work_group_count, + total: limits.max_mesh_work_group_total_count, + }, + }, + MeshArgumentsForm::Object => MeshGridRule { + metal: None, + device: MeshGridLimits { + axes: limits.max_task_work_group_count, + total: limits.max_task_work_group_total_count, + }, + }, + } + } +} + +/// An arguments pass the consumer records before an indirect mesh draw on a device with +/// `VK_EXT_mesh_shader`: one invocation of [`mesh_arguments_module`] of the draw's form reads +/// Metal's arguments at `source` and writes the draw's `VkDrawMeshTasksIndirectCommandEXT` into a +/// consumer-provided scratch of [`MeshArguments::SCRATCH_BYTES`], from which the draw +/// (`DrawCommand::DrawMeshTasksIndirect` at offset 0) reads. +#[non_exhaustive] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct MeshArguments { + pub source: IndirectRef, + /// The module of the draw's first stage. + pub form: MeshArgumentsForm, + /// The range of the source buffer to bind at [`MeshArgumentsModule::SOURCE_BINDING`]: from + /// `source.offset` aligned down to `minStorageBufferOffsetAlignment` (and to 4) through the + /// 12 argument bytes. + pub source_range: BufferRange, + /// The push constant bytes (`COMPUTE`, offset 0): the arguments' byte offset inside + /// `source_range`. + pub push_constants: [u8; 4], +} + +impl MeshArguments { + /// Bytes of the scratch the draw's arguments are written to + /// (`VkDrawMeshTasksIndirectCommandEXT`). + pub const SCRATCH_BYTES: u32 = 12; + + /// The pass for Metal arguments at `source` of a draw whose first stage is `form`, with the + /// source bound at an offset aligned to `alignment` (`minStorageBufferOffsetAlignment`). + /// `None` when `source.offset` is not a multiple of 4 (such a draw draws nothing) or the range + /// overflows. + pub fn new(source: IndirectRef, form: MeshArgumentsForm, alignment: u64) -> Option { + if !source.offset.is_multiple_of(4) { + return None; + } + let a = alignment.max(4); + let start = source.offset - source.offset % a; + let residual = u32::try_from(source.offset - start).ok()?; + let end = source.offset.checked_add(u64::from(Self::SCRATCH_BYTES))?; + Some(MeshArguments { + source, + form, + source_range: BufferRange { + offset: start, + range: end - start, + }, + push_constants: residual.to_le_bytes(), + }) + } +} + +/// The crate-owned arguments module of one device and form, validated like any output. +#[non_exhaustive] +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct MeshArgumentsModule { + /// SPIR-V 1.5 words, entry point `main`, bindings numbered as below in set 0. + pub spirv: Arc<[u32]>, + /// What the module needs from the device (within every Vulkan 1.2 device). + pub requirements: Requirements, + /// The rule its constants hold. + pub rule: MeshGridRule, +} + +impl MeshArgumentsModule { + /// Descriptor set of every binding. + pub const SET: u32 = 0; + /// The Metal indirect buffer, a storage buffer. + pub const SOURCE_BINDING: u32 = 0; + /// The consumer's scratch (`VkDrawMeshTasksIndirectCommandEXT`), a storage buffer. + pub const SCRATCH_BINDING: u32 = 1; + /// The command buffer's `ExecutionStatus` buffer, a storage buffer. + pub const STATUS_BINDING: u32 = 2; + /// Bytes of the `COMPUTE` push-constant range at offset 0. + pub const PUSH_BYTES: u32 = 4; +} + +/// The binding symbol of the source buffer ([`MeshArgumentsModule::SOURCE_BINDING`]). +pub const SOURCE: ResourceSlot = ResourceSlot { + stage: Stage::Kernel, + kind: ResourceKind::Buffer, + index: 0, +}; +/// The binding symbol of the scratch buffer ([`MeshArgumentsModule::SCRATCH_BINDING`]). +pub const SCRATCH: ResourceSlot = ResourceSlot { + stage: Stage::Kernel, + kind: ResourceKind::Buffer, + index: 1, +}; +/// The binding symbol of the status buffer ([`MeshArgumentsModule::STATUS_BINDING`]). +pub const STATUS: ResourceSlot = ResourceSlot { + stage: Stage::Kernel, + kind: ResourceKind::Synthetic(SyntheticBinding::ExecutionStatus), + index: 0, +}; +/// The push field of the source residual, as a descriptor slot's residual bind offset. +const RESIDUAL: PushField = PushField::SlotBindOffset(SlotRef { + stage: Stage::Kernel, + class: SlotClass::Buffer, + index: 0, +}); + +/// A `Block { u32 words[]; }` storage buffer bound at `sym`. +fn words_buffer(b: &mut ModuleBuilder, sym: ResourceSlot, u32_: TypeId) -> BResult { + let rta = b.ty(Type::RuntimeArray { + elem: u32_, + stride: Some(4), + })?; + let layout = natural_layout(b.types(), LayoutRule::Std430, true, &[rta])?; + let block = b.ty(Type::Struct { + members: [rta].into(), + layout: Some(layout), + })?; + b.resource(sym, StorageClass::StorageBuffer, block) +} + +fn u32_value(f: &mut FunctionBuilder<'_>, v: u32) -> BResult { + let c = f.u32_const(v)?; + f.module().const_value(c) +} + +/// Whether `v`'s product is at most `total`, without overflow and without a division: a zero +/// count's product is 0, and otherwise the product is within where neither multiplication's high +/// word is set and its low word is at most `total` (`checked_mul`, as `bind::replay`'s). +fn total_within(f: &mut FunctionBuilder<'_>, v: [Value; 3], total: u32) -> BResult { + let zero = u32_value(f, 0)?; + let t = u32_value(f, total)?; + let mut any_zero = f.binary(BinOp::IEqual, v[0], zero)?; + for &c in &v[1..] { + let z = f.binary(BinOp::IEqual, c, zero)?; + any_zero = f.binary(BinOp::LogicalOr, any_zero, z)?; + } + let (xy, over_xy) = checked_mul(f, v[0], v[1], zero)?; + let (xyz, over_xyz) = checked_mul(f, xy, v[2], zero)?; + let over = f.binary(BinOp::LogicalOr, over_xy, over_xyz)?; + let le = f.binary(BinOp::ULessThanEqual, xyz, t)?; + let fits = f.unary(UnOp::LogicalNot, over)?; + let fits = f.binary(BinOp::LogicalAnd, fits, le)?; + f.binary(BinOp::LogicalOr, any_zero, fits) +} + +/// Whether each of `v` is at most its axis of `limits`, and their product at most its total. +fn grid_within( + f: &mut FunctionBuilder<'_>, + v: [Value; 3], + limits: MeshGridLimits, +) -> BResult { + let mut within = total_within(f, v, limits.total)?; + for (c, axis) in v.into_iter().zip(limits.axes) { + let a = u32_value(f, axis)?; + let le = f.binary(BinOp::ULessThanEqual, c, a)?; + within = f.binary(BinOp::LogicalAnd, within, le)?; + } + Ok(within) +} + +/// The `bool` constant `true`. +fn truth(f: &mut FunctionBuilder<'_>) -> BResult { + let ty = f.module().ty(Type::Bool)?; + let c = f.module().constant(Constant::Scalar { + ty, + bits: ConstBits(1), + })?; + f.module().const_value(c) +} + +/// The arguments module for `rule` as a typed module, before serialization: the module +/// [`mesh_arguments_module`] serializes, which the CPU interpreter runs. Its bindings are the +/// symbols [`SOURCE`], [`SCRATCH`] and [`STATUS`]; its push field is the source residual at +/// offset 0. +pub fn typed_module(rule: MeshGridRule) -> BResult { + let mut b = ModuleBuilder::new(); + let u32_ = b.ty(Type::Int { + width: 32, + signed: false, + })?; + let source = words_buffer(&mut b, SOURCE, u32_)?; + let scratch = words_buffer(&mut b, SCRATCH, u32_)?; + let status = words_buffer(&mut b, STATUS, u32_)?; + let residual = b.push_member(RESIDUAL, u32_, 0)?; + let push = b.push_global()?; + let void = b.ty(Type::Void)?; + let mut f = b.function(void)?; + let zero = u32_value(&mut f, 0)?; + let two = u32_value(&mut f, 2)?; + let push_value = f.module().global_value(push)?; + let member = u32_value(&mut f, residual.index)?; + let residual_ptr = f.access_chain(push_value, &[member])?; + let residual_bytes = f.load(residual_ptr, MemAccess::default())?; + let first = f.binary(BinOp::ShiftRightLogical, residual_bytes, two)?; + let source_value = f.module().global_value(source)?; + let len = f.array_length(source_value, 0)?; + let mut v = [zero; 3]; + for (axis, out) in v.iter_mut().enumerate() { + let i = u32_value(&mut f, axis as u32)?; + let index = f.binary(BinOp::IAdd, first, i)?; + // Contained: an index past the bound range reads word 0 and yields 0. + let inb = f.binary(BinOp::ULessThan, index, len)?; + let safe = f.select(inb, index, zero)?; + let p = f.access_chain(source_value, &[zero, safe])?; + let loaded = f.load(p, MemAccess::default())?; + *out = f.select(inb, loaded, zero)?; + } + let metal = match rule.metal { + Some(limits) => grid_within(&mut f, v, limits)?, + None => truth(&mut f)?, + }; + let device = grid_within(&mut f, v, rule.device)?; + let drawn = f.binary(BinOp::LogicalAnd, metal, device)?; + let scratch_value = f.module().global_value(scratch)?; + for (axis, c) in v.into_iter().enumerate() { + let i = u32_value(&mut f, axis as u32)?; + let count = f.select(drawn, c, zero)?; + let out = f.access_chain(scratch_value, &[zero, i])?; + f.store(out, count, MemAccess::default())?; + } + // Metal draws the grid, and the device's first stage cannot launch it. + let past = f.binary(BinOp::LogicalNotEqual, metal, drawn)?; + let status_value = f.module().global_value(status)?; + let word = u32_value(&mut f, StatusWord::Status.index())?; + let bit = u32_value(&mut f, StatusBits::MESH_GRID_PAST_LIMITS.0)?; + let then: ArmFn<'_, ()> = Box::new(move |fb, _| { + let p = fb.access_chain(status_value, &[zero, word])?; + fb.atomic(AtomicOp::Or, p, Scope::Device, Semantics::RELAXED, bit)?; + Ok(ArmEnd::FallThrough(Vec::new())) + }); + f.if_(&mut (), past, then, None)?; + f.ret(None)?; + let id = f.finish()?; + b.entry( + ExecModel::GLCompute, + id, + vec![ExecMode::LocalSize { x: 1, y: 1, z: 1 }], + )?; + b.finalize() +} + +/// The fixed binding numbers of the module's symbols. +fn binding_of(sym: &Symbol) -> Option { + match sym { + Symbol::DescriptorSet(_) => Some(MeshArgumentsModule::SET), + Symbol::Binding(s) if *s == SOURCE => Some(MeshArgumentsModule::SOURCE_BINDING), + Symbol::Binding(s) if *s == SCRATCH => Some(MeshArgumentsModule::SCRATCH_BINDING), + Symbol::Binding(s) if *s == STATUS => Some(MeshArgumentsModule::STATUS_BINDING), + _ => None, + } +} + +/// The arguments module of `device` for draws whose first stage is `form`: built with the typed +/// builder, checked by the owned verifier against the device's profile (requirements included), +/// serialized, and numbered with the fixed bindings of [`MeshArgumentsModule`]. +pub fn mesh_arguments_module( + device: &Device, + form: MeshArgumentsForm, +) -> Result { + let profile = device.profile(); + let rule = MeshGridRule::of(form, &profile.fields().limits.mesh); + let m = typed_module(rule)?; + let mut meter = Meter::new(&Budget::default()); + crate::spirv::verify::verify(&m, profile, &mut meter)?; + let r = crate::spirv::serialize::serialize(m)?; + profile.check(&r.requirements).map_err(|c| { + Error::Internal(InternalError::new( + InternalKind::RequirementsExceedProfile, + format!("the mesh arguments pass needs {c:?}"), + )) + })?; + let words = crate::spirv::serialize::relocate(&r, &binding_of)?; + Ok(MeshArgumentsModule { + spirv: words.into(), + requirements: r.requirements, + rule, + }) +} + +#[cfg(test)] +mod tests; diff --git a/crates/metal2vulkan/src/bind/mesh_arguments/tests.rs b/crates/metal2vulkan/src/bind/mesh_arguments/tests.rs new file mode 100644 index 000000000..07c32270c --- /dev/null +++ b/crates/metal2vulkan/src/bind/mesh_arguments/tests.rs @@ -0,0 +1,171 @@ +//! The mesh arguments module: valid on every committed profile with `VK_EXT_mesh_shader`, and +//! Metal's rule on the CPU interpreter (copied, zeroed, and zeroed with `MESH_GRID_PAST_LIMITS`), +//! including the source residual and a short range. + +use super::*; +use crate::bind::status::{ExecutionStatus, StatusReport}; +use crate::device::VkExtension; +use crate::spirv::interp::{run, Buffer, Config, Order, Resources}; +use crate::spirv::testing::{assert_valid, committed_profiles}; + +fn words(bytes: &[u8]) -> Vec { + bytes + .as_chunks::<4>() + .0 + .iter() + .map(|c| u32::from_le_bytes(*c)) + .collect() +} + +/// Run the module of `rule` over `source` (bound whole) with push `residual`: the scratch's +/// counts and the status report. +fn pass(rule: MeshGridRule, source: &[u32], residual: u32) -> ([u32; 3], StatusReport) { + let m = typed_module(rule).expect("module"); + let mut out = Vec::new(); + for order in [Order::Forward, Order::Reverse] { + let res = Resources { + buffers: vec![ + Buffer { + slot: Some(SOURCE), + address: None, + bytes: source.iter().flat_map(|w| w.to_le_bytes()).collect(), + }, + Buffer { + slot: Some(SCRATCH), + address: None, + bytes: vec![0xEE; 16], + }, + Buffer { + slot: Some(STATUS), + address: None, + bytes: ExecutionStatus::initial().to_vec(), + }, + ], + push: residual.to_le_bytes().to_vec(), + spec: Default::default(), + }; + let cfg = Config { + order, + ..Config::default() + }; + out.push(run(&m, &cfg, res).expect("run").buffers); + } + assert_eq!(out[0], out[1], "order independent"); + let b = &out[0]; + let scratch = words(&b[1]); + assert_eq!(scratch[3], 0xEEEE_EEEE, "the pass writes 12 bytes only"); + let status: [u8; 32] = b[2].as_slice().try_into().expect("status"); + ( + [scratch[0], scratch[1], scratch[2]], + ExecutionStatus::decode(&status), + ) +} + +/// RADV's mesh and task limits on the Radeon 780M. +fn radv() -> crate::device::MeshLimits { + crate::device::MeshLimits { + max_task_work_group_count: [65535; 3], + max_task_work_group_total_count: 4_194_304, + max_mesh_work_group_count: [65535; 3], + max_mesh_work_group_total_count: 4_194_304, + ..Default::default() + } +} + +#[test] +fn the_module_is_valid_on_every_committed_profile_with_mesh_shading() { + for (name, p) in committed_profiles().expect("profiles") { + if !p + .fields() + .enabled + .extensions + .contains(&VkExtension::ExtMeshShader) + { + continue; + } + for form in [MeshArgumentsForm::Mesh, MeshArgumentsForm::Object] { + let rule = MeshGridRule::of(form, &p.fields().limits.mesh); + // Every such profile launches each mesh grid Metal draws. + if form == MeshArgumentsForm::Mesh { + assert!( + rule.device.axes.iter().all(|&a| a >= METAL_MESH_GRID_AXIS) + && rule.device.total >= METAL_MESH_GRID_TOTAL, + "{name}: {rule:?}" + ); + } + assert_valid(typed_module(rule).expect("module"), &p); + } + } +} + +/// Metal's mesh grids (the module docs): drawn up to 65,535 an axis and 1,048,575 in all, else +/// nothing, with no fault. +#[test] +fn a_mesh_grid_draws_as_metal_s() { + let rule = MeshGridRule::of(MeshArgumentsForm::Mesh, &radv()); + for (counts, drawn) in [ + ([3, 1, 1], true), + ([65535, 1, 1], true), + ([1, 65535, 1], true), + ([1, 1, 65535], true), + ([1023, 1025, 1], true), + ([16, 65535, 1], true), + ([41, 41, 39], true), + ([0, 5, 1], true), + ([65536, 1, 1], false), + ([1, 1, 65536], false), + ([1024, 1024, 1], false), + ([128, 128, 64], false), + ([4096, 1024, 1], false), + ([u32::MAX, u32::MAX, u32::MAX], false), + ([65535, 65535, 65535], false), + ] { + let (out, report) = pass(rule, &counts, 0); + let want = if drawn { counts } else { [0; 3] }; + assert_eq!(out, want, "{counts:?}"); + assert!(!report.mesh_grid_past_limits, "{counts:?}"); + assert_eq!(metal_mesh_grid_draws_nothing(counts), !drawn, "{counts:?}"); + } +} + +/// An object grid Metal draws at every count: copied within the task limits, else zeroed and +/// reported. +#[test] +fn an_object_grid_past_the_task_limits_is_reported() { + let rule = MeshGridRule::of(MeshArgumentsForm::Object, &radv()); + for (counts, within) in [ + ([3, 1, 1], true), + ([65535, 64, 1], true), + ([2048, 2048, 1], true), + ([0, 70000, 1], false), + ([65536, 1, 1], false), + ([2048, 2049, 1], false), + ([u32::MAX, 2, 1], false), + ] { + let (out, report) = pass(rule, &counts, 0); + let want = if within { counts } else { [0; 3] }; + assert_eq!(out, want, "{counts:?}"); + assert_eq!(report.mesh_grid_past_limits, !within, "{counts:?}"); + } +} + +#[test] +fn the_residual_selects_the_arguments_and_a_short_range_reads_zero() { + let rule = MeshGridRule::of(MeshArgumentsForm::Mesh, &radv()); + let (out, _) = pass(rule, &[9, 9, 3, 4, 5, 9], 8); + assert_eq!(out, [3, 4, 5]); + let (out, report) = pass(rule, &[500, 2], 4); + assert_eq!(out, [2, 0, 0]); + assert!(!report.mesh_grid_past_limits); +} + +#[test] +fn the_pass_binds_an_aligned_source_range() { + let form = MeshArgumentsForm::Mesh; + let a = MeshArguments::new(IndirectRef::new(3, 300), form, 256).expect("pass"); + assert_eq!((a.source_range.offset, a.source_range.range), (256, 56)); + assert_eq!(u32::from_le_bytes(a.push_constants), 44); + let a = MeshArguments::new(IndirectRef::new(3, 12), form, 1).expect("pass"); + assert_eq!((a.source_range.offset, a.source_range.range), (12, 12)); + assert_eq!(MeshArguments::new(IndirectRef::new(3, 2), form, 4), None); +} diff --git a/crates/metal2vulkan/src/bind/mesh_scan.rs b/crates/metal2vulkan/src/bind/mesh_scan.rs index 5825cd53a..691d989fe 100644 --- a/crates/metal2vulkan/src/bind/mesh_scan.rs +++ b/crates/metal2vulkan/src/bind/mesh_scan.rs @@ -5,7 +5,7 @@ //! One workgroup of [`MeshScanModule::LOCAL_SIZE`] invocations reads the draw's work buffer //! (`SyntheticBinding::MeshWork`, [`MeshDispatch::work`](crate::bind::MeshDispatch::work)): the //! grid each of its `O` object threadgroups set (slot 0's, of an indirect draw, from Metal's -//! arguments, held to Metal's limit of 1048576 threadgroups as an object function's grid is), and +//! arguments, held to Metal's limits on a mesh grid as an object function's grid is), and //! writes, after the slots: //! //! - each object threadgroup's first mesh threadgroup, in object threadgroup order, and `T`, the @@ -40,12 +40,13 @@ use std::sync::Arc; use crate::bind::index_bounds::finished; +use crate::bind::mesh_arguments::{METAL_MESH_GRID_AXIS, METAL_MESH_GRID_TOTAL}; use crate::bind::replay::checked_mul; use crate::bind::status::{StatusBits, StatusWord}; use crate::device::requirements::Requirements; use crate::device::Device; use crate::error::Error; -use crate::lower::mesh::work::{self, METAL_MESH_GRID_GROUPS}; +use crate::lower::mesh::work; use crate::pipeline::sym::{ResourceKind, ResourceSlot, Stage, Symbol, SyntheticBinding}; use crate::spirv::builder::constructs::{ArmEnd, ArmFn, LoopFn, LoopSpec}; use crate::spirv::builder::{FunctionBuilder, ModuleBuilder}; @@ -186,12 +187,13 @@ pub(crate) fn div_ceil(f: &mut FunctionBuilder<'_>, a: Value, b: Value) -> BResu f.binary(BinOp::IAdd, q, extra) } -/// The threadgroups of grid `g`: `x · y · z` where the grid lies within Metal's limit of -/// [`METAL_MESH_GRID_GROUPS`] threadgroups (as an emulated object function holds the grid it -/// sets), else 0. The product compared wraps only where an earlier test fails. +/// The threadgroups of grid `g`: `x · y · z` where the grid lies within Metal's limits on a mesh +/// grid ([`METAL_MESH_GRID_AXIS`] along each axis, [`METAL_MESH_GRID_TOTAL`] in all, as an +/// emulated object function holds the grid it sets), else 0. The product compared wraps only +/// where an earlier test fails. fn bounded_groups(f: &mut FunctionBuilder<'_>, [x, y, z]: [Value; 3]) -> BResult { let one = k(f, 1)?; - let total = k(f, METAL_MESH_GRID_GROUPS)?; + let total = k(f, METAL_MESH_GRID_TOTAL)?; let ny = f.glsl(GlslOp::UMax, &[y, one])?; let room = f.binary(BinOp::UDiv, total, ny)?; let mut all = f.binary(BinOp::ULessThanEqual, x, room)?; @@ -200,6 +202,11 @@ fn bounded_groups(f: &mut FunctionBuilder<'_>, [x, y, z]: [Value; 3]) -> BResult let room = f.binary(BinOp::UDiv, total, nz)?; let c = f.binary(BinOp::ULessThanEqual, xy, room)?; all = f.binary(BinOp::LogicalAnd, all, c)?; + let axis = k(f, METAL_MESH_GRID_AXIS)?; + for v in [x, y, z] { + let c = f.binary(BinOp::ULessThanEqual, v, axis)?; + all = f.binary(BinOp::LogicalAnd, all, c)?; + } let xyz = f.binary(BinOp::IMul, xy, z)?; let zero = k(f, 0)?; f.select(all, xyz, zero) diff --git a/crates/metal2vulkan/src/bind/mesh_scan/tests.rs b/crates/metal2vulkan/src/bind/mesh_scan/tests.rs index 6411c8ed0..62c6bd8a9 100644 --- a/crates/metal2vulkan/src/bind/mesh_scan/tests.rs +++ b/crates/metal2vulkan/src/bind/mesh_scan/tests.rs @@ -145,13 +145,21 @@ fn the_scan_is_valid_on_every_committed_profile() { /// Each object threadgroup's first mesh threadgroup in object order, and `T`; the records /// reserved after the cursor; `T` folded into rows of `ROW`; `T · NP · k` vertices. A grid with -/// an axis of 0 launches none, and one past Metal's limit none (the object function holds it so; -/// the scan holds it again). +/// an axis of 0 launches none, and one past Metal's limits none (65,536 along an axis, or 2^20 in +/// all: the object function holds it so; the scan holds it again). #[test] fn the_scan_places_each_object_threadgroups_mesh_threadgroups() { - let draw = Draw::of(&[[2, 1, 1], [0, 5, 1], [3, 2, 1], [1, 1, 1], [1 << 20, 2, 1]]); + let draw = Draw::of(&[ + [2, 1, 1], + [0, 5, 1], + [3, 2, 1], + [1, 1, 1], + [1 << 20, 2, 1], + [1, 65536, 1], + [1024, 1024, 1], + ]); let s = scan(&draw, &[0], 40, 0); - assert_eq!(offsets(&draw, &s.work), vec![0, 2, 2, 8, 9, 9]); + assert_eq!(offsets(&draw, &s.work), vec![0, 2, 2, 8, 9, 9, 9, 9]); assert_eq!(s.work[work::MESH_GROUPS as usize], 9); assert_eq!(s.work[work::RECORDS_BASE as usize], 40); assert_eq!(s.cursor, 40 + 9 * 10); @@ -194,10 +202,25 @@ fn an_indirect_scan_reads_metals_arguments() { assert_eq!(offsets(&draw, &s.work), vec![0, 12]); assert_eq!(s.work[work::MESH_GROUPS as usize], 12); assert_eq!(header(&s.work, work::DRAW, 4), vec![36, 1, 0, 0]); - let s = scan(&draw, &[9, 9, 1 << 20, 2, 1], 0, 0); - assert_eq!(&s.work[work::HEADER as usize..][..3], &[0, 0, 0]); - assert_eq!(s.work[work::MESH_GROUPS as usize], 0); - assert_eq!(header(&s.work, work::DISPATCH, 3), vec![0, 0, 1]); + for past in [ + [1 << 20, 2, 1], + [65536, 1, 1], + [1, 1, 65536], + [1024, 1024, 1], + ] { + let s = scan(&draw, &[9, 9, past[0], past[1], past[2]], 0, 0); + assert_eq!( + &s.work[work::HEADER as usize..][..3], + &[0, 0, 0], + "{past:?}" + ); + assert_eq!(s.work[work::MESH_GROUPS as usize], 0, "{past:?}"); + assert_eq!( + header(&s.work, work::DISPATCH, 3), + vec![0, 0, 1], + "{past:?}" + ); + } let s = scan(&draw, &[9, 9, 3, 2], 0, 0); assert_eq!(s.work[work::MESH_GROUPS as usize], 0); } @@ -232,14 +255,14 @@ fn a_draw_the_pool_cannot_hold_draws_nothing_and_says_so() { Some(MeshRecordsFault::default()) ); // Vertices past a `u32` draw nothing either. - let mut wide = Draw::of(&[[1 << 10, 1 << 10, 1]]); + let mut wide = Draw::of(&[[1023, 1025, 1]]); wide.pool_words = u32::MAX; wide.group_words = 1; - wide.group_vertices = 1 << 12; + wide.group_vertices = 1 << 13; let s = scan(&wide, &[0], 0, 0); assert_eq!(s.work[work::MESH_GROUPS as usize], 0); assert_eq!( s.report.mesh_records_overflow.map(|f| f.mesh_threadgroups), - Some(1 << 20) + Some(1023 * 1025) ); } diff --git a/crates/metal2vulkan/src/bind/mod.rs b/crates/metal2vulkan/src/bind/mod.rs index caa9119ea..a410d22a9 100644 --- a/crates/metal2vulkan/src/bind/mod.rs +++ b/crates/metal2vulkan/src/bind/mod.rs @@ -149,6 +149,7 @@ pub(crate) mod index_rewrite; pub(crate) mod indirect_clamp; pub mod indirect_commands; pub(crate) mod instantiate; +pub(crate) mod mesh_arguments; pub(crate) mod mesh_scan; pub(crate) mod mipmap_filter; pub(crate) mod neutral; @@ -240,6 +241,10 @@ pub use instantiate::{ BufferExtent, BufferRange, DescriptorBytes, DescriptorRange, IndexBufferRef, IndirectRef, PushConstantWrite, PushHole, ResidentRange, ResidentSet, RootTable, }; +pub use mesh_arguments::{ + mesh_arguments_module, MeshArguments, MeshArgumentsForm, MeshArgumentsModule, MeshGridLimits, + MeshGridRule, METAL_MESH_GRID_AXIS, METAL_MESH_GRID_TOTAL, +}; pub use mesh_scan::{mesh_scan_module, MeshScanModule}; pub use mipmap_filter::{ mipmap_filter_module, MipmapFilterChain, MipmapFilterKernel, MipmapFilterLevel, diff --git a/crates/metal2vulkan/src/bind/status.rs b/crates/metal2vulkan/src/bind/status.rs index 0fa653689..c13436ba6 100644 --- a/crates/metal2vulkan/src/bind/status.rs +++ b/crates/metal2vulkan/src/bind/status.rs @@ -24,8 +24,9 @@ impl ExecutionStatus { } /// What the buffer's bytes report after the command buffer ran. The consumer maps `overflow`, a - /// replay fault, an index pool overflow, an absent argument read, a mesh records fault, and a - /// cubic argument sampler's sample to a command-buffer execution error, treats resident-set + /// replay fault, an index pool overflow, an absent argument read, a mesh records fault, a mesh + /// grid past the device's limits, and a cubic argument sampler's sample to a command-buffer + /// execution error, treats resident-set /// misses by its own policy, and announces a captured reach the rule does not answer as its /// pass's fallback to every tile. pub fn decode(bytes: &[u8; ExecutionStatus::BYTES]) -> StatusReport { @@ -46,6 +47,7 @@ impl ExecutionStatus { absent_argument_read: bits.contains(StatusBits::ABSENT_ARGUMENT_READ), cubic_argument_sampler: bits.contains(StatusBits::CUBIC_ARGUMENT_SAMPLER), captured_reach_unmeasured: bits.contains(StatusBits::CAPTURED_REACH_UNMEASURED), + mesh_grid_past_limits: bits.contains(StatusBits::MESH_GRID_PAST_LIMITS), mesh_records_overflow: (bits.contains(StatusBits::MESH_RECORDS_OVERFLOW)).then(|| { // The fault words are the first records fault's: a tessellation draw's when its // object threadgroups word is 0 (a scanned mesh draw's is at least 1), which @@ -115,6 +117,9 @@ pub struct StatusReport { /// capture settle took every tile of the pass's mask (`bind::CaptureSettleModule`): the /// pass's reach is the announced fallback, not its draws' tiles. pub captured_reach_unmeasured: bool, + /// An indirect mesh draw's arguments pass met a grid Metal draws past the device's limits + /// for the draw's first stage (`bind::MeshArguments`): that draw drew nothing. + pub mesh_grid_past_limits: bool, } /// The first emulated mesh draw of a command buffer that drew nothing because its records did @@ -238,6 +243,9 @@ impl StatusBits { /// nothing (`bind::TessellationScanModule`); the fault words name the command buffer's first /// records fault of either kind. pub const TESSELLATION_RECORDS_OVERFLOW: StatusBits = StatusBits(1 << 8); + /// An indirect mesh draw's arguments pass met an object grid Metal draws past the device's + /// task limits, and the draw drew nothing (`bind::MeshArguments`). + pub const MESH_GRID_PAST_LIMITS: StatusBits = StatusBits(1 << 9); /// Either records fault: the command buffer's first one of either kind writes the fault /// words. pub const RECORDS_FAULTS: StatusBits = StatusBits( diff --git a/crates/metal2vulkan/src/lower/mesh/mod.rs b/crates/metal2vulkan/src/lower/mesh/mod.rs index d3f386378..a3232a0f8 100644 --- a/crates/metal2vulkan/src/lower/mesh/mod.rs +++ b/crates/metal2vulkan/src/lower/mesh/mod.rs @@ -11,9 +11,10 @@ //! Metal's answers hold where one thread's store is the last: a grid never set, or set to zero //! along an axis, launches no mesh threadgroup; the last call of one thread holds. Two threads //! storing different grids race in Vulkan, where Metal's later call in program order holds -//! (recorded, not emulated). A grid past the device's mesh limits launches none -//! ([`bounded_grid`]: Vulkan requires every emitted grid within them; Metal's limit lies within -//! them wherever the runtime grants the family's mesh grids). +//! (recorded, not emulated). A grid past Metal's limits on a mesh grid launches none, as Metal's +//! does, and so does one past the device's mesh limits, which Vulkan requires of every emitted +//! grid ([`bounded_grid`]; every committed profile with the extension holds Metal's within its +//! own). //! //! **The payload** (`object_data`, `air.payload`). An object function's payload is an arena //! (`memory::arena`, `Arena::Payload`): a `TaskPayloadWorkgroupEXT` array of whole words of its @@ -114,6 +115,7 @@ use crate::air::abi::{ use crate::air::intrinsics::{AirIntrinsic, Elem, MemFlags, Mesh as MeshOp, NumTy}; use crate::air::ir::{Callee, Const, Inst, InstId, InstKind, Value}; use crate::air::Entry; +use crate::bind::mesh_arguments::{METAL_MESH_GRID_AXIS, METAL_MESH_GRID_TOTAL}; use crate::device::profile::DriverWorkaround; use crate::device::requirements::{VkExtension, VkFeature, VkLimit}; use crate::device::DeviceProfile; @@ -234,8 +236,9 @@ pub struct MeshPlan { /// An object function that sets its mesh grid: it declares the grid and its wrapper emits /// the mesh tasks. An object function that never sets it emits none. pub object: bool, - /// The device's mesh grid limits an object function's wrapper bounds the grid it emits by - /// (`maxMeshWorkGroupCount` and `maxMeshWorkGroupTotalCount`, [`bounded_grid`]). + /// The limits an object function's wrapper bounds the grid it emits by, along each axis and + /// in all: Metal's, within the device's mesh limits where the stages are native + /// ([`bounded_grid`]). pub grid_limits: Option<([u32; 3], u32)>, /// A mesh function's output shape. pub mesh: Option, @@ -856,14 +859,18 @@ pub fn select(cx: &mut SelectCx<'_>, _at: InstId, inst: &Inst) -> Result, fb: &mut FunctionBuilder<'_>) -> BResult<()> { } /// The mesh grid an object function launches for the grid `g` it set: `g` where it lies within -/// the device's mesh limits ([`MeshPlan::grid_limits`]: `maxMeshWorkGroupCount` on each axis, -/// `maxMeshWorkGroupTotalCount` in all), which Vulkan requires of every grid a task shader -/// emits, and none past them. Metal's own limit on a mesh grid (1024 threadgroups on the Apple7 -/// family) lies within the limits of every device the runtime's families table grants the family's -/// mesh grids; past it Metal defines no answer. +/// [`MeshPlan::grid_limits`], and none past them. Those are Metal's limits on a mesh grid +/// (`bind::METAL_MESH_GRID_AXIS` along an axis, `bind::METAL_MESH_GRID_TOTAL` in all: past them +/// Metal launches no mesh threadgroup from the object threadgroup, measured on the M3 Max), held +/// within the device's mesh limits where the stages are native (`maxMeshWorkGroupCount` on each +/// axis, `maxMeshWorkGroupTotalCount` in all), which Vulkan requires of every grid a task shader +/// emits. fn bounded_grid( cx: &mut EmitCx<'_>, fb: &mut FunctionBuilder<'_>, diff --git a/crates/metal2vulkan/src/lower/mesh/work.rs b/crates/metal2vulkan/src/lower/mesh/work.rs index 0f477dd5f..c49538662 100644 --- a/crates/metal2vulkan/src/lower/mesh/work.rs +++ b/crates/metal2vulkan/src/lower/mesh/work.rs @@ -6,10 +6,6 @@ //! The binder, the mesh scan (`bind::mesh_scan`) and the runtime read these words at run time, //! so this file is a runtime input (`validation/build.rs`); the lowering writes them. -/// Metal's limit on the threadgroups of one mesh grid, 1048576, to which an emulated object -/// function's grid is held: past it Metal defines no answer. -pub const METAL_MESH_GRID_GROUPS: u32 = 1 << 20; - /// `O`: the object threadgroups (1 for a pipeline without an object function). pub const OBJECT_GROUPS: u32 = 0; /// `T`: the mesh threadgroups the draw runs, which its records hold. diff --git a/crates/metal2vulkan/src/pipeline/api_tests.rs b/crates/metal2vulkan/src/pipeline/api_tests.rs index 9f6372102..79ba28d09 100644 --- a/crates/metal2vulkan/src/pipeline/api_tests.rs +++ b/crates/metal2vulkan/src/pipeline/api_tests.rs @@ -1277,6 +1277,7 @@ mod bind_serde_round_trips { first_instance: 0, }, indirect_needs_arguments: false, + mesh_arguments: None, index_bounds_pass: false, extents: Vec::new(), push_holes: Vec::new(), diff --git a/crates/metal2vulkan/src/tests/engine_mesh.rs b/crates/metal2vulkan/src/tests/engine_mesh.rs index 56633b42c..f2228f981 100644 --- a/crates/metal2vulkan/src/tests/engine_mesh.rs +++ b/crates/metal2vulkan/src/tests/engine_mesh.rs @@ -1022,9 +1022,25 @@ fn without_the_extension_a_mesh_pipeline_draws_its_records() { assert_eq!(d.work[work::RECORDS_BASE as usize], 0, "{stem}"); assert_eq!(&d.work[header..header + 4], &[2, 1, 1, 0], "{stem}"); assert_eq!(&d.work[header + slot..], &[0, 2], "{stem}"); - // Records past the device's storage buffer range. + // A grid Metal draws nothing for (65,535 by 65,535) draws nothing, with no records. + let none = plan + .instantiate_draw(&state, &groups([65535, 65535, 1])) + .unwrap_or_else(|e| panic!("{stem}: a grid past Metal's: {e}")); + assert!( + matches!( + none.draw, + vk::DrawCommand::Draw { + vertex_count: 0, + .. + } + ), + "{stem}: {:?}", + none.draw + ); + // Records past the device's storage buffer range, of the largest grid Metal draws. let l = &dev.profile().fields().limits; - let [x, y] = [0, 1].map(|i| l.max_compute_work_group_count[i].min(u32::from(u16::MAX))); + let x = l.max_compute_work_group_count[0].min(crate::bind::METAL_MESH_GRID_AXIS); + let y = l.max_compute_work_group_count[1].min(crate::bind::METAL_MESH_GRID_TOTAL / x); let bytes = u64::from(x) * u64::from(y) * 4 * records.group_words(); if bytes > u64::from(l.max_storage_buffer_range) { assert_eq!( diff --git a/crates/metal2vulkan/src/tests/owned_divisions.rs b/crates/metal2vulkan/src/tests/owned_divisions.rs index 6096e9e71..c6b1ecae0 100644 --- a/crates/metal2vulkan/src/tests/owned_divisions.rs +++ b/crates/metal2vulkan/src/tests/owned_divisions.rs @@ -188,6 +188,15 @@ fn modules() -> Vec { ); } } + for form in [ + bind::MeshArgumentsForm::Mesh, + bind::MeshArgumentsForm::Object, + ] { + push( + format!("mesh_arguments_module({form:?})"), + Box::new(move |d| Ok(bind::mesh_arguments_module(d, form)?.spirv)), + ); + } push( "stencil_split_module".into(), Box::new(|d| Ok(bind::stencil_split_module(d, Feature::Format)?.spirv)), diff --git a/docs/API.md b/docs/API.md index 64c18ba44..bac70d1ae 100644 --- a/docs/API.md +++ b/docs/API.md @@ -565,6 +565,16 @@ pipeline is an exact emulation: the object and mesh functions run as compute sta mesh's vertices and primitives as records into buffers, and a synthesized vertex stage draws those records; the plan says which dispatches and draw to record. +A grid Metal draws nothing for (an axis past `bind::METAL_MESH_GRID_AXIS`, or more than +`bind::METAL_MESH_GRID_TOTAL` threadgroups, measured on the M3 Max) draws nothing in every form: +a direct draw's command is zeroed, an object function's wrapper launches nothing for such a grid, +and an indirect draw reads its counts on the GPU. With the extension, an indirect draw's +`DrawCommands::mesh_arguments` is a pass to record before the render pass +(`bind::mesh_arguments_module`, one invocation): it writes the draw's counts into 12 bytes of the +consumer's scratch, which the draw reads in place of Metal's arguments; an object grid past the +device's task limits, which Metal draws, is zeroed there and sets +`StatusBits::MESH_GRID_PAST_LIMITS` in the command buffer's `ExecutionStatus`. + ### Tile pipelines `Device::compile_tile_pipeline` compiles a `TileRenderPipelineDescriptor` (the tile function and the @@ -2875,6 +2885,11 @@ each item named states the rule in full. to 4 bytes, and every later position draws index 0 plus the base vertex. - **An indexed draw from an index offset at or past the length draws index 0** plus the base vertex at each position, where Metal reads whatever memory follows (`zeroed-index-fetch`). +- **A mesh grid of 1,048,577 to 2,097,151 threadgroups draws nothing**, direct, indirect or set by + an object threadgroup. Metal on the M3 Max draws whole up to 1,048,575 and nothing at exactly + 2^20 or from 2^21 on, and between them is erratic (17 by 61,681 and 65,535 by 24 drew, 1025 by + 1025 and 33 by 32,768 did not); the runtime answers there as at 2^20 + (`bind::METAL_MESH_GRID_TOTAL`). - **A draw's `VkPipeline` is made while the draw goes on.** A draw whose pipeline is not made yet returns once encoded; the pipeline is made on the device's pool of at most four threads, and the command buffer's work waits for it in queue order. diff --git a/docs/FAST-PATHS.md b/docs/FAST-PATHS.md index 98dc8e947..8b298820c 100644 --- a/docs/FAST-PATHS.md +++ b/docs/FAST-PATHS.md @@ -426,6 +426,16 @@ driver's. Each is open work. Xe, the UHD 770 and the RTX 5080 Laptop GPU, 128 KiB on the RTX 3090, 192 KiB on the M3 Max and M4 under MoltenVK, 48 KiB on lavapipe; 16 KiB elsewhere. An exact form for compute, private memory in a runtime buffer with a slot per resident threadgroup, is not built. +- **An indirect mesh draw's object grid past the device's task limits fails its command buffer** + (`CommandBufferError::MeshGridPastLimits`, drawing nothing): Metal draws every object grid + measured (16,777,216 along `x`), where RADV launches at most 65,535 task workgroups along an + axis and 4,194,304 in all, lavapipe 65,536. A fold of the grid into the task stage's limits is + not built. The emulation (MoltenVK, ANV on the Iris Xe) refuses an indirect draw with an object + function (`NotImplemented(MeshShading)`). +- **An object threadgroup that sets a mesh grid Metal launches nothing for keeps its own writes.** + On the M3 Max such a threadgroup's device writes (an atomic add before the set) do not land + either, while the draw's other threadgroups run; the runtime runs the threadgroup and launches + nothing from it. - **A fragment function's imageblock write that its draw's tests may drop after it, where no form tests first.** Such a draw runs the tests before the write, early or in the shader against a depth stand-in. Refused as not implemented: a writing function under alpha to coverage; where diff --git a/docs/METAL-COVERAGE.md b/docs/METAL-COVERAGE.md index 21b45b380..efec90356 100644 --- a/docs/METAL-COVERAGE.md +++ b/docs/METAL-COVERAGE.md @@ -2073,7 +2073,7 @@ Cheap items a plain app calls first, then medium pieces by how often a plain app | `MTLRenderCommandEncoder.setMeshSamplerStates:lodMinClamps:lodMaxClamps:withRange:` | method | implemented | `RenderCommandEncoder::set_mesh_sampler_states` (runtime) | | `MTLRenderCommandEncoder.drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:` | method | implemented | `RenderCommandEncoder::draw_mesh_threadgroups` (runtime) | | `MTLRenderCommandEncoder.drawMeshThreads:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:` | method | implemented | `RenderCommandEncoder::draw_mesh_threads` (runtime) | -| `MTLRenderCommandEncoder.drawMeshThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:` | method | implemented | `RenderCommandEncoder::draw_mesh_threadgroups_indirect` (runtime): refused `NotImplemented(IndirectDrawArguments)` on a device with `VK_EXT_mesh_shader` | +| `MTLRenderCommandEncoder.drawMeshThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:` | method | implemented | `RenderCommandEncoder::draw_mesh_threadgroups_indirect` (runtime): an object grid past the device's task limits fails the command buffer (`MeshGridPastLimits`); refused `NotImplemented(MeshShading)` with an object function where mesh draws are emulated | | `MTLRenderCommandEncoder.drawPrimitives:vertexStart:vertexCount:instanceCount:` | method | implemented | `RenderCommandEncoder::draw_primitives` (runtime) | | `MTLRenderCommandEncoder.drawPrimitives:vertexStart:vertexCount:` | method | implemented | `RenderCommandEncoder::draw_primitives` (runtime) | | `MTLRenderCommandEncoder.drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:` | method | implemented | `RenderCommandEncoder::draw_indexed_primitives` (runtime) | diff --git a/docs/REFUSALS.md b/docs/REFUSALS.md index 1265d17eb..a5092eb31 100644 --- a/docs/REFUSALS.md +++ b/docs/REFUSALS.md @@ -14,13 +14,13 @@ 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 `f9975a407`. +Generated at `486261478`. ## Totals | Kind | Variants | With a site | Reach system | Reach app | Reach rare | Reach none | Unassessed | |---|---|---|---|---|---|---|---| -| Translator and front-end refusals | 126 | 126 | 6 | 33 | 70 | 17 | 0 | +| Translator and front-end refusals | 125 | 125 | 6 | 33 | 69 | 17 | 0 | | Runtime gaps | 67 | 67 | 1 | 8 | 43 | 15 | 0 | | Apple-only calls | 5 | 5 | 0 | 0 | 0 | 5 | 0 | | Binder refusals at a device limit | 9 | 9 | 0 | 1 | 7 | 1 | 0 | @@ -53,7 +53,7 @@ Generated at `f9975a407`. | `QuadOperations` | Quad operations in a stage without quad support | devices without VkLimit::MinSubgroupSize; devices without VkProperty::SubgroupQuadOperationsInAllStages | 2: `crates/metal2vulkan/src/device/subgroup.rs:371`, `crates/metal2vulkan/src/device/subgroup.rs:405` | `app`: quad shuffles in kernels on devices without quad operations there | | `SimdgroupMatrix` | Simdgroup matrix operations | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/simd/matrix.rs:83` | `rare`: simdgroup matrix kernels | | `ArgumentBufferPointers` | Argument buffers holding buffer pointers (dynamic roots) | devices without buffer device addresses (`addressed_needs`) | 1: `crates/metal2vulkan/src/device/metal.rs:236` | `app`: argument buffers holding buffer pointers | -| `ArgumentBufferTextures` | Argument buffers holding textures or samplers (handle domain) | devices short of a device limit the site names; devices without a capability the site computes (`gaps`); devices without a capability the site computes (`missing`); devices without a capability the site computes (`needs`); every device (not implemented) | 17: `crates/metal2vulkan-runtime/src/families/features.rs:1658`, `crates/metal2vulkan-runtime/src/pipeline/objects.rs:1036` (+15) | `app`: argument buffers holding textures and samplers (bindless) | +| `ArgumentBufferTextures` | Argument buffers holding textures or samplers (handle domain) | devices short of a device limit the site names; devices without a capability the site computes (`gaps`); devices without a capability the site computes (`missing`); devices without a capability the site computes (`needs`); every device (not implemented) | 17: `crates/metal2vulkan-runtime/src/families/features.rs:1646`, `crates/metal2vulkan-runtime/src/pipeline/objects.rs:1036` (+15) | `app`: argument buffers holding textures and samplers (bindless) | | `ArgumentBufferObjects` | Argument-buffer members that are pipeline states, ICBs, function tables, or acceleration structures | every device (not implemented) | 5: `crates/metal2vulkan/src/lower/access/encode.rs:446`, `crates/metal2vulkan/src/lower/access/encode.rs:496` (+3) | `rare`: pipeline states and ICBs in argument buffers | | `DereferenceLoadedPointer` | Dereferencing a pointer loaded from memory or made from an integer | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism) | 4: `crates/metal2vulkan/src/lower/access/dynamic.rs:407`, `crates/metal2vulkan/src/lower/access/local.rs:774` (+2) | `app`: pointers loaded from argument buffers | | `PointerToInteger` | Storing a pointer or converting it to an integer | - | via a helper: 1: `crates/metal2vulkan/src/lower/access/dynamic.rs:347` | `rare`: pointer to integer casts | @@ -65,7 +65,7 @@ Generated at `f9975a407`. | `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:1684`, `crates/metal2vulkan/src/lower/select.rs:1641` (+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:3635` (+5) | `app`: a buffer window past a device's descriptor range | +| `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:3624` (+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:1133` | `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) | | `Format` | A pixel format not supported for the required use | devices without VkFeature::ShaderStorageImageExtendedFormats; devices without a capability the site computes; devices without a capability the site computes (`alternatives`); devices without a capability the site computes (`c`); devices without a capability the site computes (`missing`); devices without a capability the site computes (`routes`); devices without a format's usage; every device (no Vulkan mechanism); every device (not implemented) | 121: `crates/metal2vulkan-runtime/src/binding_view.rs:146`, `crates/metal2vulkan-runtime/src/blit_plan.rs:523` (+119) | `system`: pixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them) | @@ -84,23 +84,22 @@ Generated at `f9975a407`. | `PixelSamplerCompare` | A constexpr sampler with pixel coordinates and a compare function, which Apple's compiler rejects ("invalid values combination in sampler... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:115` | `none`: Apple's compiler rejects it | | `TexelBuffer` | Texture buffers beyond the device's texel-buffer limits | devices without a format's usage; every device (no Vulkan mechanism) | 3: `crates/metal2vulkan/src/bind/instantiate.rs:880`, `crates/metal2vulkan/src/bind/instantiate.rs:886` (+1) | `app`: texture buffers past a device's texel-buffer limits | | `RasterOrderGroups` | Raster order groups without fragment shader interlock | devices without VkFeature::FragmentShaderPixelInterlock; devices without VkFeature::FragmentShaderSampleInterlock; devices without a capability the site computes (`alternatives`); every device (not implemented) | 4: `crates/metal2vulkan/src/device/metal.rs:242`, `crates/metal2vulkan/src/lower/fragment/rog.rs:151` (+2) | `rare`: raster order groups | -| `FramebufferFetch` | Framebuffer fetch without an ordered form on the device (rasterization-order attachment access, or the pixel interlock's storage form where the... | devices short of a Vulkan property the site names; devices without VkFeature::FragmentShaderPixelInterlock; devices without VkFeature::RasterizationOrderColorAttachmentAccess; devices without VkFeature::SampleRateShading; devices without a capability the site computes; devices without a capability the site computes (`alternatives`); devices without a capability the site computes (`c`); devices without a capability the site computes (`capability`); devices without a capability the site computes (`missing`); devices without a format's usage; drivers with a defect; every device (not implemented) | 23: `crates/metal2vulkan-runtime/src/families/features.rs:1018`, `crates/metal2vulkan-runtime/src/render.rs:5889` (+21) | `system`: programmable blending (framebuffer fetch); macOS 26.6.2's login reaches it (two WindowServer and RenderBox pipelines fetch RGB10A8_2P_XR10 attachments, the consumer's boots) | -| `PrimitiveId` | `[[primitive_id]]` in a fragment function | devices without a capability the site computes; every device (not implemented) | 3: `crates/metal2vulkan-runtime/src/families/features.rs:1127`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:3211` (+1) | `rare`: primitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function | -| `PrivatePrimitives` | One of Metal's private primitive types (a line loop, a triangle fan, quads, a quad strip) drawn in the pulled list form... | - | via a helper: 1: `crates/metal2vulkan/src/lower/stage_io/plan.rs:2601` | `rare`: a private primitive type drawn in the pulled list form (a vertex function that writes memory or the primitive_id varying, a vertex start past 2^31) on a device without device addresses | -| `VertexAmplification` | Vertex amplification | devices without VkFeature::Multiview; devices without VkFeature::MultiviewTessellationShader; devices without VkLimit::MaxMultiviewInstanceIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 5: `crates/metal2vulkan/src/bind/graphics.rs:3976`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312` (+3) | `rare`: vertex amplification | +| `FramebufferFetch` | Framebuffer fetch without an ordered form on the device (rasterization-order attachment access, or the pixel interlock's storage form where the... | devices short of a Vulkan property the site names; devices without VkFeature::FragmentShaderPixelInterlock; devices without VkFeature::RasterizationOrderColorAttachmentAccess; devices without VkFeature::SampleRateShading; devices without a capability the site computes; devices without a capability the site computes (`alternatives`); devices without a capability the site computes (`c`); devices without a capability the site computes (`capability`); devices without a capability the site computes (`missing`); devices without a format's usage; drivers with a defect; every device (not implemented) | 23: `crates/metal2vulkan-runtime/src/families/features.rs:1016`, `crates/metal2vulkan-runtime/src/render.rs:5843` (+21) | `system`: programmable blending (framebuffer fetch); macOS 26.6.2's login reaches it (two WindowServer and RenderBox pipelines fetch RGB10A8_2P_XR10 attachments, the consumer's boots) | +| `PrimitiveId` | `[[primitive_id]]` in a fragment function | devices without a capability the site computes; every device (not implemented) | 3: `crates/metal2vulkan-runtime/src/families/features.rs:1125`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:3179` (+1) | `rare`: primitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function | +| `VertexAmplification` | Vertex amplification | devices without VkFeature::Multiview; devices without VkFeature::MultiviewTessellationShader; devices without VkLimit::MaxMultiviewInstanceIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 5: `crates/metal2vulkan/src/bind/graphics.rs:3965`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312` (+3) | `rare`: vertex amplification | | `LayeredRendering` | Layered rendering (`render_target_array_index`, `viewport_array_index`) | devices without VkFeature::ImageView2DOn3DImage; devices without VkFeature::MultiViewport; devices without VkFeature::ShaderOutputLayer; devices without VkFeature::ShaderOutputViewportIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/render_pass.rs:1669`, `crates/metal2vulkan-runtime/src/render_state.rs:1107` (+5) | `rare`: layered rendering on a device without its features | -| `ClipDistance` | Clip or cull distances | devices without VkFeature::ShaderClipDistance; devices without VkLimit::MaxClipDistances | 2: `crates/metal2vulkan/src/lower/mesh/mod.rs:934`, `crates/metal2vulkan/src/lower/mesh/mod.rs:942` | `rare`: clip distances on a device without them | +| `ClipDistance` | Clip or cull distances | devices without VkFeature::ShaderClipDistance; devices without VkLimit::MaxClipDistances | 2: `crates/metal2vulkan/src/lower/mesh/mod.rs:941`, `crates/metal2vulkan/src/lower/mesh/mod.rs:949` | `rare`: clip distances on a device without them | | `DualSourceBlending` | Dual-source blending | devices without VkFeature::DualSrcBlend; devices without VkLimit::MaxFragmentDualSrcAttachments | 5: `crates/metal2vulkan-runtime/src/families/formats.rs:386`, `crates/metal2vulkan/src/metal/state.rs:37` (+3) | `rare`: dual-source blending on a device without it | -| `Barycentrics` | Barycentric coordinates | devices without VkFeature::FragmentShaderBarycentric; devices without VkFeature::GeometryShader; devices without a capability the site computes (`needs`); drivers with a defect; every device (not implemented) | 5: `crates/metal2vulkan/src/device/metal.rs:263`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1924` (+3) | `rare`: barycentric coordinates | -| `StencilExport` | Stencil export | devices without VkExtension::ExtShaderStencilExport; every device (not implemented) | 6: `crates/metal2vulkan-runtime/src/families/features.rs:1114`, `crates/metal2vulkan/src/bind/graphics.rs:2672` (+4) | `rare`: stencil from the shader | +| `Barycentrics` | Barycentric coordinates | devices without VkFeature::FragmentShaderBarycentric; devices without VkFeature::GeometryShader; devices without a capability the site computes (`needs`); drivers with a defect; every device (not implemented) | 5: `crates/metal2vulkan/src/device/metal.rs:263`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1921` (+3) | `rare`: barycentric coordinates | +| `StencilExport` | Stencil export | devices without VkExtension::ExtShaderStencilExport; every device (not implemented) | 6: `crates/metal2vulkan-runtime/src/families/features.rs:1112`, `crates/metal2vulkan/src/bind/graphics.rs:2651` (+4) | `rare`: stencil from the shader | | `SampleRateShading` | Per-sample shading | devices without VkFeature::SampleRateShading; devices without a capability the site computes (`needs`); every device (not implemented) | 3: `crates/metal2vulkan/src/pipeline/link/graphics.rs:844`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:846` (+1) | `rare`: per-sample shading | | `PixelCoverageAtSampleRate` | The pixel's coverage (`[[sample_mask]]` read) in a fragment function that runs once per sample | drivers with a defect; every device (no Vulkan mechanism); every device (not implemented) | 3: `crates/metal2vulkan/src/lower/fragment/coverage.rs:296`, `crates/metal2vulkan/src/lower/simd/mod.rs:754` (+1) | `rare`: coverage read at sample rate | | `InterfaceComponents` | Too many interface components or locations | devices short of a device limit the site names; devices without VkLimit::MaxColorAttachments; devices without VkLimit::MaxVertexInputAttributes | 4: `crates/metal2vulkan/src/pipeline/compile/color_group.rs:202`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:301` (+2) | `rare`: too many varyings or attachments for a device | | `UnmatchedVarying` | A fragment input without a vertex producer (a Metal link error) | every device (no Vulkan mechanism) | 3: `crates/metal2vulkan/src/pipeline/link/varyings.rs:318`, `crates/metal2vulkan/src/pipeline/link/varyings.rs:537` (+1) | `none`: a Metal link error | | `KernelStageIn` | Kernel `[[stage_in]]` | every device (not implemented) | 3: `crates/metal2vulkan-runtime/src/indirect_execute.rs:376`, `crates/metal2vulkan/src/bind/dispatch.rs:871` (+1) | `rare`: kernel stage-in combinations Metal leaves unestablished | | `Tessellation` | Tessellation | devices without VkLimit::MaxPushConstantsSize; devices without VkLimit::MaxStorageBufferRange; devices without VkLimit::MaxTessellationGenerationLevel; every device (not implemented) | 13: `crates/metal2vulkan-air/src/canon/mod.rs:1256`, `crates/metal2vulkan-air/src/canon/mod.rs:1347` (+11) | `rare`: tessellation | -| `MeshShading` | | devices short of a device limit the site names; devices without VkLimit::MaxMeshOutputLayers; devices without VkLimit::MaxTaskPayloadSize; devices without a capability the site computes (`missing`); every device (not implemented) | 7: `crates/metal2vulkan/src/bind/graphics.rs:1591`, `crates/metal2vulkan/src/bind/graphics.rs:3045` (+5) | `rare`: mesh pipelines | -| `TileShading` | | devices without VkLimit::MaxStorageBufferRange; devices without a format's usage; every device (not implemented) | 5: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:520`, `crates/metal2vulkan/src/bind/plan/compute.rs:237` (+3) | `rare`: tile shaders (Apple GPU families) | +| `MeshShading` | | devices short of a device limit the site names; devices without VkLimit::MaxMeshOutputLayers; devices without VkLimit::MaxTaskPayloadSize; devices without a capability the site computes (`missing`); every device (not implemented) | 7: `crates/metal2vulkan/src/bind/graphics.rs:1575`, `crates/metal2vulkan/src/bind/graphics.rs:3024` (+5) | `rare`: mesh pipelines | +| `TileShading` | | devices without VkLimit::MaxStorageBufferRange; devices without a format's usage; every device (not implemented) | 5: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:521`, `crates/metal2vulkan/src/bind/plan/compute.rs:237` (+3) | `rare`: tile shaders (Apple GPU families) | | `Imageblocks` | An imageblock outside the forms implemented | devices without VkFeature::SampleRateShading; devices without a capability the site computes (`missing`); drivers with a defect; every device (not implemented) | 10: `crates/metal2vulkan/src/lower/access/imageblock.rs:98`, `crates/metal2vulkan/src/lower/access/mod.rs:908` (+8) | `rare`: imageblocks (Apple GPU families) | | `RayTracing` | | devices without a capability the site computes (`missing`); every device (no Vulkan mechanism); every device (not implemented) | 12: `crates/metal2vulkan/src/bind/acceleration.rs:202`, `crates/metal2vulkan/src/bind/acceleration.rs:216` (+10) | `rare`: ray tracing (out of scope by ruling) | | `Tensors` | | every device (not implemented) | 2: `crates/metal2vulkan-air/src/canon/matmul2d/synth.rs:32`, `crates/metal2vulkan/src/lower/select.rs:903` | `rare`: shader tensors | @@ -111,7 +110,7 @@ Generated at `f9975a407`. | `Attribute` | An LLVM attribute kind that changes the calling ABI and that AIR does not use (`inalloca`, `preallocated`, `byref`, `nest`, the `swift*` kinds) | - | via a helper: 2: `crates/metal2vulkan-air/src/bitcode/attrs.rs:493`, `crates/metal2vulkan/src/error/mod.rs:256` | `none`: LLVM ABI attributes AIR does not use | | `BitcodeRecord` | A bitcode record LLVM defines in `block` that the typed model does not cover and that has no more specific variant (legacy spellings predating... | - | via a helper: 7: `crates/metal2vulkan-air/src/bitcode/attrs.rs:337`, `crates/metal2vulkan-air/src/bitcode/function.rs:572` (+5) | `none`: bitcode records AIR does not emit | | `SyncScope` | An atomic access or fence in a synchronization scope other than LLVM's built-in `singlethread` and system scopes | - | via a helper: 2: `crates/metal2vulkan-air/src/bitcode/function.rs:1255`, `crates/metal2vulkan/src/error/mod.rs:258` | `none`: synchronization scopes AIR does not use | -| `SubgroupOperations` | Simdgroup operations of a class the stage's subgroups do not support (the stage is not in `subgroupSupportedStages`, or an operation class is... | devices without VkFeature::ShaderQuadControl; devices without VkFeature::ShaderSubgroupExtendedTypes; devices without VkProperty::SubgroupStage | 4: `crates/metal2vulkan-runtime/src/families/features.rs:1723`, `crates/metal2vulkan/src/lower/simd/mod.rs:407` (+2) | `app`: simdgroup functions in a stage a device's subgroups do not support | +| `SubgroupOperations` | Simdgroup operations of a class the stage's subgroups do not support (the stage is not in `subgroupSupportedStages`, or an operation class is... | devices without VkFeature::ShaderQuadControl; devices without VkFeature::ShaderSubgroupExtendedTypes; devices without VkProperty::SubgroupStage | 4: `crates/metal2vulkan-runtime/src/families/features.rs:1711`, `crates/metal2vulkan/src/lower/simd/mod.rs:407` (+2) | `app`: simdgroup functions in a stage a device's subgroups do not support | | `DirectCall` | A call to a defined function the inliner cannot take | every device (not implemented) | 1: `crates/metal2vulkan-air/src/canon/mod.rs:1319` | `rare`: variadic or byval calls the inliner cannot take | | `WideSwitchLiteral` | A switch case literal wider than 32 bits | every device (not implemented) | 1: `crates/metal2vulkan/src/structurize/emit.rs:207` | `rare`: 64-bit switch literals | | `Lowering` | An instruction, intrinsic, or interface element of a lowering family whose lowering has not landed yet (each family narrows its refusals as it lands) | devices short of a device limit the site names; devices without VkFeature::ShaderDemoteToHelperInvocation; every device (not implemented) | 35: `crates/metal2vulkan/src/bind/plan/resources.rs:762`, `crates/metal2vulkan/src/lower/access/handle.rs:1062` (+33) | `system`: the catch-all of lowering families not landed: any shader can meet one | @@ -122,8 +121,8 @@ Generated at `f9975a407`. | `SamplerBicubicFilter` | A use of Metal's bicubic filter that no Metal reading establishes | every device (not implemented) | 5: `crates/metal2vulkan/src/bind/heap.rs:997`, `crates/metal2vulkan/src/bind/plan/resources.rs:1876` (+3) | `system`: bicubic filtering forms Metal does not establish; macOS 26.6.2 makes a runtime sampler with MTLSamplerMinMagFilterCubic (the consumer's boots), whose mip-filtered form is refused | | `GroupCount` | A dispatch whose threadgroup count on `axis` exceeds `maxComputeWorkGroupCount` by more than the binder splits into regions (`None` | every device (no Vulkan mechanism) | 5: `crates/metal2vulkan/src/bind/dispatch.rs:379`, `crates/metal2vulkan/src/bind/dispatch.rs:455` (+3) | `rare`: more threadgroups than a device dispatches, past the binder's split | | `IntersectionFunctionTable` | A ray intersection through intersection functions | every device (no Vulkan mechanism); every device (not implemented) | 9: `crates/metal2vulkan/src/bind/acceleration.rs:177`, `crates/metal2vulkan/src/bind/acceleration.rs:183` (+7) | `rare`: ray tracing (out of scope by ruling) | -| `IndependentBlending` | Color attachments whose write masks or blend states differ, as Metal sets them per attachment, on a device without `independentBlend`, where no... | devices without VkFeature::IndependentBlend | 2: `crates/metal2vulkan-runtime/src/render.rs:2168`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:1017` | `rare`: per-attachment blending on a device without independentBlend | -| `RasterSampleCount` | A `rasterSampleCount` outside the device's framebuffer sample counts for the pipeline's attachments (`framebuffer*SampleCounts`), and, for a color... | devices short of a Vulkan property the site names; devices without a capability the site computes | 2: `crates/metal2vulkan-runtime/src/families/limits.rs:1059`, `crates/metal2vulkan/src/pipeline/graphics.rs:563` | `app`: a sample count a device lacks for the attachments | +| `IndependentBlending` | Color attachments whose write masks or blend states differ, as Metal sets them per attachment, on a device without `independentBlend`, where no... | devices without VkFeature::IndependentBlend | 2: `crates/metal2vulkan-runtime/src/render.rs:2122`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:1017` | `rare`: per-attachment blending on a device without independentBlend | +| `RasterSampleCount` | A `rasterSampleCount` outside the device's framebuffer sample counts for the pipeline's attachments (`framebuffer*SampleCounts`), and, for a color... | devices short of a Vulkan property the site names; devices without a capability the site computes | 2: `crates/metal2vulkan-runtime/src/families/limits.rs:1063`, `crates/metal2vulkan/src/pipeline/graphics.rs:563` | `app`: a sample count a device lacks for the attachments | | `TriangleFillLines` | The render encoder's `MTLTriangleFillModeLines` (`polygonMode` `LINE`) on a device without `fillModeNonSolid` | - | via a helper: 1: `crates/metal2vulkan/src/metal/state.rs:347` | `app`: wireframe on a device without fillModeNonSolid | | `DepthClipClamp` | The render encoder's `MTLDepthClipModeClamp` (`depthClampEnable`) on a device without `depthClamp` | - | via a helper: 1: `crates/metal2vulkan/src/metal/state.rs:363` | `app`: depth clamp on a device without depthClamp | | `DepthBiasClamp` | The render encoder's depth bias clamp, nonzero with a nonzero bias, on a device without `depthBiasClamp` | - | via a helper: 1: `crates/metal2vulkan/src/metal/state.rs:463` | `app`: depth bias clamp on a device without depthBiasClamp | @@ -131,19 +130,19 @@ Generated at `f9975a407`. | `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:1196` | `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:1244`, `crates/metal2vulkan-runtime/src/image_plan.rs:598` (+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:5136` (+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:996` (+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:5134` (+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:994` (+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:1818`, `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:430`, `crates/metal2vulkan-runtime/src/host_memory.rs:470` (+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:2783` | `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:2832` | `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:570` | `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 | -| `PixelCoverage` | The fragment's coverage (`[[sample_mask]]` read) in a fragment function of a pipeline of more than one sample that runs once per pixel | drivers with a defect | 2: `crates/metal2vulkan-runtime/src/families/features.rs:1225`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:783` | `rare`: coverage reads at pixel rate in a multisampled pipeline | +| `PixelCoverage` | The fragment's coverage (`[[sample_mask]]` read) in a fragment function of a pipeline of more than one sample that runs once per pixel | drivers with a defect | 2: `crates/metal2vulkan-runtime/src/families/features.rs:1223`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:783` | `rare`: coverage reads at pixel rate in a multisampled pipeline | | `CentroidVarying` | A centroid varying (`[[centroid_perspective]]`, `[[centroid_no_perspective]]`) in a fragment function of a pipeline of more than one sample | drivers with a defect | 1: `crates/metal2vulkan/src/pipeline/link/graphics.rs:801` | `rare`: centroid varyings in a multisampled pipeline | | `PrivateMemory` | A stage whose private memory (its `thread` variables and arrays, and the constants it holds per thread) takes more Function storage a thread than... | - | via a helper: 1: `crates/metal2vulkan/src/lower/select.rs:1171` | `rare`: very large per-thread arrays | | `SparseTextures` | A sparse heap (`MTLHeapTypeSparse`), or a texture made from one, on a device without what a sparse resident image of it needs, which `missing` names | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/sparse/texture.rs:32` | `rare`: sparse heaps on a device without sparse images | -| `SparseMapping` | A sparse texture's mapping update (`updateTextureMapping:` and its array form, or a move of mappings) that covers part of one of the device's... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:469` | `rare`: sparse mappings off the device's blocks | +| `SparseMapping` | A sparse texture's mapping update (`updateTextureMapping:` and its array form, or a move of mappings) that covers part of one of the device's... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:466` | `rare`: sparse mappings off the device's blocks | | `TimelineSemaphores` | Command buffers and events, which the runtime completes and signals through timeline semaphores (core in Vulkan 1.2), on a device whose... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/device/create.rs:1115` | `none`: a device below the runtime's floor | | `Reflection` | Reflection of an argument whose answer Metal's has not been measured for (`reflection`) | every device (not implemented) | 9: `crates/metal2vulkan/src/bind/argument_buffer.rs:626`, `crates/metal2vulkan/src/reflection/derive.rs:178` (+7) | `rare`: reflection of argument kinds Metal's answer is unmeasured for | | `HeapTextureTiling` | A texture of a heap whose memory the device's optimal images do not take (a `Shared` heap on a device whose optimal images take no host-visible... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/texture/heap.rs:628` | `app`: textures in Shared heaps on a device whose optimal images take no host memory | @@ -153,30 +152,30 @@ Generated at `f9975a407`. | `IndirectRenderState` | A render state a function sets on an indirect render command (`render_command::set_cull_mode`, `set_front_facing_winding`,... | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/access/encode.rs:568` | `rare`: render state set by a kernel on an indirect command | | `GlobalBuiltinInFragment` | A fragment function's read of a Metal 3.1 program-scope built-in variable that Metal does not lower there | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/select.rs:912` | `rare`: Metal 3.1 global built-ins in fragment functions | | `PrivateRenderState` | A private fixed-function property of Metal's pipeline descriptor (Apple SPI, OpenGL on Metal's) set to a value whose effect the translation has... | devices without VkFeature::LogicOp; every device (not implemented) | 7: `crates/metal2vulkan/src/bind/heap.rs:1300`, `crates/metal2vulkan/src/bind/plan/resources.rs:887` (+5) | `none`: Apple-private pipeline fields of OpenGL on Metal (no public header) | -| `ExtendedRangeBlend` | Metal's blend into an extended-range attachment (`BGRA10_XR`, `BGR10_XR`, `RGB10A8_2P_XR10` and their `_sRGB` twins), which the function computes... | every device (not implemented) | 4: `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:305`, `crates/metal2vulkan/src/lower/fragment/fetch.rs:1629` (+2) | `system`: the parts of a blend into an extended-range (XR10) attachment the measured model does not hold (second-source factors, the color blend color difference, a one-color-channel mask, float4 and sRGB outside the measured forms); the consumer's guests blend RGB10A8_2P_XR10 attachments | -| `TileReach` | The tiles a render pass's primitives reach, binned on the device ([`tile_reach_module`](crate::bind::tile_reach_module)), on a device without what... | devices short of a Vulkan feature the site names; devices without a capability the site computes (`vec![int64]`); every device (not implemented) | 3: `crates/metal2vulkan/src/bind/tile_reach.rs:270`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:2517` (+1) | `app`: the tiles a pass's draws reach, binned on a device without shaderInt64 | +| `ExtendedRangeBlend` | Metal's blend into an extended-range attachment (`BGRA10_XR`, `BGR10_XR`, `RGB10A8_2P_XR10` and their `_sRGB` twins), which the function computes... | every device (not implemented) | 4: `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:305`, `crates/metal2vulkan/src/lower/fragment/fetch.rs:1555` (+2) | `system`: the parts of a blend into an extended-range (XR10) attachment the measured model does not hold (second-source factors, the color blend color difference, a one-color-channel mask, float4 and sRGB outside the measured forms); the consumer's guests blend RGB10A8_2P_XR10 attachments | +| `TileReach` | The tiles a render pass's primitives reach, binned on the device ([`tile_reach_module`](crate::bind::tile_reach_module)), on a device without what... | devices short of a Vulkan feature the site names; devices without a capability the site computes (`vec![int64]`); every device (not implemented) | 3: `crates/metal2vulkan/src/bind/tile_reach.rs:270`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:2514` (+1) | `app`: the tiles a pass's draws reach, binned on a device without shaderInt64 | | `ProgramScopeBinding` | A program-scope buffer binding of MSL 3.2 (macOS 15 and later), `constant T* constant p [[buffer(n)]];` in Apple's `!air.global_bindings` list,... | - | via a helper: 2: `crates/metal2vulkan-air/src/abi/module.rs:77`, `crates/metal2vulkan/src/error/mod.rs:267` | `app`: MSL 3.2 program-scope buffer bindings (macOS 15 and later) | | `SeqCstFence` | A sequentially consistent fence (`seq_cst` `atomic_thread_fence`, an LLVM `fence seq_cst`, or a `seq_cst` barrier ordering device memory), whose... | devices short of a Vulkan feature the site names | 1: `crates/metal2vulkan/src/lower/sync/barrier.rs:443` | `rare`: a seq_cst fence in a vertex or fragment stage without its stores and atomics | -| `PostDepthCoverage` | The coverage after the depth and stencil tests (`[[sample_mask, post_depth_coverage]]`), read through `VK_EXT_post_depth_coverage` | devices short of a Vulkan extension the site names; devices without VkExtension::ExtPostDepthCoverage | 2: `crates/metal2vulkan-runtime/src/families/features.rs:1219`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:783` | `rare`: the coverage after early depth and stencil tests on a device without VK_EXT_post_depth_coverage | +| `PostDepthCoverage` | The coverage after the depth and stencil tests (`[[sample_mask, post_depth_coverage]]`), read through `VK_EXT_post_depth_coverage` | devices short of a Vulkan extension the site names; devices without VkExtension::ExtPostDepthCoverage | 2: `crates/metal2vulkan-runtime/src/families/features.rs:1217`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:783` | `rare`: the coverage after early depth and stencil tests on a device without VK_EXT_post_depth_coverage | ## 2. Runtime gaps (`Error::NotImplemented(RuntimeGap)`) | 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:163`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:1563` (+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:1982` | `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:461`, `crates/metal2vulkan-runtime/src/texture.rs:1674` (+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:562`, `crates/metal2vulkan-runtime/src/sparse/texture.rs:30` (+1) | `rare`: sparse texture emulation's unbuilt pieces | +| `ResourceHeap` | The resource-ID heap, descriptor set 1 | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:2048` | `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:458`, `crates/metal2vulkan-runtime/src/texture.rs:1672` (+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:553`, `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:714` | `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:1069` | `rare`: a heap texture needing more than 256 KiB alignment | | `HeapTextureMemory` | A heap texture whose image the heap's memory type does not take | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/texture/heap.rs:1508`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1515` (+3) | `app`: a heap texture the heap's memory type does not take | | `FunctionTablePastMaxBufferLength` | A visible-function table of more entries than one buffer of the device's `max_buffer_length` holds words for, or than its size word holds | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/function_table.rs:622` | `none`: a function table past one buffer | | `IndirectCommandBufferPastMaxBufferLength` | An indirect command buffer of more commands than one buffer of the device's `max_buffer_length` holds the records of | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:522` | `none`: an ICB past one buffer | -| `IndirectRenderCommands` | What indirect command buffers lack of their render commands | every device (runtime piece not built) | 16: `crates/metal2vulkan-runtime/src/compute.rs:1144`, `crates/metal2vulkan-runtime/src/compute.rs:1225` (+14) | `rare`: indirect render commands' remaining pieces | +| `IndirectRenderCommands` | What indirect command buffers lack of their render commands | every device (runtime piece not built) | 17: `crates/metal2vulkan-runtime/src/compute.rs:1115`, `crates/metal2vulkan-runtime/src/compute.rs:1196` (+15) | `rare`: indirect render commands' remaining pieces | | `IndirectImageblockSize` | An indirect compute command's imageblock side past 65535, which Metal keeps | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3363` | `none`: an imageblock side past 65535 | -| `CommandReplay` | The device replay of indirect command buffers | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/binding.rs:723`, `crates/metal2vulkan-runtime/src/binding.rs:726` | `rare`: the device replay of indirect command buffers | -| `RenderAttachments` | Render attachments and their binding forms | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1794` | `rare`: render attachment forms not built | -| `AccelerationStructures` | Acceleration structures | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1797` | `rare`: ray tracing (out of scope by ruling) | +| `CommandReplay` | The device replay of indirect command buffers | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/binding.rs:720`, `crates/metal2vulkan-runtime/src/binding.rs:723` | `rare`: the device replay of indirect command buffers | +| `RenderAttachments` | Render attachments and their binding forms | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1871` | `rare`: render attachment forms not built | +| `AccelerationStructures` | Acceleration structures | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1874` | `rare`: ray tracing (out of scope by ruling) | | `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:1165` | `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:1156` | `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) | @@ -187,46 +186,46 @@ Generated at `f9975a407`. | `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/draw_shape.rs:341`, `crates/metal2vulkan-runtime/src/render_state.rs:1039` (+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:1603`, `crates/metal2vulkan-runtime/src/render_state.rs:1606` (+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:6612` | `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:91`, `crates/metal2vulkan-runtime/src/render.rs:3297` (+3) | `rare`: indirect draws whose arguments the CPU must read | +| `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:6566` | `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:91`, `crates/metal2vulkan-runtime/src/render.rs:3251` (+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:1388` (+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_pass.rs:1611`, `crates/metal2vulkan-runtime/src/render_pass.rs:937` | `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:7345`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929` | `rare`: imageblocks of mixed sizes in one pass | -| `TileAndFragmentImageblocks` | A render pass that reaches its imageblock storage, from a draw whose fragment function declares an explicit imageblock or a tile dispatch whose... | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/render.rs:7337`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796` (+1) | `rare`: explicit imageblocks shared by tile and fragment functions | -| `Metal4Api` | Metal 4's API (`MTL4CommandQueue`, `MTL4CommandBuffer`, `MTL4ArgumentTable`, `MTL4Compiler` and the rest), with the features only its programming... (not scheduled) | every device (runtime piece not built) | family audit only: 3: `crates/metal2vulkan-runtime/src/families/features.rs:1497`, `crates/metal2vulkan-runtime/src/families/limits.rs:1022` (+1) | `app`: Metal 4 (the API is missing: METAL-COVERAGE.md) | -| `CounterSampleBuffers` | Counter sample buffers (`MTLCounterSampleBuffer`) and the commands that sample into them (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/limits.rs:1013` | `app`: GPU counters and timestamps by sample buffer (missing API) | -| `ResidencySets` | Residency sets (`MTLResidencySet`) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1479`, `crates/metal2vulkan-runtime/src/families/limits.rs:1015` | `app`: residency sets (missing API) | -| `TextureAccessCounters` | A sparse texture's access counters (`getTextureAccessCounters:...` and `resetTextureAccessCounters:...` of a blit encoder) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1466`, `crates/metal2vulkan-runtime/src/families/features.rs:1471` | `rare`: sparse texture access counters | -| `IoCommandQueues` | Fast resource loading (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1476`, `crates/metal2vulkan-runtime/src/families/limits.rs:1020` | `rare`: fast resource loading (missing API) | -| `TextureViewPools` | Texture view pools (`MTLTextureViewPool`) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1480`, `crates/metal2vulkan-runtime/src/families/limits.rs:1021` | `rare`: texture view pools (missing API) | -| `ColorAttachmentMapping` | Color attachment mapping (`MTLLogicalToPhysicalColorAttachmentMap`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1481` | `rare`: color attachment mapping (missing API) | -| `LossyTextureCompression` | Lossy texture compression (`MTLTextureCompressionTypeLossy`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1475` | `rare`: lossy texture compression | -| `ShaderValidation` | Per-pipeline shader validation (`MTLShaderValidation`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1477` | `rare`: per-pipeline shader validation | -| `ShaderLogging` | Shader logging (`MTLLogState`, a shader's `os_log`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1478` | `rare`: shader os_log | -| `DeviceNotifications` | Device notifications (`MTLCopyAllDevicesWithObserver`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1482` | `rare`: device hotplug notifications (deprecated) | +| `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:7299`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:930` | `rare`: imageblocks of mixed sizes in one pass | +| `TileAndFragmentImageblocks` | A render pass that reaches its imageblock storage, from a draw whose fragment function declares an explicit imageblock or a tile dispatch whose... | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/render.rs:7291`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:797` (+1) | `rare`: explicit imageblocks shared by tile and fragment functions | +| `Metal4Api` | Metal 4's API (`MTL4CommandQueue`, `MTL4CommandBuffer`, `MTL4ArgumentTable`, `MTL4Compiler` and the rest), with the features only its programming... (not scheduled) | every device (runtime piece not built) | family audit only: 3: `crates/metal2vulkan-runtime/src/families/features.rs:1485`, `crates/metal2vulkan-runtime/src/families/limits.rs:1026` (+1) | `app`: Metal 4 (the API is missing: METAL-COVERAGE.md) | +| `CounterSampleBuffers` | Counter sample buffers (`MTLCounterSampleBuffer`) and the commands that sample into them (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/limits.rs:1017` | `app`: GPU counters and timestamps by sample buffer (missing API) | +| `ResidencySets` | Residency sets (`MTLResidencySet`) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1467`, `crates/metal2vulkan-runtime/src/families/limits.rs:1019` | `app`: residency sets (missing API) | +| `TextureAccessCounters` | A sparse texture's access counters (`getTextureAccessCounters:...` and `resetTextureAccessCounters:...` of a blit encoder) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1454`, `crates/metal2vulkan-runtime/src/families/features.rs:1459` | `rare`: sparse texture access counters | +| `IoCommandQueues` | Fast resource loading (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1464`, `crates/metal2vulkan-runtime/src/families/limits.rs:1024` | `rare`: fast resource loading (missing API) | +| `TextureViewPools` | Texture view pools (`MTLTextureViewPool`) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1468`, `crates/metal2vulkan-runtime/src/families/limits.rs:1025` | `rare`: texture view pools (missing API) | +| `ColorAttachmentMapping` | Color attachment mapping (`MTLLogicalToPhysicalColorAttachmentMap`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1469` | `rare`: color attachment mapping (missing API) | +| `LossyTextureCompression` | Lossy texture compression (`MTLTextureCompressionTypeLossy`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1463` | `rare`: lossy texture compression | +| `ShaderValidation` | Per-pipeline shader validation (`MTLShaderValidation`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1465` | `rare`: per-pipeline shader validation | +| `ShaderLogging` | Shader logging (`MTLLogState`, a shader's `os_log`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1466` | `rare`: shader os_log | +| `DeviceNotifications` | Device notifications (`MTLCopyAllDevicesWithObserver`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1470` | `rare`: device hotplug notifications (deprecated) | | `RateMapRegions` | A draw in a rate-mapped pass that the region path does not draw, for the compile layer's reason (`rate_mapped_pass.rs`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/rate_mapped_pass.rs:349` | `rare`: draws in rate-mapped passes the region path does not draw | | `LayeredPass` | A layered render pass (`renderTargetArrayLength` 2 or more) that needs a step of one layer | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/color_resolve.rs:890` | `rare`: layered passes needing a per-layer color resolve | | `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:1273` | `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:637`, `crates/metal2vulkan-runtime/src/texture/heap.rs:2724` (+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:5761` | `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:1682`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1371` | `app`: an ASTC texture in a heap on a device without ASTC | +| `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:621`, `crates/metal2vulkan-runtime/src/texture/heap.rs:2724` (+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:5716` | `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:1680`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1371` | `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) | 1: `crates/metal2vulkan-runtime/src/render/restart.rs:71` | `none`: a strip after the Apple-private setPrimitiveRestartEnabled:index: whose rewrite pass cannot run as Metal draws | -| `PrivatePrimitives` | A draw of one of Metal's private primitive types (`DrawPrimitiveType` | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:7932`, `crates/metal2vulkan-runtime/src/render/restart.rs:72` | `none`: a draw of an Apple-private primitive type (OpenGL on Metal's quads and kin) whose list cannot draw as Metal draws: a list past a u32 or one storage range, indices or arguments an unordered earlier draw wrote | +| `PrivatePrimitives` | A draw of one of Metal's private primitive types (`DrawPrimitiveType` | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:704`, `crates/metal2vulkan-runtime/src/render/restart.rs:72` | `none`: a draw of an Apple-private primitive type (OpenGL on Metal's quads and kin) whose list cannot draw as Metal draws: a primitive_id varying, a vertex start past 2^31 | | `ProvokingVertex` | A draw under Apple's last provoking vertex (`setProvokingVertexMode:` 1) on a device without `VK_EXT_provoking_vertex`'s last vertex, which the... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/restart.rs:73` | `none`: a draw after the Apple-private setProvokingVertexMode: 1, on a device without the last provoking vertex, whose rotated list cannot draw 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:7942` | `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 | +| `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:7870` | `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:1602`, `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:641`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:622` (+6) | `none`: a runtime extension's detach with a texture no stand-in presents exactly | +| `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:625`, `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:4924` | `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:4922` | `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:269`, `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 | | `ExtendedRangeResolve` | The multisample resolve (`MultisampleResolve`, `StoreAndMultisampleResolve`) of a color attachment of an extended-range format (`BGRA10_XR`,... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/resolve.rs:604` | `rare`: a multisample resolve of a BGRA10_XR, BGR10_XR or sRGB twin attachment (EDR content drawn multisampled) | -| `PredicationDropsUngatedWork` | 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) | 1: `crates/metal2vulkan-runtime/src/predication.rs:762` | `none`: an unbalanced Apple-private command-predication record as its unit's first, after dispatches of the unit | +| `PredicationDropsUngatedWork` | 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) | 1: `crates/metal2vulkan-runtime/src/predication.rs:729` | `none`: an unbalanced Apple-private command-predication record as its unit's first, after dispatches of the unit | | `MultisampledBufferCopy` | A blit copy between a buffer and a multisampled texture (`copyFromBuffer:...toTexture:` into, or `copyFromTexture:...toBuffer:` out of, a texture... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/blit_texture.rs:527`, `crates/metal2vulkan-runtime/src/blit_texture.rs:674` | `rare`: a buffer<->multisampled-texture copy on a device without sample-rate shading, an integer multisample attachment at the count, or the copy format's storage; and, where maintenance8's depth/colour copies are missing or wrong, what the sample-rate draws cannot move: a 16-bit depth, or a depth or stencil texture they cannot sample or render to (emulated elsewhere; the consumer's Maps pans and screensaver make the copy) | | `MultisampledBufferLayout` | A blit copy between a buffer and a multisampled texture (as for `MultisampledBufferCopy`) in one of two buffer layouts that plain Metal copies by... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/sample_interleave.rs:1020` | `rare`: a buffer<->multisampled-texture copy at a bytesPerRow of 0 from an offset that is a multiple of 16, or of pixels of 32 bytes or more at a pitch below a row or off the pixel: Metal copies these by rules not yet reduced, and its API validation rejects them | | `ColorAttachmentGroups` | What a render pass the device draws in color groups does not build | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/color_groups.rs:106` | `app`: in a render pass of more color attachments than the device draws at once (five or more on a device of four), or one at an index past them: a pipeline state of other colors, a tile state, an execution of render commands, a draw reading another group's attachment | @@ -235,10 +234,10 @@ Generated at `f9975a407`. | Variant | What it blocks | Where | Sites | Reach | |---|---|---|---|---| -| `ProtectedContent` | Protection options whose answer on Metal is not measured (`command_buffer/protection.rs`) | every device (Apple-private, Metal's answer not measured) | 3: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2358`, `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126` (+1) | `none`: Apple-private (no public header) | -| `LineWidth` | A line width other than 1 (`setLineWidth:`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:189` | `none`: Apple-private (no public header) | -| `ViewportTransformDisabled` | The viewport transform turned off (`setViewportTransformEnabled:NO`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:191` | `none`: Apple-private (no public header) | -| `VertexAmplificationMode` | `setVertexAmplificationMode:value:` of a count (the value's set bits in mode 1, else the value) of 0, whose copies change from run to run on... | every device (Apple-private, Metal's answer not measured) | 2: `crates/metal2vulkan-runtime/src/apple_only.rs:195`, `crates/metal2vulkan-runtime/src/apple_only.rs:312` | `none`: Apple-private (no public header) | +| `ProtectedContent` | Protected content | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:193` | `none`: Apple-private (no public header) | +| `LineWidth` | A line width other than 1 (`setLineWidth:`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:195` | `none`: Apple-private (no public header) | +| `ViewportTransformDisabled` | The viewport transform turned off (`setViewportTransformEnabled:NO`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:197` | `none`: Apple-private (no public header) | +| `VertexAmplificationMode` | `setVertexAmplificationMode:value:` of a count (the value's set bits in mode 1, else the value) of 0, whose copies change from run to run on... | every device (Apple-private, Metal's answer not measured) | 2: `crates/metal2vulkan-runtime/src/apple_only.rs:201`, `crates/metal2vulkan-runtime/src/apple_only.rs:327` | `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:417` | `none`: an IOSurface key in no public header | ## 4. Binder refusals at a device limit (`BindError`) @@ -248,9 +247,9 @@ Generated at `f9975a407`. | `DescriptorRangeExceeded` | A descriptor-form slot's window exceeds the descriptor range limit (Profile F) | at the device's limit | 1: `crates/metal2vulkan/src/bind/instantiate.rs:653` | `app`: a buffer window past a device's descriptor range | | `TexelBufferTooLarge` | A texel buffer exceeds `maxTexelBufferElements` | at the device's limit | 1: `crates/metal2vulkan/src/bind/instantiate.rs:892` | `rare`: a texture buffer past maxTexelBufferElements | | `HeapTooLarge` | The set-1 heap's elements (one per resident texture a handle can name, plus the null element) exceed the pipeline's heap capacity | at the device's limit | 7: `crates/metal2vulkan/src/bind/heap.rs:1014`, `crates/metal2vulkan/src/bind/heap.rs:1748` (+5) | `rare`: more resident textures than the pipeline's heap holds (bindless at scale) | -| `TessellationFactorRange` | The tessellation factors a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`),... | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3630` | `rare`: tessellation factors past one storage descriptor | -| `PatchIndexRange` | The patch indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3674` | `rare`: patch indices past one storage descriptor | -| `ControlPointIndexRange` | The control-point indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3712` | `rare`: control-point indices past one storage descriptor | +| `TessellationFactorRange` | The tessellation factors a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`),... | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3619` | `rare`: tessellation factors past one storage descriptor | +| `PatchIndexRange` | The patch indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3663` | `rare`: patch indices past one storage descriptor | +| `ControlPointIndexRange` | The control-point indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3701` | `rare`: control-point indices past one storage descriptor | | `MissingStageInRegion` | The kernel reads the compute encoder's stage-in region (a `[[stage_in]]` attribute stepping by thread position, or `[[grid_origin]]` or... | at the device's limit | 1: `crates/metal2vulkan/src/bind/dispatch.rs:796` | `none`: a stage-in region never set, which Metal leaves undefined | | `UniformViewAliased` | A `device` buffer slot the pipeline reads through a uniform view (Profile F's per-stage storage-buffer fallback,... | at the device's limit | 1: `crates/metal2vulkan/src/bind/instantiate.rs:607` | `rare`: Profile F's uniform-view fallback aliased by a write | | `MissingDeviceAddress` | A device-address slot received a buffer without a device address | at the device's limit | 1: `crates/metal2vulkan/src/bind/plan/slots.rs:133` | `rare`: a slot reached through a pointer loaded from memory, bound with inline bytes or on a device without device addresses | @@ -315,7 +314,7 @@ Each refusal's sites, with the function that builds it. - `feature::QuadOperations`: `crates/metal2vulkan/src/device/subgroup.rs:371 (subgroup_tier)`; `crates/metal2vulkan/src/device/subgroup.rs:405 (subgroup_tier)` - `feature::SimdgroupMatrix`: `crates/metal2vulkan/src/lower/simd/matrix.rs:83 (not_implemented)` - `feature::ArgumentBufferPointers`: `crates/metal2vulkan/src/device/metal.rs:236 (unsupported_features)` -- `feature::ArgumentBufferTextures`: `crates/metal2vulkan-runtime/src/families/features.rs:1658 (tier2)`; `crates/metal2vulkan-runtime/src/pipeline/objects.rs:1036 (create_set_layout)`; `crates/metal2vulkan-runtime/src/resource_ids.rs:1256 (check_capacity)`; `crates/metal2vulkan/src/bind/heap.rs:1325 (array)`; `crates/metal2vulkan/src/bind/heap.rs:415 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:423 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:467 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:472 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:485 (member_view)`; `crates/metal2vulkan/src/lower/access/handle.rs:708 (select)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2362 (select_one)`; `crates/metal2vulkan/src/lower/sampler/select.rs:308 (select_sampling)`; `crates/metal2vulkan/src/lower/sampler/select.rs:469 (select_heap_sampling)`; `crates/metal2vulkan/src/lower/texture/atomic.rs:140 (select)`; `crates/metal2vulkan/src/lower/texture/slot.rs:465 (declare_heap)`; `crates/metal2vulkan/src/lower/texture/slot.rs:534 (declare_heap)`; `crates/metal2vulkan/src/pipeline/link.rs:977 (heap_set)` +- `feature::ArgumentBufferTextures`: `crates/metal2vulkan-runtime/src/families/features.rs:1646 (tier2)`; `crates/metal2vulkan-runtime/src/pipeline/objects.rs:1036 (create_set_layout)`; `crates/metal2vulkan-runtime/src/resource_ids.rs:1243 (check_capacity)`; `crates/metal2vulkan/src/bind/heap.rs:1325 (array)`; `crates/metal2vulkan/src/bind/heap.rs:415 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:423 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:467 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:472 (member_view)`; `crates/metal2vulkan/src/bind/heap.rs:485 (member_view)`; `crates/metal2vulkan/src/lower/access/handle.rs:708 (select)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2362 (select_one)`; `crates/metal2vulkan/src/lower/sampler/select.rs:308 (select_sampling)`; `crates/metal2vulkan/src/lower/sampler/select.rs:469 (select_heap_sampling)`; `crates/metal2vulkan/src/lower/texture/atomic.rs:140 (select)`; `crates/metal2vulkan/src/lower/texture/slot.rs:465 (declare_heap)`; `crates/metal2vulkan/src/lower/texture/slot.rs:534 (declare_heap)`; `crates/metal2vulkan/src/pipeline/link.rs:977 (heap_set)` - `feature::ArgumentBufferObjects`: `crates/metal2vulkan/src/lower/access/encode.rs:446 (select_command)`; `crates/metal2vulkan/src/lower/access/encode.rs:496 (select_command)`; `crates/metal2vulkan/src/lower/access/encode.rs:624 (select_command)`; `crates/metal2vulkan/src/memory/provenance.rs:2185 (classify)`; `crates/metal2vulkan/src/memory/provenance.rs:2547 (access)` - `feature::DereferenceLoadedPointer`: `crates/metal2vulkan/src/lower/access/dynamic.rs:407 (plan_misses)`; `crates/metal2vulkan/src/lower/access/local.rs:774 (access_ptr)`; `crates/metal2vulkan/src/lower/access/local.rs:796 (threadgroup_constant_refusal)`; `crates/metal2vulkan/src/memory/plan.rs:593 (analyze)` - `feature::PointerToInteger`: `crates/metal2vulkan/src/lower/access/dynamic.rs:347 (require_addresses)` @@ -327,10 +326,10 @@ Each refusal's sites, with the function that builds it. - `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:1684 (accept_placement)`; `crates/metal2vulkan/src/lower/select.rs:1641 (finish)`; `crates/metal2vulkan/src/pipeline/link.rs:1135 (limit_error)` -- `feature::BufferRange`: `crates/metal2vulkan-runtime/src/function_table.rs:569 (past_storage_buffer_range)`; `crates/metal2vulkan/src/bind/graphics.rs:3635 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3679 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3717 (patch_binding)`; `crates/metal2vulkan/src/bind/instantiate.rs:659 (bind_buffers)`; `crates/metal2vulkan/src/lower/access/function_table.rs:226 (select)`; `crates/metal2vulkan/src/lower/access/mod.rs:1184 (place_slots)` +- `feature::BufferRange`: `crates/metal2vulkan-runtime/src/function_table.rs:569 (past_storage_buffer_range)`; `crates/metal2vulkan/src/bind/graphics.rs:3624 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3668 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3706 (patch_binding)`; `crates/metal2vulkan/src/bind/instantiate.rs:659 (bind_buffers)`; `crates/metal2vulkan/src/lower/access/function_table.rs:226 (select)`; `crates/metal2vulkan/src/lower/access/mod.rs:1184 (place_slots)` - `feature::Int64Arithmetic`: `crates/metal2vulkan/src/lower/arith/legal.rs:582 (check_scalar)`; `crates/metal2vulkan/src/lower/select.rs:1133 (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:523 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:530 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:545 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:602 (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:694 (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:2118 (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:270 (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:298 (copy_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:344 (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:1635 (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:544 (check_own_memory)`; `crates/metal2vulkan-runtime/src/image_plan.rs:670 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:787 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:907 (plan_held)`; `crates/metal2vulkan-runtime/src/render.rs:2287 (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1031 (check_target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1369 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1709 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1802 (attachment_format)`; `crates/metal2vulkan-runtime/src/resolve.rs:409 (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/resolve.rs:616 (color)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:176 (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:204 (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs:301 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:648 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:655 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:2047 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3588 (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:1947 (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:122 (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:412 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:422 (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:687 (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:1193 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1214 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1220 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1226 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1251 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1428 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1844 (select_read)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1952 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1979 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1998 (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:2355 (entry)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:896 (zeroed_output)`; `crates/metal2vulkan/src/lower/stage_io/word_color.rs:83 (plan)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2360 (select)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3002 (cross_class)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3174 (select_image)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3344 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3381 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3714 (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:1693 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1695 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1825 (candidates)`; `crates/metal2vulkan/src/metal/format/mod.rs:2783 (storage_choice_viewed)`; `crates/metal2vulkan/src/metal/format/mod.rs:2801 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2809 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2906 (held_storage_choice)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1100 (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:969 (reads_alpha_to_coverage)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:990 (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:523 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:530 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:545 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:602 (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:694 (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:2118 (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:1623 (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:544 (check_own_memory)`; `crates/metal2vulkan-runtime/src/image_plan.rs:670 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:787 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:907 (plan_held)`; `crates/metal2vulkan-runtime/src/render.rs:2241 (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1031 (check_target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1369 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1709 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1802 (attachment_format)`; `crates/metal2vulkan-runtime/src/resolve.rs:409 (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/resolve.rs:616 (color)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:176 (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:204 (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs:301 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:648 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:655 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:2045 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3586 (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:1947 (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:122 (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:412 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:422 (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:687 (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:1373 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1764 (select_read)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1872 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1899 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1918 (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:2352 (entry)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:896 (zeroed_output)`; `crates/metal2vulkan/src/lower/stage_io/word_color.rs:83 (plan)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2347 (select)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2989 (cross_class)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3161 (select_image)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3331 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3368 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3701 (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:1693 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1695 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1825 (candidates)`; `crates/metal2vulkan/src/metal/format/mod.rs:2783 (storage_choice_viewed)`; `crates/metal2vulkan/src/metal/format/mod.rs:2801 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2809 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2906 (held_storage_choice)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1100 (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:969 (reads_alpha_to_coverage)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:990 (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)` @@ -346,46 +345,45 @@ Each refusal's sites, with the function that builds it. - `feature::PixelSamplerCompare`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:115 (lowered)` - `feature::TexelBuffer`: `crates/metal2vulkan/src/bind/instantiate.rs:880 (texel_ranges)`; `crates/metal2vulkan/src/bind/instantiate.rs:886 (texel_ranges)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1147 (plain_texture)` - `feature::RasterOrderGroups`: `crates/metal2vulkan/src/device/metal.rs:242 (unsupported_features)`; `crates/metal2vulkan/src/lower/fragment/rog.rs:151 (mode)`; `crates/metal2vulkan/src/lower/fragment/rog.rs:172 (mode)`; `crates/metal2vulkan/src/lower/fragment/snapshot.rs:158 (finish)` -- `feature::FramebufferFetch`: `crates/metal2vulkan-runtime/src/families/features.rs:1018 (state)`; `crates/metal2vulkan-runtime/src/render.rs:5889 (next_instance)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:120 (lacks)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:147 (new)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:518 (planes_merge)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:190 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/sample_planes.rs:477 (finish)`; `crates/metal2vulkan/src/device/metal.rs:252 (unsupported_features)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1222 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1240 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1254 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1297 (packed16)`; `crates/metal2vulkan/src/lower/fragment/color.rs:215 (select_param)`; `crates/metal2vulkan/src/lower/fragment/color.rs:279 (unordered)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:195 (not_implemented)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:272 (depth_test_form)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:318 (stencil_test_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1078 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1169 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1206 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1798 (plan_sample)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:785 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/fetch.rs:164 (storage_attachments)` -- `feature::PrimitiveId`: `crates/metal2vulkan-runtime/src/families/features.rs:1127 (state)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:3211 (finish)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:240 (check_primitive_id)` -- `feature::PrivatePrimitives`: `crates/metal2vulkan/src/lower/stage_io/plan.rs:2601 (indices_feature)` -- `feature::VertexAmplification`: `crates/metal2vulkan/src/bind/graphics.rs:3976 (multiview_instances)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312 (own_index_store)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:718 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:258 (vertex_amplification)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:228 (control_plan)` -- `feature::LayeredRendering`: `crates/metal2vulkan-runtime/src/render_pass.rs:1669 (target)`; `crates/metal2vulkan-runtime/src/render_state.rs:1107 (needs_viewports)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:778 (target_index)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:797 (target_index)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1313 (own_index_store)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:150 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:172 (refused)` -- `feature::ClipDistance`: `crates/metal2vulkan/src/lower/mesh/mod.rs:934 (select)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:942 (select)` +- `feature::FramebufferFetch`: `crates/metal2vulkan-runtime/src/families/features.rs:1016 (state)`; `crates/metal2vulkan-runtime/src/render.rs:5843 (next_instance)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:120 (lacks)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:147 (new)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:518 (planes_merge)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:190 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/sample_planes.rs:477 (finish)`; `crates/metal2vulkan/src/device/metal.rs:252 (unsupported_features)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1198 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1216 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1230 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1273 (packed16)`; `crates/metal2vulkan/src/lower/fragment/color.rs:215 (select_param)`; `crates/metal2vulkan/src/lower/fragment/color.rs:279 (unordered)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:195 (not_implemented)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:272 (depth_test_form)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:318 (stencil_test_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1024 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1114 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1151 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1718 (plan_sample)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:749 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/fetch.rs:164 (storage_attachments)` +- `feature::PrimitiveId`: `crates/metal2vulkan-runtime/src/families/features.rs:1125 (state)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:3179 (finish)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:240 (check_primitive_id)` +- `feature::VertexAmplification`: `crates/metal2vulkan/src/bind/graphics.rs:3965 (multiview_instances)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312 (own_index_store)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:718 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:258 (vertex_amplification)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:228 (control_plan)` +- `feature::LayeredRendering`: `crates/metal2vulkan-runtime/src/render_pass.rs:1669 (target)`; `crates/metal2vulkan-runtime/src/render_state.rs:1107 (needs_viewports)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:781 (target_index)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:800 (target_index)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1313 (own_index_store)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:150 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:172 (refused)` +- `feature::ClipDistance`: `crates/metal2vulkan/src/lower/mesh/mod.rs:941 (select)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:949 (select)` - `feature::DualSourceBlending`: `crates/metal2vulkan-runtime/src/families/formats.rs:386 (answers)`; `crates/metal2vulkan/src/metal/state.rs:37 (blend_factor)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1157 (check_outputs)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:463 (rotated_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:538 (rotated_blend)` -- `feature::Barycentrics`: `crates/metal2vulkan/src/device/metal.rs:263 (unsupported_features)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1924 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:745 (param)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:148 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:170 (refused)` -- `feature::StencilExport`: `crates/metal2vulkan-runtime/src/families/features.rs:1114 (state)`; `crates/metal2vulkan/src/bind/graphics.rs:2672 (shadow_stencil_words)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:157 (device_form)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:168 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:55 (shadow_stencil)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:73 (shadow_stencil)` +- `feature::Barycentrics`: `crates/metal2vulkan/src/device/metal.rs:263 (unsupported_features)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1921 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:745 (param)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:148 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:170 (refused)` +- `feature::StencilExport`: `crates/metal2vulkan-runtime/src/families/features.rs:1112 (state)`; `crates/metal2vulkan/src/bind/graphics.rs:2651 (shadow_stencil_words)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:157 (device_form)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:168 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:55 (shadow_stencil)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:73 (shadow_stencil)` - `feature::SampleRateShading`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:844 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:846 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:928 (sample_invocations)` - `feature::PixelCoverageAtSampleRate`: `crates/metal2vulkan/src/lower/fragment/coverage.rs:296 (finish)`; `crates/metal2vulkan/src/lower/simd/mod.rs:754 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:879 (sample_invocations)` - `feature::InterfaceComponents`: `crates/metal2vulkan/src/pipeline/compile/color_group.rs:202 (refusal)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:301 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:409 (assign)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:90 (limit_error)` - `feature::UnmatchedVarying`: `crates/metal2vulkan/src/pipeline/link/varyings.rs:318 (mesh_fragment)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:537 (varyings)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:548 (varyings)` - `feature::KernelStageIn`: `crates/metal2vulkan-runtime/src/indirect_execute.rs:376 (record)`; `crates/metal2vulkan/src/bind/dispatch.rs:871 (instantiate)`; `crates/metal2vulkan/src/lower/stage_io/stage_in.rs:133 (select)` -- `feature::Tessellation`: `crates/metal2vulkan-air/src/canon/mod.rs:1256 (post_check)`; `crates/metal2vulkan-air/src/canon/mod.rs:1347 (post_check)`; `crates/metal2vulkan/src/bind/graphics.rs:3833 (tessellation_dispatch)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:519 (select)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1508 (primitive_id_output)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1794 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:828 (param)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:150 (not_implemented)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:489 (plan_entry)`; `crates/metal2vulkan/src/metal/vertex.rs:219 (fetch_as)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:212 (control_plan)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:292 (check_fragment)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:316 (push_offset)` -- `feature::MeshShading`: `crates/metal2vulkan/src/bind/graphics.rs:1591 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:3045 (mesh_limit)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:499 (check_payload)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:538 (plan_entry)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:572 (plan_entry)`; `crates/metal2vulkan/src/memory/plan.rs:2056 (reprs)`; `crates/metal2vulkan/src/pipeline/link/mesh.rs:102 (records)` -- `feature::TileShading`: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:520 (scratch)`; `crates/metal2vulkan/src/bind/plan/compute.rs:237 (tile_memory)`; `crates/metal2vulkan/src/lower/access/tile.rs:151 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:275 (tile_shading)`; `crates/metal2vulkan/src/pipeline/compile/api.rs:699 (tile_pipeline)` -- `feature::Imageblocks`: `crates/metal2vulkan/src/lower/access/imageblock.rs:98 (imageblocks)`; `crates/metal2vulkan/src/lower/access/mod.rs:908 (select_param)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:104 (require)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:412 (reach)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:554 (plan_tests)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:578 (plan_tests)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:86 (not_implemented)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2370 (select)`; `crates/metal2vulkan/src/lower/texture/slice.rs:139 (imageblocks)`; `crates/metal2vulkan/src/pipeline/link/imageblock.rs:50 (fragment_imageblock)` +- `feature::Tessellation`: `crates/metal2vulkan-air/src/canon/mod.rs:1256 (post_check)`; `crates/metal2vulkan-air/src/canon/mod.rs:1347 (post_check)`; `crates/metal2vulkan/src/bind/graphics.rs:3822 (tessellation_dispatch)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:519 (select)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1488 (primitive_id_output)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1791 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:828 (param)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:150 (not_implemented)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:489 (plan_entry)`; `crates/metal2vulkan/src/metal/vertex.rs:219 (fetch_as)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:212 (control_plan)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:292 (check_fragment)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:316 (push_offset)` +- `feature::MeshShading`: `crates/metal2vulkan/src/bind/graphics.rs:1575 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:3024 (mesh_limit)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:502 (check_payload)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:541 (plan_entry)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:575 (plan_entry)`; `crates/metal2vulkan/src/memory/plan.rs:2056 (reprs)`; `crates/metal2vulkan/src/pipeline/link/mesh.rs:95 (records)` +- `feature::TileShading`: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:521 (scratch)`; `crates/metal2vulkan/src/bind/plan/compute.rs:237 (tile_memory)`; `crates/metal2vulkan/src/lower/access/tile.rs:151 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:275 (tile_shading)`; `crates/metal2vulkan/src/pipeline/compile/api.rs:690 (tile_pipeline)` +- `feature::Imageblocks`: `crates/metal2vulkan/src/lower/access/imageblock.rs:98 (imageblocks)`; `crates/metal2vulkan/src/lower/access/mod.rs:908 (select_param)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:104 (require)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:412 (reach)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:554 (plan_tests)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:578 (plan_tests)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:86 (not_implemented)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2357 (select)`; `crates/metal2vulkan/src/lower/texture/slice.rs:139 (imageblocks)`; `crates/metal2vulkan/src/pipeline/link/imageblock.rs:50 (fragment_imageblock)` - `feature::RayTracing`: `crates/metal2vulkan/src/bind/acceleration.rs:202 (instance_record)`; `crates/metal2vulkan/src/bind/acceleration.rs:216 (instance_record)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1087 (primitive_data_read)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1202 (instance_count)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1245 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1257 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1282 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1297 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1312 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:344 (slot_of)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:385 (select_param)`; `crates/metal2vulkan/src/lower/select.rs:899 (route_air)` - `feature::Tensors`: `crates/metal2vulkan-air/src/canon/matmul2d/synth.rs:32 (refuse)`; `crates/metal2vulkan/src/lower/select.rs:903 (route_air)` - `feature::RasterizationRateMap`: `crates/metal2vulkan/src/lower/fragment/mod.rs:930 (select)` -- `feature::GpuEncodedIndirectCommands`: `crates/metal2vulkan/src/bind/replay.rs:556 (preprocess)`; `crates/metal2vulkan/src/bind/replay.rs:796 (replay_preprocess_module)`; `crates/metal2vulkan/src/bind/replay/draws.rs:280 (draw_replay_preprocess)`; `crates/metal2vulkan/src/bind/replay/draws.rs:482 (draw_replay_module)`; `crates/metal2vulkan/src/bind/replay/flat.rs:247 (flat_dispatch_module)`; `crates/metal2vulkan/src/bind/replay/merged.rs:242 (draw_merge_module)`; `crates/metal2vulkan/src/lower/access/encode.rs:394 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:410 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:527 (select_command)`; `crates/metal2vulkan/src/lower/access/mod.rs:1539 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1562 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1565 (plan_replay)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2707 (merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2763 (finish_merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:458 (param)`; `crates/metal2vulkan/src/pipeline/compile.rs:2126 (plan_one)`; `crates/metal2vulkan/src/pipeline/compile.rs:2131 (plan_one)` +- `feature::GpuEncodedIndirectCommands`: `crates/metal2vulkan/src/bind/replay.rs:556 (preprocess)`; `crates/metal2vulkan/src/bind/replay.rs:796 (replay_preprocess_module)`; `crates/metal2vulkan/src/bind/replay/draws.rs:280 (draw_replay_preprocess)`; `crates/metal2vulkan/src/bind/replay/draws.rs:482 (draw_replay_module)`; `crates/metal2vulkan/src/bind/replay/flat.rs:247 (flat_dispatch_module)`; `crates/metal2vulkan/src/bind/replay/merged.rs:242 (draw_merge_module)`; `crates/metal2vulkan/src/lower/access/encode.rs:394 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:410 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:527 (select_command)`; `crates/metal2vulkan/src/lower/access/mod.rs:1539 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1562 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1565 (plan_replay)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2677 (merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2733 (finish_merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:458 (param)`; `crates/metal2vulkan/src/pipeline/compile.rs:2124 (plan_one)`; `crates/metal2vulkan/src/pipeline/compile.rs:2129 (plan_one)` - `feature::VulkanVersion`: `crates/metal2vulkan/src/ash_interop/query.rs:926 (query)`; `crates/metal2vulkan/src/device/derive.rs:105 (with_deviations)` - `feature::Constant`: `crates/metal2vulkan-air/src/bitcode/constants.rs:210 (record)`; `crates/metal2vulkan-air/src/bitcode/constants.rs:268 (record)`; `crates/metal2vulkan/src/error/mod.rs:255 (from)` - `feature::Attribute`: `crates/metal2vulkan-air/src/bitcode/attrs.rs:493 (known)`; `crates/metal2vulkan/src/error/mod.rs:256 (from)` - `feature::BitcodeRecord`: `crates/metal2vulkan-air/src/bitcode/attrs.rs:337 (decode_lists)`; `crates/metal2vulkan-air/src/bitcode/function.rs:572 (symtab)`; `crates/metal2vulkan-air/src/bitcode/metadata.rs:130 (decode)`; `crates/metal2vulkan-air/src/bitcode/metadata.rs:157 (decode)`; `crates/metal2vulkan-air/src/bitcode/module.rs:727 (check_bodies)`; `crates/metal2vulkan-air/src/bitcode/module.rs:872 (symtab)`; `crates/metal2vulkan/src/error/mod.rs:257 (from)` - `feature::SyncScope`: `crates/metal2vulkan-air/src/bitcode/function.rs:1255 (atomic)`; `crates/metal2vulkan/src/error/mod.rs:258 (from)` -- `feature::SubgroupOperations`: `crates/metal2vulkan-runtime/src/families/features.rs:1723 (simd)`; `crates/metal2vulkan/src/lower/simd/mod.rs:407 (finish)`; `crates/metal2vulkan/src/lower/simd/mod.rs:466 (full_quads)`; `crates/metal2vulkan/src/lower/simd/mod.rs:990 (select_group)` +- `feature::SubgroupOperations`: `crates/metal2vulkan-runtime/src/families/features.rs:1711 (simd)`; `crates/metal2vulkan/src/lower/simd/mod.rs:407 (finish)`; `crates/metal2vulkan/src/lower/simd/mod.rs:466 (full_quads)`; `crates/metal2vulkan/src/lower/simd/mod.rs:990 (select_group)` - `feature::DirectCall`: `crates/metal2vulkan-air/src/canon/mod.rs:1319 (post_check)` - `feature::WideSwitchLiteral`: `crates/metal2vulkan/src/structurize/emit.rs:207 (check_tree)` -- `feature::Lowering`: `crates/metal2vulkan/src/bind/plan/resources.rs:762 (level_views)`; `crates/metal2vulkan/src/lower/access/handle.rs:1062 (texture_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:1073 (sampler_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:318 (domain_kind)`; `crates/metal2vulkan/src/lower/access/imageblock.rs:175 (operand)`; `crates/metal2vulkan/src/lower/access/mod.rs:571 (not_lowered)`; `crates/metal2vulkan/src/lower/access/pulled.rs:76 (share)`; `crates/metal2vulkan/src/lower/arith/legal.rs:53 (not_lowered)`; `crates/metal2vulkan/src/lower/dispatch.rs:114 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:144 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:653 (plan)`; `crates/metal2vulkan/src/lower/fragment/mod.rs:123 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/snapshot.rs:168 (finish)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:147 (not_lowered)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:126 (not_lowered)`; `crates/metal2vulkan/src/lower/sampler/mod.rs:212 (refuse)`; `crates/metal2vulkan/src/lower/sampler/select.rs:30 (refuse)`; `crates/metal2vulkan/src/lower/select.rs:829 (not_lowered)`; `crates/metal2vulkan/src/lower/select.rs:918 (route_air)`; `crates/metal2vulkan/src/lower/simd/mod.rs:136 (not_lowered)`; `crates/metal2vulkan/src/lower/simd/mod.rs:747 (select_param)`; `crates/metal2vulkan/src/lower/simd/workgroup.rs:353 (check)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:96 (not_lowered)`; `crates/metal2vulkan/src/lower/stage_io/mod.rs:182 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:72 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:269 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:310 (select)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:146 (not_lowered)`; `crates/metal2vulkan/src/lower/texture/mod.rs:180 (refuse)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3683 (select_write)`; `crates/metal2vulkan/src/memory/alloca.rs:54 (not_lowered)`; `crates/metal2vulkan/src/memory/leaf.rs:183 (not_lowered)`; `crates/metal2vulkan/src/memory/plan.rs:490 (not_lowered)`; `crates/metal2vulkan/src/memory/provenance.rs:665 (not_lowered)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:96 (patch_fetch_projection)` +- `feature::Lowering`: `crates/metal2vulkan/src/bind/plan/resources.rs:762 (level_views)`; `crates/metal2vulkan/src/lower/access/handle.rs:1062 (texture_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:1073 (sampler_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:318 (domain_kind)`; `crates/metal2vulkan/src/lower/access/imageblock.rs:175 (operand)`; `crates/metal2vulkan/src/lower/access/mod.rs:571 (not_lowered)`; `crates/metal2vulkan/src/lower/access/pulled.rs:76 (share)`; `crates/metal2vulkan/src/lower/arith/legal.rs:53 (not_lowered)`; `crates/metal2vulkan/src/lower/dispatch.rs:114 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:144 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:653 (plan)`; `crates/metal2vulkan/src/lower/fragment/mod.rs:123 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/snapshot.rs:168 (finish)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:149 (not_lowered)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:126 (not_lowered)`; `crates/metal2vulkan/src/lower/sampler/mod.rs:212 (refuse)`; `crates/metal2vulkan/src/lower/sampler/select.rs:30 (refuse)`; `crates/metal2vulkan/src/lower/select.rs:829 (not_lowered)`; `crates/metal2vulkan/src/lower/select.rs:918 (route_air)`; `crates/metal2vulkan/src/lower/simd/mod.rs:136 (not_lowered)`; `crates/metal2vulkan/src/lower/simd/mod.rs:747 (select_param)`; `crates/metal2vulkan/src/lower/simd/workgroup.rs:353 (check)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:96 (not_lowered)`; `crates/metal2vulkan/src/lower/stage_io/mod.rs:179 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:72 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:269 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:310 (select)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:146 (not_lowered)`; `crates/metal2vulkan/src/lower/texture/mod.rs:180 (refuse)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3670 (select_write)`; `crates/metal2vulkan/src/memory/alloca.rs:54 (not_lowered)`; `crates/metal2vulkan/src/memory/leaf.rs:183 (not_lowered)`; `crates/metal2vulkan/src/memory/plan.rs:490 (not_lowered)`; `crates/metal2vulkan/src/memory/provenance.rs:665 (not_lowered)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:96 (patch_fetch_projection)` - `feature::SamplerAddressMode`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:176`; `crates/metal2vulkan/src/metal/sampler.rs:251 (check_sampler)` - `feature::AlphaToOne`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:282 (graphics_state)` - `feature::StageStoresAndAtomics`: `crates/metal2vulkan/src/lower/access/tile_memory.rs:72 (written)` - `feature::FunctionConstantArgument`: `crates/metal2vulkan-air/src/canon/interface.rs:899 (absent_values)`; `crates/metal2vulkan/src/lower/access/absent.rs:100 (require)` - `feature::SamplerBicubicFilter`: `crates/metal2vulkan/src/bind/heap.rs:997 (new)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1876 (bicubic_texels)`; `crates/metal2vulkan/src/bind/plan/slots.rs:503 (cubic_variant)`; `crates/metal2vulkan/src/lower/sampler/bicubic.rs:120 (refuse)`; `crates/metal2vulkan/src/lower/sampler/select.rs:35 (bicubic_refused)` -- `feature::GroupCount`: `crates/metal2vulkan/src/bind/dispatch.rs:379 (product)`; `crates/metal2vulkan/src/bind/dispatch.rs:455`; `crates/metal2vulkan/src/bind/dispatch.rs:953 (instantiate)`; `crates/metal2vulkan/src/bind/graphics.rs:3249 (mesh_draw)`; `crates/metal2vulkan/src/bind/graphics.rs:3300 (emulated_draw)` +- `feature::GroupCount`: `crates/metal2vulkan/src/bind/dispatch.rs:379 (product)`; `crates/metal2vulkan/src/bind/dispatch.rs:455`; `crates/metal2vulkan/src/bind/dispatch.rs:953 (instantiate)`; `crates/metal2vulkan/src/bind/graphics.rs:3238 (mesh_draw)`; `crates/metal2vulkan/src/bind/graphics.rs:3289 (emulated_draw)` - `feature::IntersectionFunctionTable`: `crates/metal2vulkan/src/bind/acceleration.rs:177 (geometry_table_offset)`; `crates/metal2vulkan/src/bind/acceleration.rs:183 (geometry_table_offset)`; `crates/metal2vulkan/src/bind/acceleration.rs:188 (geometry_table_offset)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1222 (null_table)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1251 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1272 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:406 (table_of)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:422 (select_table)`; `crates/metal2vulkan/src/lower/select.rs:885 (route_air)` -- `feature::IndependentBlending`: `crates/metal2vulkan-runtime/src/render.rs:2168 (check_pipeline)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1017 (uniform_blend)` -- `feature::RasterSampleCount`: `crates/metal2vulkan-runtime/src/families/limits.rs:1059 (sample_count)`; `crates/metal2vulkan/src/pipeline/graphics.rs:563 (sample_count_properties)` +- `feature::IndependentBlending`: `crates/metal2vulkan-runtime/src/render.rs:2122 (check_pipeline)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1017 (uniform_blend)` +- `feature::RasterSampleCount`: `crates/metal2vulkan-runtime/src/families/limits.rs:1063 (sample_count)`; `crates/metal2vulkan/src/pipeline/graphics.rs:563 (sample_count_properties)` - `feature::TriangleFillLines`: `crates/metal2vulkan/src/metal/state.rs:347 (polygon_mode)` - `feature::DepthClipClamp`: `crates/metal2vulkan/src/metal/state.rs:363 (depth_clamp_enable)` - `feature::DepthBiasClamp`: `crates/metal2vulkan/src/metal/state.rs:463 (depth_bias)` @@ -393,19 +391,19 @@ 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:1196 (check_image_limits)` - `feature::TextureSampleCount`: `crates/metal2vulkan-runtime/src/image_plan.rs:1244 (check_image_limits)`; `crates/metal2vulkan-runtime/src/image_plan.rs:598 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:608 (plan_held)` -- `feature::TextureView`: `crates/metal2vulkan-runtime/src/binding_view.rs:156 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:5136 (view)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:1427 (make_second_twin)`; `crates/metal2vulkan-runtime/src/texture/view_shadow.rs:298 (apart_refusal)`; `crates/metal2vulkan-runtime/src/view_plan.rs:433 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:483 (check_view)`; `crates/metal2vulkan-runtime/src/view_plan.rs:505 (check_view)` -- `feature::TextureSwizzle`: `crates/metal2vulkan-runtime/src/binding_view.rs:167 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:996 (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:3409 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3756 (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:5134 (view)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:1427 (make_second_twin)`; `crates/metal2vulkan-runtime/src/texture/view_shadow.rs:298 (apart_refusal)`; `crates/metal2vulkan-runtime/src/view_plan.rs:433 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:483 (check_view)`; `crates/metal2vulkan-runtime/src/view_plan.rs:505 (check_view)` +- `feature::TextureSwizzle`: `crates/metal2vulkan-runtime/src/binding_view.rs:167 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:994 (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:3396 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3743 (select_write)`; `crates/metal2vulkan/src/lower/texture/slice.rs:307 (select)` - `feature::MipmapGeneration`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1818 (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:430 (not_importable)`; `crates/metal2vulkan-runtime/src/host_memory.rs:470 (refuse_unwritable)`; `crates/metal2vulkan-runtime/src/host_memory.rs:689 (new)`; `crates/metal2vulkan-runtime/src/host_memory.rs:694 (new)`; `crates/metal2vulkan-runtime/src/host_memory.rs:712 (new)` -- `feature::GpuTimes`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2783 (gpu_times)` +- `feature::GpuTimes`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2832 (gpu_times)` - `feature::CountingVisibility`: `crates/metal2vulkan-runtime/src/visibility.rs:452 (check_mode)` - `feature::ViewFormatReinterpretation`: `crates/metal2vulkan-runtime/src/view_plan.rs:570 (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:658 (nan_write)`; `crates/metal2vulkan-runtime/src/texture/signed_depth.rs:191 (sample_strip)` -- `feature::PixelCoverage`: `crates/metal2vulkan-runtime/src/families/features.rs:1225 (state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:783 (split_pixel_fragments)` +- `feature::PixelCoverage`: `crates/metal2vulkan-runtime/src/families/features.rs:1223 (state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:783 (split_pixel_fragments)` - `feature::CentroidVarying`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:801 (split_pixel_fragments)` - `feature::PrivateMemory`: `crates/metal2vulkan/src/lower/select.rs:1171 (function_storage)` - `feature::SparseTextures`: `crates/metal2vulkan-runtime/src/sparse/texture.rs:32 (sparse_refusal)` -- `feature::SparseMapping`: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:469 (splits_a_unit)` +- `feature::SparseMapping`: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:466 (splits_a_unit)` - `feature::TimelineSemaphores`: `crates/metal2vulkan-runtime/src/device/create.rs:1115 (timeline_difference)` - `feature::Reflection`: `crates/metal2vulkan/src/bind/argument_buffer.rs:626 (unmeasured)`; `crates/metal2vulkan/src/reflection/derive.rs:178 (specialized_reads)`; `crates/metal2vulkan/src/reflection/derive.rs:212 (read_attributes)`; `crates/metal2vulkan/src/reflection/derive.rs:239 (gap_at)`; `crates/metal2vulkan/src/reflection/function.rs:172 (unmeasured)`; `crates/metal2vulkan/src/reflection/function.rs:366 (attribute)`; `crates/metal2vulkan/src/reflection/function.rs:437 (module_constants)`; `crates/metal2vulkan/src/reflection/linked.rs:125 (function)`; `crates/metal2vulkan/src/reflection/mod.rs:249 (stage)` - `feature::HeapTextureTiling`: `crates/metal2vulkan-runtime/src/texture/heap.rs:628 (tiling_refusal)` @@ -414,29 +412,29 @@ Each refusal's sites, with the function that builds it. - `feature::RenderTargetSize`: `crates/metal2vulkan-runtime/src/render_pass.rs:1271 (framebuffer_fits)` - `feature::IndirectRenderState`: `crates/metal2vulkan/src/lower/access/encode.rs:568 (select_command)` - `feature::GlobalBuiltinInFragment`: `crates/metal2vulkan/src/lower/select.rs:912 (route_air)` -- `feature::PrivateRenderState`: `crates/metal2vulkan/src/bind/heap.rs:1300 (array)`; `crates/metal2vulkan/src/bind/plan/resources.rs:887 (write_rounding)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2710 (clamps_reference)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:3438 (alpha_test_refused)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2920 (mode_rounded_write)`; `crates/metal2vulkan/src/pipeline/private_state.rs:378 (logic_operation)`; `crates/metal2vulkan/src/pipeline/private_state.rs:97 (refused)` -- `feature::ExtendedRangeBlend`: `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:305 (refused)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1629 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1632 (plan)`; `crates/metal2vulkan/src/lower/fragment/input_blend.rs:153 (plan)` -- `feature::TileReach`: `crates/metal2vulkan/src/bind/tile_reach.rs:270 (tile_reach_module)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2517 (capture)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2543 (capture)` +- `feature::PrivateRenderState`: `crates/metal2vulkan/src/bind/heap.rs:1300 (array)`; `crates/metal2vulkan/src/bind/plan/resources.rs:887 (write_rounding)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2710 (clamps_reference)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:3406 (alpha_test_refused)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2907 (mode_rounded_write)`; `crates/metal2vulkan/src/pipeline/private_state.rs:378 (logic_operation)`; `crates/metal2vulkan/src/pipeline/private_state.rs:97 (refused)` +- `feature::ExtendedRangeBlend`: `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:305 (refused)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1555 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1558 (plan)`; `crates/metal2vulkan/src/lower/fragment/input_blend.rs:153 (plan)` +- `feature::TileReach`: `crates/metal2vulkan/src/bind/tile_reach.rs:270 (tile_reach_module)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2514 (capture)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2540 (capture)` - `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)` -- `feature::PostDepthCoverage`: `crates/metal2vulkan-runtime/src/families/features.rs:1219 (state)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:783 (param)` -- `gap::Textures`: `crates/metal2vulkan-runtime/src/blit_texture.rs:163 (check_depth_view)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:1563 (view_usage)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1625 (compile_error)`; `crates/metal2vulkan-runtime/src/texture.rs:1461 (image_error)`; `crates/metal2vulkan-runtime/src/texture.rs:2221 (storage_over_buffer)`; `crates/metal2vulkan-runtime/src/texture.rs:3036 (new_image_starting)`; `crates/metal2vulkan-runtime/src/texture.rs:4078 (image)`; `crates/metal2vulkan-runtime/src/texture.rs:5689 (host_copy)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:207 (new_surface_planes_texture)` -- `gap::ResourceHeap`: `crates/metal2vulkan-runtime/src/binding.rs:1982 (descriptor)` -- `gap::SparseHeaps`: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:461 (first_slice)`; `crates/metal2vulkan-runtime/src/texture.rs:1674 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture.rs:4826 (make_aliasable)` -- `gap::SparseTileMaps`: `crates/metal2vulkan-runtime/src/binding.rs:562 (slot_tile_map)`; `crates/metal2vulkan-runtime/src/sparse/texture.rs:30 (sparse_refusal)`; `crates/metal2vulkan-runtime/src/texture.rs:1707 (plan_sparse_texture)` +- `feature::PostDepthCoverage`: `crates/metal2vulkan-runtime/src/families/features.rs:1217 (state)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:783 (param)` +- `gap::Textures`: `crates/metal2vulkan-runtime/src/blit_texture.rs:163 (check_depth_view)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:1563 (view_usage)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1625 (compile_error)`; `crates/metal2vulkan-runtime/src/texture.rs:1459 (image_error)`; `crates/metal2vulkan-runtime/src/texture.rs:2219 (storage_over_buffer)`; `crates/metal2vulkan-runtime/src/texture.rs:3034 (new_image_starting)`; `crates/metal2vulkan-runtime/src/texture.rs:4076 (image)`; `crates/metal2vulkan-runtime/src/texture.rs:5644 (host_copy)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:207 (new_surface_planes_texture)` +- `gap::ResourceHeap`: `crates/metal2vulkan-runtime/src/binding.rs:2048 (descriptor)` +- `gap::SparseHeaps`: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:458 (first_slice)`; `crates/metal2vulkan-runtime/src/texture.rs:1672 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture.rs:4824 (make_aliasable)` +- `gap::SparseTileMaps`: `crates/metal2vulkan-runtime/src/binding.rs:553 (slot_tile_map)`; `crates/metal2vulkan-runtime/src/sparse/texture.rs:30 (sparse_refusal)`; `crates/metal2vulkan-runtime/src/texture.rs:1705 (plan_sparse_texture)` - `gap::HeapPastMaxBufferSize`: `crates/metal2vulkan-runtime/src/heap.rs:714 (heap_size)` - `gap::HeapTextureAlignment`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1069 (check_heap_base)` - `gap::HeapTextureMemory`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1508 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1515 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2057 (host_heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2289 (memory_shadow)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:552 (memory_refusal)` - `gap::FunctionTablePastMaxBufferLength`: `crates/metal2vulkan-runtime/src/function_table.rs:622 (past_limit)` - `gap::IndirectCommandBufferPastMaxBufferLength`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:522 (new_indirect_command_buffer)` -- `gap::IndirectRenderCommands`: `crates/metal2vulkan-runtime/src/compute.rs:1144 (execute_range)`; `crates/metal2vulkan-runtime/src/compute.rs:1225 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/depth_stencil.rs:85 (gpu_resource_id)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:4358 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:517 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1632 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:7191 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7676 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8093 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8561 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1106 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2057 (record)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2906 (record_forms)`; `crates/metal2vulkan-runtime/src/render/executions.rs:382 (execute_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:441 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:456 (execute_indirect_range)` +- `gap::IndirectRenderCommands`: `crates/metal2vulkan-runtime/src/compute.rs:1115 (execute_range)`; `crates/metal2vulkan-runtime/src/compute.rs:1196 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/depth_stencil.rs:85 (gpu_resource_id)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:4356 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:517 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1632 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:7145 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7616 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8021 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8528 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1104 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2008 (record)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2051 (record)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2900 (record_forms)`; `crates/metal2vulkan-runtime/src/render/executions.rs:380 (execute_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:439 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:454 (execute_indirect_range)` - `gap::IndirectImageblockSize`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3363 (set_imageblock_size)` -- `gap::CommandReplay`: `crates/metal2vulkan-runtime/src/binding.rs:723 (bind_into)`; `crates/metal2vulkan-runtime/src/binding.rs:726 (bind_into)` -- `gap::RenderAttachments`: `crates/metal2vulkan-runtime/src/binding.rs:1794 (unexpected)` -- `gap::AccelerationStructures`: `crates/metal2vulkan-runtime/src/binding.rs:1797 (unexpected)` +- `gap::CommandReplay`: `crates/metal2vulkan-runtime/src/binding.rs:720 (bind_into)`; `crates/metal2vulkan-runtime/src/binding.rs:723 (bind_into)` +- `gap::RenderAttachments`: `crates/metal2vulkan-runtime/src/binding.rs:1871 (unexpected)` +- `gap::AccelerationStructures`: `crates/metal2vulkan-runtime/src/binding.rs:1874 (unexpected)` - `gap::FeatureEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1165 (of)` - `gap::ExtensionEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1156 (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: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:204 (plan)`; `crates/metal2vulkan-runtime/src/pipeline/render.rs:1169 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:2218 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:5935 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7770 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:516 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1313 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1676 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1730 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1791 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:2024 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:1035 (attach)`; `crates/metal2vulkan-runtime/src/resolve.rs:1103 (color_copy)`; `crates/metal2vulkan-runtime/src/resolve.rs:1150 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1167 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1232 (destination)` +- `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:204 (plan)`; `crates/metal2vulkan-runtime/src/pipeline/render.rs:1169 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:2172 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:5889 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7710 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:517 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1313 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1676 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1730 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1791 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:2024 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:1035 (attach)`; `crates/metal2vulkan-runtime/src/resolve.rs:1103 (color_copy)`; `crates/metal2vulkan-runtime/src/resolve.rs:1150 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1167 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1232 (destination)` - `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:1861 (positioned_stand_in)`; `crates/metal2vulkan-runtime/src/sample_positions.rs:185 (grid)` @@ -444,60 +442,60 @@ Each refusal's sites, with the function that builds it. - `gap::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render/draw_shape.rs:341 (settings)`; `crates/metal2vulkan-runtime/src/render_state.rs:1039`; `crates/metal2vulkan-runtime/src/render_state.rs:1208 (depth_ranges_refused)`; `crates/metal2vulkan-runtime/src/render_state.rs:1575 (bias_holds)`; `crates/metal2vulkan-runtime/src/render_state.rs:1594 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:527 (depth_range)`; `crates/metal2vulkan-runtime/src/render_state.rs:755 (compensation)` - `gap::NonFiniteDepthBias`: `crates/metal2vulkan-runtime/src/render_state.rs:1603 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:1606 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:365 (set_depth_bias)`; `crates/metal2vulkan-runtime/src/render_state.rs:463 (draw_viewports)`; `crates/metal2vulkan-runtime/src/render_state.rs:605 (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:6612 (hidden_depth_stencil)` -- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:91 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3297 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7511 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7580 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7611 (draw_resident)` +- `gap::HiddenDepthStencil`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563 (hidden)`; `crates/metal2vulkan-runtime/src/render.rs:6566 (hidden_depth_stencil)` +- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:91 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3251 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7452 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7520 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7551 (draw_resident)` - `gap::DepthStencilResolve`: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441 (draws_run)`; `crates/metal2vulkan-runtime/src/resolve.rs:1388 (plan)`; `crates/metal2vulkan-runtime/src/resolve.rs:787 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:885 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:905 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:946 (split_steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:958 (split_steps)` - `gap::TileAtSampleCount`: `crates/metal2vulkan-runtime/src/render_pass.rs:1611 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:937` -- `gap::ImageblockMasters`: `crates/metal2vulkan-runtime/src/render.rs:7345 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929 (dispatch_tiles_resident)` -- `gap::TileAndFragmentImageblocks`: `crates/metal2vulkan-runtime/src/render.rs:7337 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796 (dispatch_tiles_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:921 (dispatch_tiles_resident)` -- `gap::Metal4Api`: `crates/metal2vulkan-runtime/src/families/features.rs:1497 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1022 (state)`; `crates/metal2vulkan-runtime/src/families/mod.rs:362 (audit)` -- `gap::CounterSampleBuffers`: `crates/metal2vulkan-runtime/src/families/limits.rs:1013 (state)` -- `gap::ResidencySets`: `crates/metal2vulkan-runtime/src/families/features.rs:1479 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1015 (state)` -- `gap::TextureAccessCounters`: `crates/metal2vulkan-runtime/src/families/features.rs:1466 (state)`; `crates/metal2vulkan-runtime/src/families/features.rs:1471 (state)` -- `gap::IoCommandQueues`: `crates/metal2vulkan-runtime/src/families/features.rs:1476 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1020 (state)` -- `gap::TextureViewPools`: `crates/metal2vulkan-runtime/src/families/features.rs:1480 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1021 (state)` -- `gap::ColorAttachmentMapping`: `crates/metal2vulkan-runtime/src/families/features.rs:1481 (state)` -- `gap::LossyTextureCompression`: `crates/metal2vulkan-runtime/src/families/features.rs:1475 (state)` -- `gap::ShaderValidation`: `crates/metal2vulkan-runtime/src/families/features.rs:1477 (state)` -- `gap::ShaderLogging`: `crates/metal2vulkan-runtime/src/families/features.rs:1478 (state)` -- `gap::DeviceNotifications`: `crates/metal2vulkan-runtime/src/families/features.rs:1482 (state)` +- `gap::ImageblockMasters`: `crates/metal2vulkan-runtime/src/render.rs:7299 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:930 (dispatch_tiles_resident)` +- `gap::TileAndFragmentImageblocks`: `crates/metal2vulkan-runtime/src/render.rs:7291 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:797 (dispatch_tiles_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:922 (dispatch_tiles_resident)` +- `gap::Metal4Api`: `crates/metal2vulkan-runtime/src/families/features.rs:1485 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1026 (state)`; `crates/metal2vulkan-runtime/src/families/mod.rs:362 (audit)` +- `gap::CounterSampleBuffers`: `crates/metal2vulkan-runtime/src/families/limits.rs:1017 (state)` +- `gap::ResidencySets`: `crates/metal2vulkan-runtime/src/families/features.rs:1467 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1019 (state)` +- `gap::TextureAccessCounters`: `crates/metal2vulkan-runtime/src/families/features.rs:1454 (state)`; `crates/metal2vulkan-runtime/src/families/features.rs:1459 (state)` +- `gap::IoCommandQueues`: `crates/metal2vulkan-runtime/src/families/features.rs:1464 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1024 (state)` +- `gap::TextureViewPools`: `crates/metal2vulkan-runtime/src/families/features.rs:1468 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1025 (state)` +- `gap::ColorAttachmentMapping`: `crates/metal2vulkan-runtime/src/families/features.rs:1469 (state)` +- `gap::LossyTextureCompression`: `crates/metal2vulkan-runtime/src/families/features.rs:1463 (state)` +- `gap::ShaderValidation`: `crates/metal2vulkan-runtime/src/families/features.rs:1465 (state)` +- `gap::ShaderLogging`: `crates/metal2vulkan-runtime/src/families/features.rs:1466 (state)` +- `gap::DeviceNotifications`: `crates/metal2vulkan-runtime/src/families/features.rs:1470 (state)` - `gap::RateMapRegions`: `crates/metal2vulkan-runtime/src/rate_mapped_pass.rs:349 (refusal)` - `gap::LayeredPass`: `crates/metal2vulkan-runtime/src/color_resolve.rs:890 (plan)` - `gap::FunctionOptions`: `crates/metal2vulkan-runtime/src/library.rs:215 (new_function_with_descriptor)` - `gap::OverlappingTextureCopies`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1273 (texture_copies_of_bytes)` -- `gap::RebindTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:637 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2724 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2739 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2750 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2793 (dma_buf_heap_images_again)` -- `gap::PvrtcBlockOrder`: `crates/metal2vulkan-runtime/src/texture.rs:5761 (host_copy)` -- `gap::DecodedHeapTexture`: `crates/metal2vulkan-runtime/src/texture.rs:1682 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1371 (heap_plan)` +- `gap::RebindTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:621 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2724 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2739 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2750 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2793 (dma_buf_heap_images_again)` +- `gap::PvrtcBlockOrder`: `crates/metal2vulkan-runtime/src/texture.rs:5716 (host_copy)` +- `gap::DecodedHeapTexture`: `crates/metal2vulkan-runtime/src/texture.rs:1680 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1371 (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/render/restart.rs:71 (gap)` -- `gap::PrivatePrimitives`: `crates/metal2vulkan-runtime/src/render.rs:7932 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/restart.rs:72 (gap)` +- `gap::PrivatePrimitives`: `crates/metal2vulkan-runtime/src/render.rs:704 (private_primitive_ids)`; `crates/metal2vulkan-runtime/src/render/restart.rs:72 (gap)` - `gap::ProvokingVertex`: `crates/metal2vulkan-runtime/src/render/restart.rs:73 (gap)` -- `gap::PrimitiveIdIndices`: `crates/metal2vulkan-runtime/src/render.rs:7942 (draw_resident)` -- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1602 (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:642 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:5094 (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:641 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:622 (make_texture_over)`; `crates/metal2vulkan-runtime/src/detach.rs:172 (detach_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2933 (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::PrimitiveIdIndices`: `crates/metal2vulkan-runtime/src/render.rs:7870 (draw_resident)` +- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1602 (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:642 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:5092 (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:625 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:622 (make_texture_over)`; `crates/metal2vulkan-runtime/src/detach.rs:172 (detach_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2933 (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:4924 (refuse_detached_texels)` +- `gap::DetachedTexelAccess`: `crates/metal2vulkan-runtime/src/texture.rs:4922 (refuse_detached_texels)` - `gap::SurfaceDepthStencil`: `crates/metal2vulkan-runtime/src/blit_texture.rs:269 (unit)`; `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:57 (surface_depth_twin)` - `gap::ExtendedRangeResolve`: `crates/metal2vulkan-runtime/src/resolve.rs:604 (color)` -- `gap::PredicationDropsUngatedWork`: `crates/metal2vulkan-runtime/src/predication.rs:762 (unbalanced)` +- `gap::PredicationDropsUngatedWork`: `crates/metal2vulkan-runtime/src/predication.rs:729 (unbalanced)` - `gap::MultisampledBufferCopy`: `crates/metal2vulkan-runtime/src/blit_texture.rs:527 (copy_from_buffer_to_texture)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:674 (copy_from_texture_to_buffer)` - `gap::MultisampledBufferLayout`: `crates/metal2vulkan-runtime/src/sample_interleave.rs:1020 (plan)` - `gap::ColorAttachmentGroups`: `crates/metal2vulkan-runtime/src/render/color_groups.rs:106 (gap)` -- `apple::ProtectedContent`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2358 (commit_now)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126 (refuse_protected_state_encoder)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:52 (set)` -- `apple::LineWidth`: `crates/metal2vulkan-runtime/src/apple_only.rs:189 (check)` -- `apple::ViewportTransformDisabled`: `crates/metal2vulkan-runtime/src/apple_only.rs:191 (check)` -- `apple::VertexAmplificationMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:195 (check)`; `crates/metal2vulkan-runtime/src/apple_only.rs:312 (set_vertex_amplification_mode)` +- `apple::ProtectedContent`: `crates/metal2vulkan-runtime/src/apple_only.rs:193 (check)` +- `apple::LineWidth`: `crates/metal2vulkan-runtime/src/apple_only.rs:195 (check)` +- `apple::ViewportTransformDisabled`: `crates/metal2vulkan-runtime/src/apple_only.rs:197 (check)` +- `apple::VertexAmplificationMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:201 (check)`; `crates/metal2vulkan-runtime/src/apple_only.rs:327 (set_vertex_amplification_mode)` - `apple::SurfaceClientDirection`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:417 (new_texture_with_iosurface_plane)` - `bind::DescriptorRangeExceeded`: `crates/metal2vulkan/src/bind/instantiate.rs:653 (bind_buffers)` - `bind::TexelBufferTooLarge`: `crates/metal2vulkan/src/bind/instantiate.rs:892 (texel_ranges)` - `bind::HeapTooLarge`: `crates/metal2vulkan/src/bind/heap.rs:1014 (new)`; `crates/metal2vulkan/src/bind/heap.rs:1748 (directory_bytes)`; `crates/metal2vulkan/src/bind/heap.rs:1863 (listed_sampler_tables)`; `crates/metal2vulkan/src/bind/heap.rs:1913 (placed)`; `crates/metal2vulkan/src/bind/heap.rs:2069 (heap_elements)`; `crates/metal2vulkan/src/bind/heap.rs:949 (new)`; `crates/metal2vulkan/src/bind/heap.rs:965 (new)` -- `bind::TessellationFactorRange`: `crates/metal2vulkan/src/bind/graphics.rs:3630 (patch_binding)` -- `bind::PatchIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3674 (patch_binding)` -- `bind::ControlPointIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3712 (patch_binding)` +- `bind::TessellationFactorRange`: `crates/metal2vulkan/src/bind/graphics.rs:3619 (patch_binding)` +- `bind::PatchIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3663 (patch_binding)` +- `bind::ControlPointIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3701 (patch_binding)` - `bind::MissingStageInRegion`: `crates/metal2vulkan/src/bind/dispatch.rs:796 (instantiate)` - `bind::UniformViewAliased`: `crates/metal2vulkan/src/bind/instantiate.rs:607 (check_uniform_aliasing)` - `bind::MissingDeviceAddress`: `crates/metal2vulkan/src/bind/plan/slots.rs:133 (plan_buffer)` diff --git a/scripts/metal-coverage/coverage.tsv b/scripts/metal-coverage/coverage.tsv index 48e836dab..edb5ce05f 100644 --- a/scripts/metal-coverage/coverage.tsv +++ b/scripts/metal-coverage/coverage.tsv @@ -1629,7 +1629,7 @@ MTLRenderCommandEncoder.h MTLRenderCommandEncoder method setMeshSamplerState:lod MTLRenderCommandEncoder.h MTLRenderCommandEncoder method setMeshSamplerStates:lodMinClamps:lodMaxClamps:withRange: I runtime RenderCommandEncoder::set_mesh_sampler_states MTLRenderCommandEncoder.h MTLRenderCommandEncoder method drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup: I runtime RenderCommandEncoder::draw_mesh_threadgroups MTLRenderCommandEncoder.h MTLRenderCommandEncoder method drawMeshThreads:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup: I runtime RenderCommandEncoder::draw_mesh_threads -MTLRenderCommandEncoder.h MTLRenderCommandEncoder method drawMeshThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup: I runtime RenderCommandEncoder::draw_mesh_threadgroups_indirect refused `NotImplemented(IndirectDrawArguments)` on a device with `VK_EXT_mesh_shader` +MTLRenderCommandEncoder.h MTLRenderCommandEncoder method drawMeshThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup: I runtime RenderCommandEncoder::draw_mesh_threadgroups_indirect an object grid past the device's task limits fails the command buffer (`MeshGridPastLimits`); refused `NotImplemented(MeshShading)` with an object function where mesh draws are emulated MTLRenderCommandEncoder.h MTLRenderCommandEncoder method drawPrimitives:vertexStart:vertexCount:instanceCount: I runtime RenderCommandEncoder::draw_primitives MTLRenderCommandEncoder.h MTLRenderCommandEncoder method drawPrimitives:vertexStart:vertexCount: I runtime RenderCommandEncoder::draw_primitives MTLRenderCommandEncoder.h MTLRenderCommandEncoder method drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount: I runtime RenderCommandEncoder::draw_indexed_primitives