diff --git a/crates/metal2vulkan-rt/README.md b/crates/metal2vulkan-rt/README.md index 23ac59a84..f73a02d14 100644 --- a/crates/metal2vulkan-rt/README.md +++ b/crates/metal2vulkan-rt/README.md @@ -1096,6 +1096,33 @@ With no directory, nothing is kept on disk, and each `VkPipeline` is made withou compare, stencil test, operations, masks and reference, depth bias and blend constants. Vertex buffer strides are the descriptor's, so the content's, and baked. It renders dynamically into its attachments' formats, with no render pass. +- Every `[[stage_in]]` attribute is fetched by fixed-function vertex input, the form native + Vulkan uses, with no second form: the vertex descriptor's formats, offsets, strides and steps + are the `VkPipeline`'s vertex input state. Of Metal's vertex descriptor: + - formats: each maps to the Vulkan format of its layout and conversion, taken where the + device's format query reports `VERTEX_BUFFER` for it: an 8- or 16-bit integer format read + into a `float` attribute in its `USCALED` or `SSCALED` form, an unnormalized signed-integer + format into an attribute declared `int`, `UChar4Normalized_BGRA` as `B8G8R8A8_UNORM`, the + 10:10:10:2 formats as `A2B10G10R10`, `FloatRG11B10` as `B10G11R11_UFLOAT_PACK32`. The + validation crate's device profiles of RADV, ANV, NVIDIA and lavapipe report the bit for + every one of them but `FloatRGB9E5`, which only lavapipe's reports; + - steps: per vertex, and per instance at rate 1, map to the vertex and instance input rates; + - offsets and strides: the descriptor's, baked, each a multiple of the format's component size + and within the device's offset and stride limits. +- What has no fixed-function equivalent on the floor is refused at creation by the translator, + `Error::Translation` naming what it needs, and never pulled into the shader: + - a per-instance step rate above 1, and the constant step (`VertexStepRate`): Vulkan divides the + instance index only with `VK_KHR_vertex_attribute_divisor`'s features and + `supportsNonZeroFirstInstance`, which the floor does not enable; + - a format the device's query does not report for `VERTEX_BUFFER` (`Format`, with the format), + and `FloatRGB9E5` on every device (`Format`, not implemented: of those profiles only + lavapipe's reports the format, and its fetch answers 0 for the fourth component, where Metal + and Vulkan give 1); + - an offset or stride that is not a multiple of the format's component size, which Metal takes, + and one past `maxVertexInputAttributeOffset` or `maxVertexInputBindingStride`, and more + attributes or layouts than `maxVertexInputAttributes` or `maxVertexInputBindings` + (`VertexInputLayout`, with the limit where one is passed); + - the per-patch and per-patch-control-point steps, with tessellation (`Tessellation`). - The triangle class's `VkPipeline` is made with the state, through its file in the cache directory where there is one; the line class's is made by the content's first draw of lines, which waits for it (`Metrics::first_use_waits`). Of the two replay streams' 537 render contents @@ -1107,9 +1134,9 @@ With no directory, nothing is kept on disk, and each `VkPipeline` is made withou - Refused at creation by `Gap::RenderPipeline`, naming its `RenderPipelineKind`: a depth attachment, more than one sample, vertex amplification, a post-tessellation vertex function, stages the translator synthesizes beside the functions', framebuffer fetch, an imageblock, a - fragment function's stencil output, alpha to one, an instance step rate above 1, constant data - the binder supplies, a specialization other than the sample and amplification counts, dynamic - state beyond Vulkan 1.3's (a vertex buffer layout whose stride is set per bind among it), a + fragment function's stencil output, alpha to one, constant data the binder supplies, a + specialization other than the sample and amplification counts, dynamic state beyond Vulkan + 1.3's (a vertex buffer layout whose stride is set per bind among it), a feature or extension device creation does not enable, and a function that reads what a draw does not supply (`DrawInput`: a function table, a table the binder builds, a parameter block past the push range, a push field or bind-time fact the encoder does not fill, an unnormalized @@ -1200,6 +1227,8 @@ With no directory, nothing is kept on disk, and each `VkPipeline` is made withou pipeline state whose formats are not the pass's attachments', and a draw that binds a texture whose image the pass renders into. The replay streams draw lines and triangles under depth-stencil states that test no depth. +- A vertex fetch outside its buffer returns what the device gives: the floor enables no buffer + robustness, so there is no bounds guarantee beyond the device's. - Not built, and so not methods: indirect draws, several viewports or scissor rectangles, the triangle fill mode, the depth clip mode, depth bias, visibility results, `useResource:`, the store action setters, tile functions and `setVertexBuffer:offset:attributeStride:atIndex:`. diff --git a/crates/metal2vulkan-rt/src/error.rs b/crates/metal2vulkan-rt/src/error.rs index 12fcf2beb..37f22632d 100644 --- a/crates/metal2vulkan-rt/src/error.rs +++ b/crates/metal2vulkan-rt/src/error.rs @@ -850,8 +850,6 @@ pub enum RenderPipelineKind { ShaderStencil, /// `alphaToOneEnabled`, which needs a feature the floor does not require. AlphaToOne, - /// A vertex buffer layout of an instance step rate above 1. - StepRate, /// A function that reads constant data the binder supplies. ConstantData, /// A specialization the draw would set, beside the sample and amplification counts. diff --git a/crates/metal2vulkan-rt/src/render.rs b/crates/metal2vulkan-rt/src/render.rs index 07883119a..a949bfedb 100644 --- a/crates/metal2vulkan-rt/src/render.rs +++ b/crates/metal2vulkan-rt/src/render.rs @@ -465,8 +465,6 @@ fn unbuilt(pipeline: &RenderPipeline, enabled: &EnabledCaps) -> Option 1) { - RenderPipelineKind::StepRate } else if (pipeline.stages.iter()).any(|stage| stage.constant_blob.is_some()) { RenderPipelineKind::ConstantData } else if !(g.dynamic_states.iter()).all(|state| DYNAMIC.contains(&dynamic(*state))) { diff --git a/crates/metal2vulkan-rt/src/tests/draw.rs b/crates/metal2vulkan-rt/src/tests/draw.rs index 13e47358d..a7f829cb5 100644 --- a/crates/metal2vulkan-rt/src/tests/draw.rs +++ b/crates/metal2vulkan-rt/src/tests/draw.rs @@ -18,7 +18,10 @@ //! - a fragment function samples a texture through its constexpr sampler at the index the //! consumer gave it: each pixel reads its own texel. //! - a vertex function's `[[stage_in]]` attributes come from a vertex buffer, and from -//! `set_vertex_bytes`' copy. +//! `set_vertex_bytes`' copy, fetched in fixed function; an unnormalized signed-integer +//! attribute (the owned fixture `engine/icb_merged_attributes.ll`'s `short` mark) is +//! sign-extended into a variable declared `int`, and a layout stepped per instance at rate 2 +//! is the translator's refusal. //! - a draw whose vertex buffer is bound off its argument's alignment is refused before //! anything is recorded, and the same buffers bound aligned draw. //! - what Metal refuses is refused, and what a draw does not build is a gap: no pipeline state, @@ -84,8 +87,9 @@ mod on_device { ScissorRect, StageSource, StencilOperation, StorageMode, Texture, TextureDescriptor, TextureType, TextureUsage, Viewport, }; + use metal2vulkan::error::Feature; use metal2vulkan::library::{FunctionConstantValue, FunctionConstantValues}; - use metal2vulkan::metal::{DataType, VertexFormat}; + use metal2vulkan::metal::{DataType, VertexFormat, VertexStepFunction}; use metal2vulkan::pipeline::{ VertexAttributeDescriptor, VertexBufferLayoutDescriptor, VertexDescriptor, }; @@ -622,6 +626,83 @@ mod on_device { }); } + /// An unnormalized signed-integer attribute is fetched in fixed function into a variable + /// declared `int`: `ima_vertex`'s mark, a `short` of -2, reaches `ima_fragment`'s unsigned + /// output as its sign-extended bits. A layout stepped per instance at rate 2 is the + /// translator's refusal (`VertexStepRate`), which names the divisor feature device creation + /// does not enable. + #[test] + fn every_device_fetches_a_signed_attribute_in_fixed_function() { + let Some(library) = library(&engine_dir().join("icb_merged_attributes.ll")) else { + return; + }; + let function = |name| { + StageSource::Function(FunctionDescriptor::new( + library.function(name).expect("the function"), + )) + }; + let mut d = RenderPipelineDescriptor::new(function("ima_vertex")); + d.fragment = Some(function("ima_fragment")); + d.color_attachments[0] = Some(ColorAttachmentDescriptor::new(PixelFormat::RGBA32Uint)); + let mut vertex = VertexDescriptor::new(); + let attributes = [(VertexFormat::Float2, 8), (VertexFormat::Short, 4)]; + for (index, (format, stride)) in (0u32..).zip(attributes) { + let attribute = VertexAttributeDescriptor::new(format, 0, index); + vertex.attributes.insert(index, attribute); + vertex + .layouts + .insert(index, VertexBufferLayoutDescriptor::new(Some(stride))); + } + d.vertex_descriptor = Some(vertex); + // `ima_vertex` maps pixel positions to clip space by the frame's width and height: a + // triangle twice the target's side covers it. + let side = SIDE as f32; + let positions = floats(&[0.0, 0.0, 2.0 * side, 0.0, 0.0, 2.0 * side]); + let frame = floats(&[side, side, side, 0.0]); + // Three marks of -2, each a `short` at the start of its 4-byte element. + let marks: Vec = [(-2i16).to_le_bytes(), [0; 2]].concat().repeat(3); + each_device("draw_signed_attribute", |name, _, device| { + let state = state(name, &device, &d); + let mut buffers = Buffers::new(&device); + let xy = buffers.of(&device, &positions); + let mark = buffers.of(&device, &marks); + let color = target( + &device, + PixelFormat::RGBA32Uint, + TextureUsage::RENDER_TARGET, + ); + let queue = device.new_command_queue(4).expect("a queue"); + let command_buffer = queue.command_buffer().expect("a command buffer"); + let mut encoder = (command_buffer.render_command_encoder(&pass(&color, None))) + .unwrap_or_else(|error| panic!("{name}: {error}")); + let draw = |result: Result<(), Error>| result.unwrap_or_else(|e| panic!("{name}: {e}")); + draw(encoder.set_render_pipeline_state(&state)); + draw(encoder.set_vertex_buffer(Some(&xy), 0, 0)); + draw(encoder.set_vertex_buffer(Some(&mark), 0, 1)); + draw(encoder.set_vertex_bytes(&frame, 2)); + draw(encoder.draw_primitives(PrimitiveType::Triangle, 0, 3, 1, 0)); + encoder.end_encoding(); + run(name, &command_buffer); + for texel in read(&color, 16).chunks(16) { + let word = |at: usize| u32::from_le_bytes([0, 1, 2, 3].map(|i| texel[at + i])); + assert_eq!((word(0), word(12)), (0xFFFF_FFFE, 1), "{name}: {texel:?}"); + } + let mut stepped = d.clone(); + let layouts = &mut stepped.vertex_descriptor.as_mut().expect("layouts").layouts; + let layout = layouts.get_mut(&1).expect("layout 1"); + layout.step_function = VertexStepFunction::PerInstance; + layout.step_rate = 2; + match device.new_render_pipeline_state(&stepped, crate::tests::no_constexpr_samplers) { + Err(Error::Translation(metal2vulkan::error::Error::Unsupported(u))) => { + assert_eq!(u.feature, Feature::VertexStepRate, "{name}: {u:?}") + } + Err(other) => panic!("{name}: {other}"), + Ok(_) => panic!("{name}: a step rate of 2 made a state"), + } + println!("{name}: a short of -2 read as int, a step rate of 2 refused"); + }); + } + /// A draw whose vertex function takes a bound buffer's address to be a multiple of its /// argument's alignment (`colored_vertex`'s `float2` positions, 8, and `float4` colours, 16) /// that the address, the buffer's `gpuAddress` plus the offset, is not is refused before diff --git a/crates/metal2vulkan/src/error/mod.rs b/crates/metal2vulkan/src/error/mod.rs index 2c446189c..b2031a01d 100644 --- a/crates/metal2vulkan/src/error/mod.rs +++ b/crates/metal2vulkan/src/error/mod.rs @@ -1313,7 +1313,7 @@ pub enum Feature { Float64Arithmetic, // ---- Textures and samplers (lowering B2, B3) ---- - /// A pixel format not supported for the required use. + /// A pixel or vertex format not supported for the required use. Format, /// Divergent implicit-LOD sampling or LOD query through a multi-candidate handle. DivergentImplicitLod, @@ -1405,6 +1405,22 @@ pub enum Feature { /// Kernel `[[stage_in]]`: a stage-input descriptor combination whose Metal meaning is not /// established. KernelStageIn, + /// A vertex buffer layout stepped per instance at a rate above 1, or at the constant step + /// (`MTLVertexStepFunctionConstant`), on a profile that fetches every attribute in fixed + /// function (the identity domains, where the pulled fetch is not taken): fixed-function input + /// divides the instance index only with `vertexAttributeInstanceRateDivisor` (and + /// `vertexAttributeInstanceRateZeroDivisor` for the constant step), a rate within + /// `maxVertexAttribDivisor`, and `supportsNonZeroFirstInstance`, as a Metal draw may carry a + /// base instance. + VertexStepRate, + /// A vertex attribute whose layout fixed-function input cannot fetch, on a profile that fetches + /// every attribute in fixed function (the identity domains, where the pulled fetch is not + /// taken): an offset or static stride that is not a multiple of the format's component size + /// (Metal takes any byte multiple), an offset or stride past `maxVertexInputAttributeOffset` or + /// `maxVertexInputBindingStride`, more attributes or layouts than `maxVertexInputAttributes` or + /// `maxVertexInputBindings`, or an attribute that ends past its layout's static stride where + /// the strides are dynamic state. + VertexInputLayout, // ---- the refused families, not implemented yet ---- /// Tessellation: a post-tessellation vertex function and its pipeline's patch draws, through diff --git a/crates/metal2vulkan/src/library/compiled.rs b/crates/metal2vulkan/src/library/compiled.rs index 6643d6641..fde1e7d81 100644 --- a/crates/metal2vulkan/src/library/compiled.rs +++ b/crates/metal2vulkan/src/library/compiled.rs @@ -380,7 +380,7 @@ impl CompiledFunction { VertexFetch::Pulled { buffer_index, .. } => { Some((input.index, AttributeFetch::Pulled { buffer_index })) } - VertexFetch::FixedFunction => None, + VertexFetch::FixedFunction | VertexFetch::SignedFixedFunction => None, }); let stage_in = io.stage_in.iter().map(|input| { ( diff --git a/crates/metal2vulkan/src/lower/access/mod.rs b/crates/metal2vulkan/src/lower/access/mod.rs index 2bb315639..46391d30f 100644 --- a/crates/metal2vulkan/src/lower/access/mod.rs +++ b/crates/metal2vulkan/src/lower/access/mod.rs @@ -1848,8 +1848,13 @@ fn plan_replay(cx: &mut SelectCx<'_>, sources: &[SlotRef]) -> Result<(), Error> // (`bind::mesh_arguments`). let pieces = cx.inputs.folded_groups && cx.stage == Stage::Object; let fetches = (cx.inputs.vertex_fetch.as_ref()).is_some_and(|f| { - (f.attributes.values()) - .any(|a| *a == crate::pipeline::lower_inputs::VertexFetch::FixedFunction) + (f.attributes.values()).any(|a| { + use crate::pipeline::lower_inputs::VertexFetch; + matches!( + a, + VertexFetch::FixedFunction | VertexFetch::SignedFixedFunction + ) + }) }); // A drawn vertex function's sources are its pulled attributes' buffers, which its slot table // holds; a kernel's are its stage-in fetch's. diff --git a/crates/metal2vulkan/src/lower/stage_io/mod.rs b/crates/metal2vulkan/src/lower/stage_io/mod.rs index c13cdc1ea..82073d3c1 100644 --- a/crates/metal2vulkan/src/lower/stage_io/mod.rs +++ b/crates/metal2vulkan/src/lower/stage_io/mod.rs @@ -1142,7 +1142,7 @@ fn uint_lanes(form: Form) -> Form { /// `x`, a value loaded through `link`, as the lowered representation of its form: a narrow /// integer masked to its width, a narrow float rounded to its format, a `bool` carried as `uint` /// compared with 0, a `bool` builtin read into an integer as 1 or 0, the weights of a -/// [`Place::Weights`] read. +/// [`Place::Weights`] read, a variable declared `int` read as its bits by `OpBitcast`. fn to_lowered( cx: &EmitCx<'_>, fb: &mut FunctionBuilder<'_>, @@ -1160,6 +1160,28 @@ fn to_lowered( let zero = ops::splat(fb, form, 0)?; return fb.select(x, one, zero); } + // A variable declared `int` (a signed format's fixed-function attribute): its bits, held + // unsigned. + let x = if let Some(IoObject::User { + numeric: IoNumeric::Sint, + components, + .. + }) = cx.plan.families.stage_io.objects.get(link.object) + { + let components = *components; + let elem = io_elem(fb.module(), IoNumeric::Uint, false)?; + let ty = if components == 1 { + elem + } else { + fb.module().ty(SType::Vector { + elem, + len: components, + })? + }; + fb.convert(ConvOp::Bitcast, x, ty)? + } else { + x + }; let x = ops::mask(fb, form, x)?; narrow::round(fb, form, x) } diff --git a/crates/metal2vulkan/src/lower/stage_io/plan.rs b/crates/metal2vulkan/src/lower/stage_io/plan.rs index 46e7c0e94..a3828827a 100644 --- a/crates/metal2vulkan/src/lower/stage_io/plan.rs +++ b/crates/metal2vulkan/src/lower/stage_io/plan.rs @@ -675,22 +675,25 @@ pub fn param(cx: &mut SelectCx<'_>, b: &ParamBinding) -> Result<(), Error> { } // Fixed-function input: the format is link-time state, and so is what the device's // conversion of it may answer otherwise than Metal's fetch, which link notes on the - // pipeline's vertex stage (`pipeline::link::vertex::fixed_function_notes`). + // pipeline's vertex stage (`pipeline::link::vertex::fixed_function_notes`). A signed + // format's variable is declared `int` (`VertexFetch::SignedFixedFunction`), its bits + // read by `OpBitcast`. + let mut ty = io_type(f); + if entry == Some(VertexFetch::SignedFixedFunction) { + if f.is_float() { + return Err(not_lowered()); + } + ty.numeric = IoNumeric::Sint; + } let key = VaryingKey::attribute(index); let sp = &mut cx.families.stage_io; - let object = user( - sp, - key.clone(), - IoDir::Input, - io_type(f), - IoDecor::default(), - )?; + let object = user(sp, key.clone(), IoDir::Input, ty, IoDecor::default())?; push_var( &mut sp.interface.inputs, IoVariable { key, role: IoRole::Attribute { index }, - ty: io_type(f), + ty, }, ); Link { diff --git a/crates/metal2vulkan/src/metal/vertex.rs b/crates/metal2vulkan/src/metal/vertex.rs index 9069df254..e31eba95f 100644 --- a/crates/metal2vulkan/src/metal/vertex.rs +++ b/crates/metal2vulkan/src/metal/vertex.rs @@ -6,10 +6,14 @@ //! shader from its buffer) otherwise. There is no third representation: widening a 3-component //! 8/16-bit format to 4 components reads past the attribute, which at the end of a buffer is //! out of bounds and may replace the whole attribute. +//! +//! Under the identity domains there is only the first: every attribute is fetched in fixed +//! function, bounded only as the device bounds it, and what fixed-function input cannot take is +//! refused ([`attribute_fetch`]). -use crate::device::requirements::FormatUsage; +use crate::device::requirements::{FormatUsage, VkFeature, VkLimit}; use crate::device::DeviceProfile; -use crate::error::{DescriptorError, Error, Feature, Unsupported}; +use crate::error::{Capability, DescriptorError, Error, Feature, Unsupported}; use crate::memory::contain::{self, Check}; use crate::metal::{VertexFormat, VertexStepFunction}; use crate::vk; @@ -202,6 +206,17 @@ pub enum AttributeFetch { /// fixed function. /// - `PerPatch`/`PerPatchControlPoint`: tessellation, refused. A `PerInstance` rate of 0 is an /// invalid descriptor. +/// +/// Under the identity domains (`Device::from_queries`' profile) nothing is pulled: the pulled +/// fetch reads through a descriptor, which those domains hold none of. Every attribute is fetched +/// in fixed function, and the containment rule above does not move it: the device bounds the +/// fetch as it bounds any (with no buffer robustness, a fetch outside its buffer reads what the +/// device gives). What fixed-function input cannot take is refused by what it needs: a rate above +/// 1 or the constant step without the divisor it takes ([`Feature::VertexStepRate`], with the +/// missing `vertexAttributeInstanceRate*Divisor` feature or the `maxVertexAttribDivisor` limit), a +/// format the profile cannot fetch as `VERTEX_BUFFER` ([`Feature::Format`], with that format +/// usage), and `FloatRGB9E5`, whose fixed-function fetch a conformant device's answer differs from +/// (`Feature::Format`, not implemented). pub fn attribute_fetch( format: VertexFormat, step: VertexStepFunction, @@ -221,6 +236,12 @@ pub(crate) fn fetch_as( profile: &DeviceProfile, ) -> Result { let f = profile.fields(); + // Under the identity domains the pulled fetch is not taken, and its case is refused. + let identity = crate::lower::access::identity(profile); + let pulled = |refusal: Unsupported| match identity { + true => Err(Error::from(refusal)), + false => Ok(AttributeFetch::Pulled), + }; let (input_rate, divisor) = match step { VertexStepFunction::PerVertex => (vk::VertexInputRate::VERTEX, 1), VertexStepFunction::PerInstance => match step_rate { @@ -238,7 +259,7 @@ pub(crate) fn fetch_as( { (vk::VertexInputRate::INSTANCE, n) } - _ => return Ok(AttributeFetch::Pulled), + n => return pulled(divided(profile, Some(n))), }, // Metal's constant step reads the layout's first element whatever the base instance, and a // zero divisor reads element `firstInstance`: the same element for every draw exactly on a @@ -253,19 +274,28 @@ pub(crate) fn fetch_as( { (vk::VertexInputRate::INSTANCE, 0) } - VertexStepFunction::Constant => return Ok(AttributeFetch::Pulled), + VertexStepFunction::Constant => return pulled(divided(profile, None)), VertexStepFunction::PerPatch | VertexStepFunction::PerPatchControlPoint => { return Err(Unsupported::not_implemented(Feature::Tessellation).into()) } }; // Without buffer robustness nothing bounds fixed-function input (VUID-vkCmdDraw-None-02721). - if contain::encoding(profile) == Check::InShader { + // Under the identity domains the device's own bounds stand: there is no pulled fetch to move + // the attribute to. + if !identity && contain::encoding(profile) == Check::InShader { return Ok(AttributeFetch::Pulled); } - if !fixed_function_format(vk_format) - || !profile.supports_format(vk_format, FormatUsage::VertexBuffer) - { - return Ok(AttributeFetch::Pulled); + if !fixed_function_format(vk_format) { + return pulled(Unsupported::not_implemented(Feature::Format)); + } + if !profile.supports_format(vk_format, FormatUsage::VertexBuffer) { + return pulled(Unsupported::needs( + Feature::Format, + Capability::Format { + format: vk_format, + usage: FormatUsage::VertexBuffer, + }, + )); } Ok(AttributeFetch::FixedFunction { format: vk_format, @@ -274,6 +304,40 @@ pub(crate) fn fetch_as( }) } +/// The refusal of a divided instance step that fixed-function input cannot take on `profile`: +/// Metal's per-instance step at rate `n` above 1 (`Some(n)`), or its constant step (`None`). It +/// names what the profile lacks of the divisor: `vertexAttributeInstanceRateDivisor`, and +/// `vertexAttributeInstanceRateZeroDivisor` for the constant step, or the rate past +/// `maxVertexAttribDivisor`; where it lacks none of those, `supportsNonZeroFirstInstance` (or the +/// portability subset's stride of 0, for the constant step), which no capability names. +fn divided(profile: &DeviceProfile, rate: Option) -> Unsupported { + let f = profile.fields(); + let divisor = f.fragment.vertex_attribute_divisor; + let mut needs = Vec::new(); + if !divisor { + needs.push(Capability::Feature( + VkFeature::VertexAttributeInstanceRateDivisor, + )); + } + match rate { + None if !f.fragment.vertex_attribute_zero_divisor => needs.push(Capability::Feature( + VkFeature::VertexAttributeInstanceRateZeroDivisor, + )), + Some(n) if divisor && n > f.limits.max_vertex_attrib_divisor => { + needs.push(Capability::Limit { + limit: VkLimit::MaxVertexAttribDivisor, + required: u64::from(n), + available: u64::from(f.limits.max_vertex_attrib_divisor), + }) + } + _ => {} + } + match needs.is_empty() { + true => Unsupported::not_implemented(Feature::VertexStepRate), + false => Unsupported::needs_any_of(Feature::VertexStepRate, vec![needs]), + } +} + /// Whether fixed-function input delivers an attribute of `vk_format` where the profile reports /// the format's `VERTEX_BUFFER`: every format but the shared-exponent `E5B9G9R9_UFLOAT_PACK32` /// (`FloatRGB9E5`), which is pulled on every profile. Vulkan requires no device to fetch that diff --git a/crates/metal2vulkan/src/pipeline/compile.rs b/crates/metal2vulkan/src/pipeline/compile.rs index e95eec696..be500bdf1 100644 --- a/crates/metal2vulkan/src/pipeline/compile.rs +++ b/crates/metal2vulkan/src/pipeline/compile.rs @@ -2541,7 +2541,13 @@ fn instanced_attributes( let stepped: BTreeSet = projection .attributes .iter() - .filter(|(_, f)| matches!(f, crate::pipeline::lower_inputs::VertexFetch::FixedFunction)) + .filter(|(_, f)| { + use crate::pipeline::lower_inputs::VertexFetch; + matches!( + f, + VertexFetch::FixedFunction | VertexFetch::SignedFixedFunction + ) + }) .filter(|(a, _)| { desc.attributes .get(a) diff --git a/crates/metal2vulkan/src/pipeline/link/vertex.rs b/crates/metal2vulkan/src/pipeline/link/vertex.rs index edb263bbc..03b8daf1b 100644 --- a/crates/metal2vulkan/src/pipeline/link/vertex.rs +++ b/crates/metal2vulkan/src/pipeline/link/vertex.rs @@ -15,7 +15,9 @@ //! (`Unsupported{Lowering(StageIo), NotImplemented}`): Metal's meaning for that conversion is //! not established, so neither fetch path guesses one. A signed-integer format feeds a `uint` //! variable, which fixed-function input may not (Vulkan's numeric-type match), so it is pulled -//! and sign-extended in the shader; +//! and sign-extended in the shader; under the identity domains it is fetched in fixed function +//! into a variable declared `int` (`VertexFetch::SignedFixedFunction`), the device's `SINT` +//! fetch sign-extending each component as Metal's does; //! 2. the per-attribute choice of `metal::vertex::attribute_fetch` (format, step, profile), in //! item 1's Vulkan format. It //! pulls every attribute when the profile's buffer containment is checked in the shader @@ -60,6 +62,11 @@ //! would fetch at the stream position, where the function reads the vertex its index names. The //! layouts they pull are not a pulled-vertex-buffer variant's (`variant_pulled` keeps item 7's). //! +//! Under the identity domains (`Device::from_queries`' profile) items 2 to 6 pull nothing: the +//! pulled fetch reads through a descriptor, which those domains hold none of. Item 2's cases are +//! `metal::vertex::attribute_fetch`'s refusals, and an attribute items 3 to 6 would pull is refused +//! as `Feature::VertexInputLayout`, with the limit it passes where it passes one. +//! //! A fixed-function entry keeps nothing of the format (`VertexFetch::FixedFunction`): no //! instruction of the module names it, so every format the device fetches in fixed function //! compiles one module, whatever its encoding, offset or stride. The format is the @@ -77,9 +84,12 @@ use std::collections::{BTreeMap, BTreeSet}; -use crate::device::requirements::{VkFeature, VkProperty}; +use crate::device::requirements::{VkFeature, VkLimit, VkProperty}; use crate::device::DeviceProfile; -use crate::error::{DescriptorError, DriverDeviation, Error, InternalError, InternalKind}; +use crate::error::{ + Capability, DescriptorError, DriverDeviation, Error, Feature, InternalError, InternalKind, + Unsupported, +}; use crate::lower::stage_io::fetch::{class_match, encoding, ClassMatch, Encoding}; use crate::metal::vertex::{ fetch_as, vertex_alignment, vk_scaled_vertex_format, vk_vertex_format, AttributeFetch, @@ -100,10 +110,11 @@ use crate::pipeline::vertex::{ use crate::vk; /// How attribute `attribute` of `format` meets a variable of class `declared` (item 1 of the -/// module docs): the Vulkan format fixed-function input would deliver it in, and whether it can -/// (not an unnormalized signed-integer format into the `uint` variable every integer attribute is -/// declared as, which Vulkan's numeric-type match does not allow and which is pulled and -/// sign-extended in the shader), or the class refusals of `fetch::class_match`. +/// module docs): the Vulkan format fixed-function input would deliver it in, and whether that +/// format is an unnormalized signed-integer one, which Vulkan's numeric-type match lets feed only +/// a variable declared `int` (pulled and sign-extended in the shader where the module declares it +/// `uint`, as every integer attribute is but under the identity domains), or the class refusals +/// of `fetch::class_match`. /// /// A signed **normalized** format is not that case: it is a float-class format (`Encoding`'s /// `is_float`), so `fetch::class_match` admits it to a `float` variable alone and refuses it to @@ -118,7 +129,7 @@ fn class_format( match class_match(e, declared == IoNumeric::Float, attribute)? { ClassMatch::Same => Ok(( vk_vertex_format(format)?, - !matches!( + matches!( e, Encoding::Int { signed: true, @@ -128,7 +139,7 @@ fn class_format( ), )), ClassMatch::IntToFloat => vk_scaled_vertex_format(format) - .map(|f| (f, true)) + .map(|f| (f, false)) .ok_or_else(|| { Error::Internal(InternalError::new( InternalKind::Invariant, @@ -167,6 +178,8 @@ struct Resolved<'a> { attr: &'a VertexAttributeDescriptor, layout: &'a VertexBufferLayoutDescriptor, fetch: AttributeFetch, + /// The format is an unnormalized signed-integer one ([`class_format`]). + signed: bool, } /// Every attribute of `attributes` resolved (items 1-8 of the module docs; item 8 when @@ -181,6 +194,8 @@ fn resolve<'a>( pull_every: bool, ) -> Result<(BTreeMap>, BTreeSet), Error> { let l = &p.fields().limits; + // Under the identity domains nothing is pulled (the module docs). + let identity = crate::lower::access::identity(p); if let Some(d) = desc { d.check_layouts()?; } @@ -196,7 +211,9 @@ fn resolve<'a>( layout: attr.buffer_index, }), )?; - let (vk_format, fits) = class_format(attr.format, numeric, a)?; + let (vk_format, signed) = class_format(attr.format, numeric, a)?; + // A signed format feeds a variable declared `int` under the identity domains alone. + let fits = !signed || identity; let mut fetch = fetch_as(vk_format, layout.step_function, layout.step_rate, p)?; let emitted = binding_stride(fetch, layout); let beyond_stride = match (fetch, emitted) { @@ -206,16 +223,41 @@ fn resolve<'a>( } _ => false, }; - let pulled = !fits - || (beyond_stride - && p.fields() - .enabled - .portability_withholds(VkFeature::VertexAttributeAccessBeyondStride)) + let unaligned = (beyond_stride + && p.fields() + .enabled + .portability_withholds(VkFeature::VertexAttributeAccessBeyondStride)) || !aligned(attr.format, attr.offset, emitted)? - || emitted.is_some_and(|s| !l.portable_vertex_stride(s)) - || attr.offset > l.max_vertex_input_attribute_offset - || emitted.is_some_and(|s| s > l.max_vertex_input_binding_stride); - if pulled { + || emitted.is_some_and(|s| !l.portable_vertex_stride(s)); + let past = |limit, value: u32, max: u32| { + (value > max).then_some(Capability::Limit { + limit, + required: u64::from(value), + available: u64::from(max), + }) + }; + let limit = past( + VkLimit::MaxVertexInputAttributeOffset, + attr.offset, + l.max_vertex_input_attribute_offset, + ) + .or_else(|| { + emitted.and_then(|s| { + past( + VkLimit::MaxVertexInputBindingStride, + s, + l.max_vertex_input_binding_stride, + ) + }) + }); + if identity && matches!(fetch, AttributeFetch::FixedFunction { .. }) { + if let Some(limit) = limit { + return Err(Unsupported::needs(Feature::VertexInputLayout, limit).into()); + } + if unaligned { + return Err(Unsupported::not_implemented(Feature::VertexInputLayout).into()); + } + } else if !fits || unaligned || limit.is_some() { fetch = AttributeFetch::Pulled; } out.insert( @@ -224,6 +266,7 @@ fn resolve<'a>( attr, layout, fetch, + signed, }, ); } @@ -235,10 +278,31 @@ fn resolve<'a>( .filter(|r| matches!(r.fetch, AttributeFetch::FixedFunction { .. })) .collect(); let layouts: BTreeSet = fixed.iter().map(|r| r.attr.buffer_index).collect(); - if fixed.len() as u64 <= u64::from(l.max_vertex_input_attributes) - && layouts.len() as u64 <= u64::from(l.max_vertex_input_bindings) - { + let counts = [ + ( + VkLimit::MaxVertexInputAttributes, + fixed.len(), + l.max_vertex_input_attributes, + ), + ( + VkLimit::MaxVertexInputBindings, + layouts.len(), + l.max_vertex_input_bindings, + ), + ]; + let over = counts + .into_iter() + .find(|&(_, count, max)| count as u64 > u64::from(max)); + let Some((limit, count, max)) = over else { break; + }; + if identity { + let limit = Capability::Limit { + limit, + required: count as u64, + available: u64::from(max), + }; + return Err(Unsupported::needs(Feature::VertexInputLayout, limit).into()); } match out .values_mut() @@ -263,6 +327,9 @@ fn resolve<'a>( { let size = format.block().map_or(u32::MAX, |b| b.size); if stride != 0 && r.attr.offset.saturating_add(size) > stride { + if identity { + return Err(Unsupported::not_implemented(Feature::VertexInputLayout).into()); + } r.fetch = AttributeFetch::Pulled; } } @@ -332,10 +399,11 @@ pub fn vertex_fetch_projection_for( Ok(out) } -/// The projection entry of a resolved attribute: fixed function, or the pulled fetch of its -/// format, offset and step. +/// The projection entry of a resolved attribute: fixed function (into a variable declared `int` +/// for an unnormalized signed-integer format), or the pulled fetch of its format, offset and step. fn fetch_of(r: &Resolved<'_>) -> VertexFetch { match r.fetch { + AttributeFetch::FixedFunction { .. } if r.signed => VertexFetch::SignedFixedFunction, AttributeFetch::FixedFunction { .. } => VertexFetch::FixedFunction, _ => VertexFetch::pulled(r.attr, r.layout), } @@ -386,7 +454,10 @@ pub(crate) fn fixed_function_notes( let mut notes = BTreeSet::new(); let mut properties = BTreeSet::new(); for (a, (_, fetch)) in vs.io.attributes() { - if fetch != VertexFetch::FixedFunction { + if !matches!( + fetch, + VertexFetch::FixedFunction | VertexFetch::SignedFixedFunction + ) { continue; } let attr = desc diff --git a/crates/metal2vulkan/src/pipeline/lower_inputs.rs b/crates/metal2vulkan/src/pipeline/lower_inputs.rs index dcea61c2f..acb4e87d9 100644 --- a/crates/metal2vulkan/src/pipeline/lower_inputs.rs +++ b/crates/metal2vulkan/src/pipeline/lower_inputs.rs @@ -1566,6 +1566,12 @@ pub enum VertexFetch { /// NaN) is noted where the render pipeline links, on its vertex stage /// (`PrecisionNote::DeviceVertexConversion`, `PrecisionNote::DeviceNanEncoding`). FixedFunction, + /// Fixed-function vertex input of an unnormalized signed-integer format, into a variable + /// declared `int`: Vulkan's numeric-type match lets a `SINT` format feed a signed variable + /// only, and the device sign-extends each component as Metal's fetch does. The module reads + /// the variable's bits by `OpBitcast`. Taken under the identity domains, where the pulled + /// fetch is not; elsewhere such an attribute is pulled and sign-extended in the shader. + SignedFixedFunction, /// Fetched in the shader from a buffer, decoding this Metal format. /// /// Everything that changes the fetch code is here: the source buffer, the attribute's diff --git a/crates/metal2vulkan/src/pipeline/stage_io.rs b/crates/metal2vulkan/src/pipeline/stage_io.rs index 21b939129..8fb73d2a9 100644 --- a/crates/metal2vulkan/src/pipeline/stage_io.rs +++ b/crates/metal2vulkan/src/pipeline/stage_io.rs @@ -534,12 +534,17 @@ impl StageIo { /// Every vertex attribute the function reads, by attribute index, with its declared numeric /// class and the fetch it was compiled under: fixed function for an `Attribute` input - /// variable, the listed fetch for a pulled one. + /// variable (into an `int` one for a signed format, `VertexFetch::SignedFixedFunction`), the + /// listed fetch for a pulled one. pub fn attributes(&self) -> BTreeMap { let mut out = BTreeMap::new(); for v in &self.inputs { if let IoRole::Attribute { index } = v.role { - out.insert(index, (v.ty.numeric, VertexFetch::FixedFunction)); + let fetch = match v.ty.numeric { + IoNumeric::Sint => VertexFetch::SignedFixedFunction, + _ => VertexFetch::FixedFunction, + }; + out.insert(index, (v.ty.numeric, fetch)); } } for p in &self.pulled { diff --git a/crates/metal2vulkan/src/tests/engine_identity_render.rs b/crates/metal2vulkan/src/tests/engine_identity_render.rs index 93b96379f..807ad508b 100644 --- a/crates/metal2vulkan/src/tests/engine_identity_render.rs +++ b/crates/metal2vulkan/src/tests/engine_identity_render.rs @@ -15,21 +15,30 @@ //! them at 64. A fragment compiled on its own at base 0 and linked after that vertex function is //! `InvalidDescriptor(PushBase)`; compiled under the vertex function's //! `CompiledFunction::fragment_push_base` it links. +//! - On `Device::from_queries`' profile with no buffer robustness enabled, every `[[stage_in]]` +//! attribute is fetched in fixed function (the owned fixture `engine/icb_merged_attributes`'s +//! `ima_vertex`, a `float2` position and a mark read from a `short`): two bindings, the formats +//! `R32G32_SFLOAT` and `R16_SINT`, nothing pulled, both modules L3-valid. A layout stepped per +//! instance at rate 2 without the divisor feature is refused as `Unsupported{VertexStepRate}`, +//! needing `vertexAttributeInstanceRateDivisor`. //! //! `llvm-as` assembles the fixture; a missing tool skips visibly. No GPU is used. use crate::budget::Budget; +use crate::device::requirements::VkFeature; use crate::device::{Device, DevicePolicy, HandleDomain, PointerDomain}; -use crate::error::{DescriptorError, Error, Feature, Needs}; +use crate::error::{Capability, DescriptorError, Error, Feature, Needs}; use crate::library::Library; -use crate::metal::PixelFormat; +use crate::metal::{PixelFormat, VertexFormat, VertexStepFunction}; use crate::pipeline::descriptor::{ ColorAttachmentDescriptor, FunctionDescriptor, RenderPipelineDescriptor, StageSource, + VertexAttributeDescriptor, VertexBufferLayoutDescriptor, VertexDescriptor, }; use crate::pipeline::interface::PushLoc; use crate::pipeline::sym::{PushField, SlotClass, SlotRef, Stage}; use crate::pipeline::testing::{description, engine_dir, llvm_assemble, AssembleError}; use crate::spirv::testing::check_words_valid; +use crate::vk; /// Profiles with `bufferDeviceAddress` and `shaderInt64`. const PROFILES: [&str; 2] = ["lavapipe", "moltenvk-m3"]; @@ -207,3 +216,88 @@ fn device_new_still_refuses_render_functions_under_the_identity_domains() { } } } + +/// Under the identity domains with no buffer robustness, `ima_vertex`'s attributes are fetched in +/// fixed function, its `short` mark into a variable declared `int`, and a layout stepped per +/// instance at rate 2 is refused by the divisor feature it needs. +#[test] +fn from_queries_fetches_every_attribute_in_fixed_function() { + let ll = engine_dir().join("icb_merged_attributes.ll"); + let library = match llvm_assemble(&ll) { + Ok(bitcode) => Library::from_air(&bitcode).expect("the library"), + Err(AssembleError::Missing(why)) => { + eprintln!("SKIPPED: {why}"); + return; + } + Err(e) => panic!("{}: {e:?}", ll.display()), + }; + let function = |name| { + StageSource::Function(FunctionDescriptor::new( + library.function(name).expect("the function"), + )) + }; + let mut d = RenderPipelineDescriptor::new(function("ima_vertex")); + d.fragment = Some(function("ima_fragment")); + d.color_attachments[0] = Some(ColorAttachmentDescriptor::new(PixelFormat::RGBA32Uint)); + let mut vertex = VertexDescriptor::new(); + let attributes = [(VertexFormat::Float2, 0), (VertexFormat::Short, 1)]; + for (a, (format, layout)) in attributes.into_iter().enumerate() { + let attribute = VertexAttributeDescriptor::new(format, 0, layout); + vertex.attributes.insert(a as u32, attribute); + } + vertex + .layouts + .insert(0, VertexBufferLayoutDescriptor::new(Some(8))); + vertex + .layouts + .insert(1, VertexBufferLayoutDescriptor::new(Some(4))); + d.vertex_descriptor = Some(vertex); + for stem in PROFILES { + let mut desc = description(stem).unwrap_or_else(|e| panic!("{e}")); + for robust in [ + VkFeature::RobustBufferAccess, + VkFeature::RobustBufferAccess2, + ] { + desc.features.remove(&robust); + } + desc.features + .remove(&VkFeature::VertexAttributeInstanceRateDivisor); + let device = Device::from_queries(desc, identity()).unwrap_or_else(|e| panic!("{e}")); + let p = (device.compile_render_pipeline(&d, &Budget::standard())) + .unwrap_or_else(|e| panic!("{stem}: {e:?}")); + let formats: Vec = p.vertex_input.attributes.iter().map(|a| a.format).collect(); + assert_eq!( + formats, + [vk::Format::R32G32_SFLOAT, vk::Format::R16_SINT], + "{stem}: both attributes in fixed function" + ); + assert_eq!(p.vertex_input.bindings.len(), 2, "{stem}"); + assert!(p.vertex_input.pulled.is_empty(), "{stem}: nothing pulled"); + for stage in &p.stages { + check_words_valid(&stage.spirv, &p.requirements, device.profile()) + .unwrap_or_else(|e| panic!("{stem}: {:?}: {e}", stage.stage)); + } + let mut stepped = d.clone(); + let layouts = &mut stepped + .vertex_descriptor + .as_mut() + .expect("the layouts") + .layouts; + let layout = layouts.get_mut(&1).expect("layout 1"); + layout.step_function = VertexStepFunction::PerInstance; + layout.step_rate = 2; + match device.compile_render_pipeline(&stepped, &Budget::standard()) { + Err(Error::Unsupported(u)) => assert_eq!( + (u.feature, u.needs), + ( + Feature::VertexStepRate, + Needs::AnyOf(vec![vec![Capability::Feature( + VkFeature::VertexAttributeInstanceRateDivisor + )]]) + ), + "{stem}" + ), + other => panic!("{stem}: {:?}", other.map(|_| "compiled")), + } + } +} diff --git a/crates/metal2vulkan/tests/api_signatures.tsv b/crates/metal2vulkan/tests/api_signatures.tsv index 32b9b57bf..66a9e1dbd 100644 --- a/crates/metal2vulkan/tests/api_signatures.tsv +++ b/crates/metal2vulkan/tests/api_signatures.tsv @@ -13750,7 +13750,6 @@ variant metal2vulkan-rt::RenderPipelineKind::Imageblock Imageblock variant metal2vulkan-rt::RenderPipelineKind::Multisample Multisample variant metal2vulkan-rt::RenderPipelineKind::ShaderStencil ShaderStencil variant metal2vulkan-rt::RenderPipelineKind::Specialization Specialization -variant metal2vulkan-rt::RenderPipelineKind::StepRate StepRate variant metal2vulkan-rt::RenderPipelineKind::SynthesizedStages SynthesizedStages variant metal2vulkan-rt::RenderPipelineKind::Tessellation Tessellation variant metal2vulkan-rt::RenderPipelineKind::VertexAmplification VertexAmplification @@ -16197,6 +16196,8 @@ variant metal2vulkan::error::Feature::UndeclaredTextureUsage UndeclaredTextureUs variant metal2vulkan::error::Feature::UnknownIntrinsic UnknownIntrinsic variant metal2vulkan::error::Feature::UnmatchedVarying UnmatchedVarying variant metal2vulkan::error::Feature::VertexAmplification VertexAmplification +variant metal2vulkan::error::Feature::VertexInputLayout VertexInputLayout +variant metal2vulkan::error::Feature::VertexStepRate VertexStepRate variant metal2vulkan::error::Feature::ViewFormatReinterpretation ViewFormatReinterpretation variant metal2vulkan::error::Feature::ViewportDepthRange ViewportDepthRange variant metal2vulkan::error::Feature::VulkanVersion VulkanVersion @@ -16926,6 +16927,7 @@ variant metal2vulkan::pipeline::UniformViewChoice::Spare Spare variant metal2vulkan::pipeline::UniformViewChoice::Viewed Viewed variant metal2vulkan::pipeline::VertexFetch::FixedFunction FixedFunction variant metal2vulkan::pipeline::VertexFetch::Pulled Pulled { format: metal::VertexFormat, buffer_index: u32, offset: u32, step_function: metal::VertexStepFunction, step_rate: u32 } +variant metal2vulkan::pipeline::VertexFetch::SignedFixedFunction SignedFixedFunction variant metal2vulkan::pipeline::VertexStride::PerBind PerBind variant metal2vulkan::pipeline::VertexStride::Static Static(u32) variant metal2vulkan::pipeline::Window::Bounded Bounded { start: i64, len: u64 } diff --git a/docs/API.md b/docs/API.md index 42b18c161..0a393754a 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1166,7 +1166,15 @@ A `RenderPipeline` holds: pulled in the shader instead, and so is every attribute on a device without `robustBufferAccess` (unless containment is off). A `FloatRGB9E5` attribute is pulled on every device: no device must fetch the shared-exponent format as vertex input, and its decode is - exact, so the shader's is the answer a conformant fetch gives; + exact, so the shader's is the answer a conformant fetch gives. Under the identity domains + (`Device::from_queries`' profile) nothing is pulled, as the pulled fetch reads through a + descriptor: every attribute is fetched in fixed function, with or without buffer robustness + (a fetch outside its buffer reads what the device gives), an unnormalized signed-integer format + into a variable declared `int`; an attribute fixed-function input cannot take is refused, + `Unsupported{VertexStepRate}` (a per-instance rate above 1 or the constant step without the + divisor features), `Unsupported{Format}` (a format the device cannot fetch as `VERTEX_BUFFER`, + and `FloatRGB9E5`) or `Unsupported{VertexInputLayout}` (an offset or stride off the format's + alignment or past the device's limits, or more attributes or layouts than its limits); - `graphics`: the fixed-function state (topology, attachment formats and blend states, sample count, dynamic states, input attachments, ...). Build `VkPipelineColorBlendStateCreateInfo::pAttachments` from `graphics.color_blend_attachments()`. diff --git a/docs/REFUSALS.md b/docs/REFUSALS.md index 7b73344fa..1a7ac5018 100644 --- a/docs/REFUSALS.md +++ b/docs/REFUSALS.md @@ -27,7 +27,7 @@ Columns: | Kind | Variants | With a site | Reach system | Reach app | Reach rare | Reach none | Unassessed | |---|---|---|---|---|---|---|---| -| Translator and front-end refusals | 133 | 133 | 8 | 32 | 73 | 20 | 0 | +| Translator and front-end refusals | 135 | 135 | 8 | 33 | 74 | 20 | 0 | | Runtime gaps | 80 | 80 | 1 | 10 | 46 | 23 | 0 | | Apple-only calls | 4 | 4 | 0 | 0 | 0 | 4 | 0 | | Binder refusals at a device limit | 9 | 9 | 0 | 1 | 7 | 1 | 0 | @@ -45,7 +45,7 @@ Columns: | Kind | `metal-measured` | `metal-documented` | `metal-takes` | `device` | `ours` | `unknown` | `delegated` | `-` | |---|---|---|---|---|---|---|---|---| -| Translator and front-end refusals | 0 | 0 | 0 | 50 | 60 | 0 | 0 | 23 | +| Translator and front-end refusals | 0 | 0 | 0 | 50 | 62 | 0 | 0 | 23 | | Runtime gaps | 0 | 0 | 0 | 0 | 80 | 0 | 0 | 0 | | Apple-only calls | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | | Binder refusals at a device limit | 0 | 0 | 0 | 9 | 0 | 0 | 0 | 0 | @@ -102,7 +102,7 @@ Columns: | `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) | `device` | 8: `crates/metal2vulkan-runtime/src/function_table.rs (past_storage_buffer_range)`, `crates/metal2vulkan/src/bind/graphics.rs (patch_binding, 3 sites)` (+4) | `app`: a buffer window past a device's descriptor range | | `Int64Arithmetic` | 64-bit integer arithmetic | devices without VkFeature::ShaderInt64 | `device` | 2: `crates/metal2vulkan/src/lower/arith/legal.rs (check_scalar)`, `crates/metal2vulkan/src/lower/select.rs (selector_form)` | `rare`: 64-bit integers on a device without shaderInt64 | | `Float64Arithmetic` | 64-bit float arithmetic | devices without VkFeature::ShaderFloat64 | `device` | 2: `crates/metal2vulkan/src/device/metal.rs (unsupported_features)`, `crates/metal2vulkan/src/lower/arith/legal.rs (check_scalar)` | `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) | `ours` | 127: `crates/metal2vulkan-runtime/src/binding_view.rs (binding_view, 2 sites)`, `crates/metal2vulkan-runtime/src/blit_fill.rs (fill)` (+83) | `system`: pixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them) | +| `Format` | A pixel or vertex 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) | `ours` | 129: `crates/metal2vulkan-runtime/src/binding_view.rs (binding_view, 2 sites)`, `crates/metal2vulkan-runtime/src/blit_fill.rs (fill)` (+84) | `system`: pixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them) | | `DivergentImplicitLod` | Divergent implicit-LOD sampling or LOD query through a multi-candidate handle | every device (not implemented) | `ours` | 1: `crates/metal2vulkan/src/lower/sampler/select.rs (tangled)` | `app`: implicit-LOD sampling through a dynamically chosen texture | | `ImplicitLodOutsideFragment` | Implicit-LOD sampling outside fragment | every device (not implemented) | `ours` | 3: `crates/metal2vulkan/src/lower/sampler/constexpr.rs (query_min_level)`, `crates/metal2vulkan/src/lower/sampler/select.rs (query_level_measured)` (+1) | `rare`: implicit-LOD sampling outside fragment functions | | `MinLodClamp` | `min_lod_clamp` without `shaderResourceMinLod` | devices without VkFeature::ShaderResourceMinLod; every device (not implemented) | `ours` | 2: `crates/metal2vulkan/src/lower/sampler/select.rs (min_lod)`, `crates/metal2vulkan/src/lower/sampler/select.rs (select_one)` | `rare`: min_lod_clamp on a device without shaderResourceMinLod | @@ -134,6 +134,8 @@ Columns: | `InterfaceComponents` | Too many interface components or locations | devices short of a device limit the site names; devices without VkLimit::MaxColorAttachments; devices without VkLimit::MaxVertexInputAttributes | `device` | 4: `crates/metal2vulkan/src/pipeline/compile/color_group.rs (refusal)`, `crates/metal2vulkan/src/pipeline/link/graphics.rs (graphics_state)` (+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) | `device` | 3: `crates/metal2vulkan/src/pipeline/link/varyings.rs (mesh_fragment)`, `crates/metal2vulkan/src/pipeline/link/varyings.rs (varyings, 2 sites)` | `none`: a Metal link error | | `KernelStageIn` | Kernel `[[stage_in]]` | every device (not implemented) | `ours` | 2: `crates/metal2vulkan-runtime/src/indirect_execute.rs (dispatch)`, `crates/metal2vulkan/src/lower/stage_io/stage_in.rs (select)` | `rare`: kernel stage-in combinations Metal leaves unestablished | +| `VertexStepRate` | A vertex buffer layout stepped per instance at a rate above 1, or at the constant step (`MTLVertexStepFunctionConstant`), on a profile that... | devices without a capability the site computes (`needs`); every device (not implemented) | `ours` | 2: `crates/metal2vulkan/src/metal/vertex.rs (divided, 2 sites)` | `app`: instanced vertex layouts stepped at a rate above 1, or constant | +| `VertexInputLayout` | A vertex attribute whose layout fixed-function input cannot fetch, on a profile that fetches every attribute in fixed function (the identity... | devices without a capability the site computes (`limit`); every device (not implemented) | `ours` | 4: `crates/metal2vulkan/src/pipeline/link/vertex.rs (resolve, 4 sites)` | `rare`: vertex offsets or strides off their format's alignment, or past a device's limits | | `Tessellation` | Tessellation | devices without VkLimit::MaxStorageBufferRange; devices without VkLimit::MaxTessellationGenerationLevel; every device (not implemented) | `ours` | 12: `crates/metal2vulkan-air/src/canon/mod.rs (post_check, 2 sites)`, `crates/metal2vulkan/src/bind/graphics.rs (tessellation_dispatch)` (+9) | `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) | `ours` | 7: `crates/metal2vulkan/src/bind/graphics.rs (mesh_limit)`, `crates/metal2vulkan/src/bind/graphics.rs (plan)` (+4) | `rare`: mesh pipelines | | `TileShading` | | devices without VkLimit::MaxStorageBufferRange; devices without a format's usage; every device (not implemented) | `ours` | 5: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs (scratch)`, `crates/metal2vulkan/src/bind/plan/compute.rs (tile_memory)` (+3) | `rare`: tile shaders (Apple GPU families) | @@ -750,7 +752,7 @@ Each refusal's sites, with the function that builds it. - `feature::BufferRange`: `crates/metal2vulkan-runtime/src/function_table.rs (past_storage_buffer_range)`; `crates/metal2vulkan/src/bind/graphics.rs (patch_binding, 3 sites)`; `crates/metal2vulkan/src/bind/graphics.rs (rebind_with)`; `crates/metal2vulkan/src/bind/instantiate.rs (bind_buffers)`; `crates/metal2vulkan/src/lower/access/function_table.rs (select)`; `crates/metal2vulkan/src/lower/access/mod.rs (place_slots)` - `feature::Int64Arithmetic`: `crates/metal2vulkan/src/lower/arith/legal.rs (check_scalar)`; `crates/metal2vulkan/src/lower/select.rs (selector_form)` - `feature::Float64Arithmetic`: `crates/metal2vulkan/src/device/metal.rs (unsupported_features)`; `crates/metal2vulkan/src/lower/arith/legal.rs (check_scalar)` -- `feature::Format`: `crates/metal2vulkan-runtime/src/binding_view.rs (binding_view, 2 sites)`; `crates/metal2vulkan-runtime/src/blit_fill.rs (fill)`; `crates/metal2vulkan-runtime/src/blit_plan.rs (check_formats, 3 sites)`; `crates/metal2vulkan-runtime/src/blit_plan.rs (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs (through_buffer)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs (shape_over, 3 sites)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs (texture_buffer_texel)`; `crates/metal2vulkan-runtime/src/color_resolve.rs (of_attachment)`; `crates/metal2vulkan-runtime/src/copy_plan.rs (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs (copy_unit, 2 sites)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs (usable_twin)`; `crates/metal2vulkan-runtime/src/families/features.rs (read_write_tier)`; `crates/metal2vulkan-runtime/src/families/formats.rs (answers, 3 sites)`; `crates/metal2vulkan-runtime/src/families/formats.rs (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs (lacking)`; `crates/metal2vulkan-runtime/src/families/formats.rs (none)`; `crates/metal2vulkan-runtime/src/families/formats.rs (probe, 2 sites)`; `crates/metal2vulkan-runtime/src/families/formats.rs (sparse_missing)`; `crates/metal2vulkan-runtime/src/families/formats.rs (unsupported)`; `crates/metal2vulkan-runtime/src/image_plan.rs (plan_held, 3 sites)`; `crates/metal2vulkan-runtime/src/render.rs (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs (check_target)`; `crates/metal2vulkan-runtime/src/render_pass.rs (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs (target)`; `crates/metal2vulkan-runtime/src/resolve.rs (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/sample_copy.rs (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs (unmerged, 2 sites)`; `crates/metal2vulkan-runtime/src/texture.rs (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture.rs (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs (two_planes_refused)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs (astc_texels)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs (etc_texels)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs (with_decoded_twin)`; `crates/metal2vulkan-runtime/src/texture/heap.rs (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs (new_render_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs (check_format, 5 sites)`; `crates/metal2vulkan-runtime/src/ycbcr.rs (refused)`; `crates/metal2vulkan/src/bind/extended_shadow.rs (extended_shadow_module)`; `crates/metal2vulkan/src/bind/heap.rs (array)`; `crates/metal2vulkan/src/bind/plan/resources.rs (extended_sampler)`; `crates/metal2vulkan/src/bind/plan/resources.rs (plain_texture, 2 sites)`; `crates/metal2vulkan/src/bind/plan/resources.rs (require_filter_features)`; `crates/metal2vulkan/src/bind/sample_interleave.rs (finish)`; `crates/metal2vulkan/src/bind/sample_interleave.rs (interleave_split_module)`; `crates/metal2vulkan/src/bind/shadow_copy_in.rs (shadow_copy_in_module)`; `crates/metal2vulkan/src/lower/access/tile.rs (storage_format)`; `crates/metal2vulkan/src/lower/fragment/color.rs (select_param, 3 sites)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs (extended_range_blend, 5 sites)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs (select_output, 3 sites)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs (select_read)`; `crates/metal2vulkan/src/lower/fragment/input_blend.rs (rotated)`; `crates/metal2vulkan/src/lower/sampler/select.rs (select_extended)`; `crates/metal2vulkan/src/lower/sampler/select.rs (texel_in)`; `crates/metal2vulkan/src/lower/stage_io/extended_color.rs (plan)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs (entry)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs (zeroed_output)`; `crates/metal2vulkan/src/lower/stage_io/word_color.rs (plan)`; `crates/metal2vulkan/src/lower/texture/mod.rs (cross_class)`; `crates/metal2vulkan/src/lower/texture/mod.rs (select)`; `crates/metal2vulkan/src/lower/texture/mod.rs (select_image)`; `crates/metal2vulkan/src/lower/texture/mod.rs (select_read_as, 2 sites)`; `crates/metal2vulkan/src/lower/texture/mod.rs (select_write)`; `crates/metal2vulkan/src/lower/texture/slot.rs (atomic_format, 2 sites)`; `crates/metal2vulkan/src/lower/texture/slot.rs (declare_slot, 3 sites)`; `crates/metal2vulkan/src/lower/texture/slot.rs (storage_format, 5 sites)`; `crates/metal2vulkan/src/lower/texture/slot.rs (ulong_format, 3 sites)`; `crates/metal2vulkan/src/metal/format/mod.rs (candidates)`; `crates/metal2vulkan/src/metal/format/mod.rs (held_storage_choice, 3 sites)`; `crates/metal2vulkan/src/metal/format/mod.rs (storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs (vk_format, 2 sites)`; `crates/metal2vulkan/src/pipeline/color_writes.rs (rotated_blend_in_shader)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs (extended_write_mask, 2 sites)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs (graphics_state, 3 sites)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs (reads_alpha_to_coverage, 2 sites)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs (alpha_in_red_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs (rotated_blend)` +- `feature::Format`: `crates/metal2vulkan-runtime/src/binding_view.rs (binding_view, 2 sites)`; `crates/metal2vulkan-runtime/src/blit_fill.rs (fill)`; `crates/metal2vulkan-runtime/src/blit_plan.rs (check_formats, 3 sites)`; `crates/metal2vulkan-runtime/src/blit_plan.rs (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs (through_buffer)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs (shape_over, 3 sites)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs (texture_buffer_texel)`; `crates/metal2vulkan-runtime/src/color_resolve.rs (of_attachment)`; `crates/metal2vulkan-runtime/src/copy_plan.rs (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs (copy_unit, 2 sites)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs (usable_twin)`; `crates/metal2vulkan-runtime/src/families/features.rs (read_write_tier)`; `crates/metal2vulkan-runtime/src/families/formats.rs (answers, 3 sites)`; `crates/metal2vulkan-runtime/src/families/formats.rs (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs (lacking)`; `crates/metal2vulkan-runtime/src/families/formats.rs (none)`; `crates/metal2vulkan-runtime/src/families/formats.rs (probe, 2 sites)`; `crates/metal2vulkan-runtime/src/families/formats.rs (sparse_missing)`; `crates/metal2vulkan-runtime/src/families/formats.rs (unsupported)`; `crates/metal2vulkan-runtime/src/image_plan.rs (plan_held, 3 sites)`; `crates/metal2vulkan-runtime/src/render.rs (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs (check_target)`; `crates/metal2vulkan-runtime/src/render_pass.rs (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs (target)`; `crates/metal2vulkan-runtime/src/resolve.rs (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/sample_copy.rs (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs (unmerged, 2 sites)`; `crates/metal2vulkan-runtime/src/texture.rs (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture.rs (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs (two_planes_refused)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs (astc_texels)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs (etc_texels)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs (with_decoded_twin)`; `crates/metal2vulkan-runtime/src/texture/heap.rs (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs (new_render_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs (check_format, 5 sites)`; `crates/metal2vulkan-runtime/src/ycbcr.rs (refused)`; `crates/metal2vulkan/src/bind/extended_shadow.rs (extended_shadow_module)`; `crates/metal2vulkan/src/bind/heap.rs (array)`; `crates/metal2vulkan/src/bind/plan/resources.rs (extended_sampler)`; `crates/metal2vulkan/src/bind/plan/resources.rs (plain_texture, 2 sites)`; `crates/metal2vulkan/src/bind/plan/resources.rs (require_filter_features)`; `crates/metal2vulkan/src/bind/sample_interleave.rs (finish)`; `crates/metal2vulkan/src/bind/sample_interleave.rs (interleave_split_module)`; `crates/metal2vulkan/src/bind/shadow_copy_in.rs (shadow_copy_in_module)`; `crates/metal2vulkan/src/lower/access/tile.rs (storage_format)`; `crates/metal2vulkan/src/lower/fragment/color.rs (select_param, 3 sites)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs (extended_range_blend, 5 sites)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs (select_output, 3 sites)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs (select_read)`; `crates/metal2vulkan/src/lower/fragment/input_blend.rs (rotated)`; `crates/metal2vulkan/src/lower/sampler/select.rs (select_extended)`; `crates/metal2vulkan/src/lower/sampler/select.rs (texel_in)`; `crates/metal2vulkan/src/lower/stage_io/extended_color.rs (plan)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs (entry)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs (zeroed_output)`; `crates/metal2vulkan/src/lower/stage_io/word_color.rs (plan)`; `crates/metal2vulkan/src/lower/texture/mod.rs (cross_class)`; `crates/metal2vulkan/src/lower/texture/mod.rs (select)`; `crates/metal2vulkan/src/lower/texture/mod.rs (select_image)`; `crates/metal2vulkan/src/lower/texture/mod.rs (select_read_as, 2 sites)`; `crates/metal2vulkan/src/lower/texture/mod.rs (select_write)`; `crates/metal2vulkan/src/lower/texture/slot.rs (atomic_format, 2 sites)`; `crates/metal2vulkan/src/lower/texture/slot.rs (declare_slot, 3 sites)`; `crates/metal2vulkan/src/lower/texture/slot.rs (storage_format, 5 sites)`; `crates/metal2vulkan/src/lower/texture/slot.rs (ulong_format, 3 sites)`; `crates/metal2vulkan/src/metal/format/mod.rs (candidates)`; `crates/metal2vulkan/src/metal/format/mod.rs (held_storage_choice, 3 sites)`; `crates/metal2vulkan/src/metal/format/mod.rs (storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs (vk_format, 2 sites)`; `crates/metal2vulkan/src/metal/vertex.rs (fetch_as, 2 sites)`; `crates/metal2vulkan/src/pipeline/color_writes.rs (rotated_blend_in_shader)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs (extended_write_mask, 2 sites)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs (graphics_state, 3 sites)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs (reads_alpha_to_coverage, 2 sites)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs (alpha_in_red_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs (rotated_blend)` - `feature::DivergentImplicitLod`: `crates/metal2vulkan/src/lower/sampler/select.rs (tangled)` - `feature::ImplicitLodOutsideFragment`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs (query_min_level)`; `crates/metal2vulkan/src/lower/sampler/select.rs (query_level_measured)`; `crates/metal2vulkan/src/lower/sampler/select.rs (query_min_level)` - `feature::MinLodClamp`: `crates/metal2vulkan/src/lower/sampler/select.rs (min_lod)`; `crates/metal2vulkan/src/lower/sampler/select.rs (select_one)` @@ -782,6 +784,8 @@ Each refusal's sites, with the function that builds it. - `feature::InterfaceComponents`: `crates/metal2vulkan/src/pipeline/compile/color_group.rs (refusal)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs (assign)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs (limit_error)` - `feature::UnmatchedVarying`: `crates/metal2vulkan/src/pipeline/link/varyings.rs (mesh_fragment)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs (varyings, 2 sites)` - `feature::KernelStageIn`: `crates/metal2vulkan-runtime/src/indirect_execute.rs (dispatch)`; `crates/metal2vulkan/src/lower/stage_io/stage_in.rs (select)` +- `feature::VertexStepRate`: `crates/metal2vulkan/src/metal/vertex.rs (divided, 2 sites)` +- `feature::VertexInputLayout`: `crates/metal2vulkan/src/pipeline/link/vertex.rs (resolve, 4 sites)` - `feature::Tessellation`: `crates/metal2vulkan-air/src/canon/mod.rs (post_check, 2 sites)`; `crates/metal2vulkan/src/bind/graphics.rs (tessellation_dispatch)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs (select)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs (param)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs (primitive_id_output)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs (not_implemented)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs (plan_entry)`; `crates/metal2vulkan/src/metal/vertex.rs (fetch_as)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs (check_fragment)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs (control_plan)` - `feature::MeshShading`: `crates/metal2vulkan/src/bind/graphics.rs (mesh_limit)`; `crates/metal2vulkan/src/bind/graphics.rs (plan)`; `crates/metal2vulkan/src/lower/mesh/mod.rs (check_payload)`; `crates/metal2vulkan/src/lower/mesh/mod.rs (plan_entry, 2 sites)`; `crates/metal2vulkan/src/memory/plan.rs (reprs)`; `crates/metal2vulkan/src/pipeline/link/mesh.rs (records)` - `feature::TileShading`: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs (scratch)`; `crates/metal2vulkan/src/bind/plan/compute.rs (tile_memory)`; `crates/metal2vulkan/src/lower/access/tile.rs (not_implemented)`; `crates/metal2vulkan/src/lower/sync/barrier.rs (tile_shading)`; `crates/metal2vulkan/src/pipeline/compile/api.rs (tile_pipeline)` diff --git a/scripts/refusal-surface/reach.tsv b/scripts/refusal-surface/reach.tsv index eaf6db93b..33cb9620d 100644 --- a/scripts/refusal-surface/reach.tsv +++ b/scripts/refusal-surface/reach.tsv @@ -73,6 +73,8 @@ feature PixelCoverageAtSampleRate rare coverage read at sample rate feature InterfaceComponents rare too many varyings or attachments for a device feature UnmatchedVarying none a Metal link error feature KernelStageIn rare kernel stage-in combinations Metal leaves unestablished +feature VertexStepRate app instanced vertex layouts stepped at a rate above 1, or constant +feature VertexInputLayout rare vertex offsets or strides off their format's alignment, or past a device's limits feature Tessellation rare tessellation feature MeshShading rare mesh pipelines feature TileShading rare tile shaders (Apple GPU families)