diff --git a/crates/metal2vulkan-runtime/src/degradation.rs b/crates/metal2vulkan-runtime/src/degradation.rs index d38b97e3e..6d7b37ede 100644 --- a/crates/metal2vulkan-runtime/src/degradation.rs +++ b/crates/metal2vulkan-runtime/src/degradation.rs @@ -2231,8 +2231,10 @@ degradations! { /// float or `A8Unorm` format, among others, an 8-bit unorm one written by fewer than four /// lanes, or a 16-bit float or 8-bit unorm one under a blend of the second source): in /// `float`, each step rounded, the sources and the blend color clamped to a normalized - /// format's range, the device's conversion storing the result. Metal's blend for these - /// formats is not measured. + /// format's range, the device's conversion storing the result; or of an 8-bit sRGB format + /// under a blend of the second source in a module compiled with fast math, in the 8-bit + /// unorm blend's rounded forms over the decoded texel. Metal's blend for these is not + /// measured. UnmeasuredFetchBlend = "unmeasured-fetch-blend"; } } diff --git a/crates/metal2vulkan-validation/src/runtime_lane/framebuffer_fetch/blend8.rs b/crates/metal2vulkan-validation/src/runtime_lane/framebuffer_fetch/blend8.rs index 13e945193..7c5ef0c19 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/framebuffer_fetch/blend8.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/framebuffer_fetch/blend8.rs @@ -32,6 +32,11 @@ //! encoder's color past each end, blue alone stored, and alpha alone stored, against the //! arithmetic `Blend::unorm8` names for each, each channel the mask leaves out its code; checked as //! above. +//! +//! The four-channel 8-bit sRGB formats (`BGRA8Unorm_sRGB`, `RGBA8Unorm_sRGB`) under premultiplied +//! over and those blends: the same arithmetic over the texel as a fetch decodes it, encoded by +//! Metal's table (`Blend::srgb8`, measured on the M3 Max); asserted on a device that fetches +//! through the pixel interlock. use super::{form, library, through_inputs}; use crate::runtime_lane::degrade_notices::counts; @@ -530,16 +535,13 @@ type State = ( Option
, ); -/// Other blends, write masks and the blend color, into `BGRA8Unorm`: Metal's arithmetic (plain -/// Metal on the M3 Max under macOS 27.0.1) is each color lane's and alpha's form `Blend::unorm8` -/// names; a channel the mask leaves out keeps its code. Each draw's channels are Metal's where it -/// announces none of [`NOTES`], and on a device that fetches through the pixel interlock it -/// announces none. -#[test] -fn other_blends_masks_and_the_blend_color_store_metals_blend() { +/// The blends, write masks and blend colors [`other_blends_masks_and_the_blend_color_store_metals_blend`] +/// and [`a_blended_four_channel_srgb_fetch_stores_metals_blend`] draw, each with Metal's arithmetic +/// for its color and alpha lanes (`Blend::unorm8`'s forms). +fn states() -> [State; 4] { use BlendFactor as F; use BlendOperation as O; - let states: [State; 4] = [ + [ // Source alpha over: the color's source product rounded first, alpha a lerp of the // source alpha from the destination's. ( @@ -610,7 +612,17 @@ fn other_blends_masks_and_the_blend_color_store_metals_blend() { } }), ), - ]; + ] +} + +/// Other blends, write masks and the blend color, into `BGRA8Unorm`: Metal's arithmetic (plain +/// Metal on the M3 Max under macOS 27.0.1) is each color lane's and alpha's form `Blend::unorm8` +/// names; a channel the mask leaves out keeps its code. Each draw's channels are Metal's where it +/// announces none of [`NOTES`], and on a device that fetches through the pixel interlock it +/// announces none. +#[test] +fn other_blends_masks_and_the_blend_color_store_metals_blend() { + let states = states(); let kinds = NOTES.map(Degradation::from_precision_note); let (messages, _cache, lane) = lane_with(|options| { options.announce_each = kinds.into_iter().collect(); @@ -688,3 +700,157 @@ fn other_blends_masks_and_the_blend_color_store_metals_blend() { let _ = messages.take_notices(); quiet(lane, &messages); } + +/// Metal's sRGB byte of each twelve-bit index (the first indices of `bind::color_write_table`, +/// Metal's encode thresholds). +pub(super) static SRGB_BYTES: std::sync::LazyLock> = std::sync::LazyLock::new(|| { + let first: Vec = metal2vulkan::bind::color_write_table() + .as_chunks::<16>() + .0 + .iter() + .map(|e| u32::from_le_bytes([e[0], e[1], e[2], e[3]])) + .collect(); + (0..4096u32) + .map(|i| (1..256).rev().find(|&b| first[b] <= i).unwrap_or(0) as u8) + .collect() +}); + +/// A blended 8-bit four-channel sRGB attachment (`BGRA8Unorm_sRGB`, `RGBA8Unorm_sRGB`) fetched, +/// on the device the cfg selects, through each fixture's loaded `half4` and `float4`: premultiplied +/// over and [`states`]' blends, masks and blend colors. Metal's answer (plain Metal on the M3 Max +/// under macOS 27.0.1, our own MSL of this shape, random sources and texel bytes, every one of +/// these states, both outputs, fast and safe math, both formats: every channel) is the 8-bit unorm +/// blend's arithmetic over the texel as a fetch reads it, each color byte's twelve-bit step over +/// 4095 and alpha's byte over 255 rounded to the output's type, the result's color bytes by +/// Metal's sRGB encode (the exact product with 4095 rounded to nearest, through its thresholds) +/// and alpha's by its unorm write. The texels' codes cover every byte in each channel. On a device +/// that fetches through the pixel interlock (RADV, ANV, NVIDIA, MoltenVK) the function computes +/// that blend itself, exactly, announcing none of [`NOTES`], which is asserted with every channel; +/// through input attachments (lavapipe) the device blends, and what it announces and how many +/// texels are Metal's is printed. Each draw prints a `FETCH-BLEND8` line. +#[test] +fn a_blended_four_channel_srgb_fetch_stores_metals_blend() { + use BlendFactor as F; + use BlendOperation as O; + // Premultiplied over: `fma(d, 1 - a, s)` under fast math, `s + d (1 - a)` without. + let over_form: Form = |(float, safe), l| { + let m = rounded(float, 1.0 - l.sa); + match safe { + false => fused(float, (l.d, m, l.s)), + true => rounded(float, l.s + rounded(float, l.d * m)), + } + }; + let over: State = ( + [(F::One, F::OneMinusSourceAlpha, O::Add); 2], + ColorWriteMask::ALL, + [0.0; 4], + Some(over_form), + Some(over_form), + ); + let kinds = NOTES.map(Degradation::from_precision_note); + let (messages, _cache, lane) = lane_with(|options| { + options.announce_each = kinds.into_iter().collect(); + }); + let device = lane.device.name(); + let bytes = &*SRGB_BYTES; + let formats: [(PixelFormat, &[usize]); 2] = [ + (PixelFormat::BGRA8UnormSRGB, &[2, 1, 0, 3]), + (PixelFormat::RGBA8UnormSRGB, &[0, 1, 2, 3]), + ]; + let mut drawn = 0; + for fixture in &FIXTURES { + let library = library(&lane, fixture.stem); + for (pf, order) in formats { + for &(entry, output) in &fixture.cases[..2] { + for ([color, alpha], mask, bc, color_form, alpha_form) in + std::iter::once(over).chain(states()) + { + let mut blended = ColorAttachmentDescriptor::new(pf); + blended.blending_enabled = true; + ( + blended.source_rgb_blend_factor, + blended.destination_rgb_blend_factor, + blended.rgb_blend_operation, + ) = color; + ( + blended.source_alpha_blend_factor, + blended.destination_alpha_blend_factor, + blended.alpha_blend_operation, + ) = alpha; + blended.write_mask = mask; + let Some(state) = pipeline(&lane, (&library, fixture), entry, blended) else { + continue; + }; + let (texels, sources) = data(output); + let data = (output, texels.as_slice(), sources.as_slice()); + let (read, noted) = draw((&lane, &messages), &state, (pf, order), data, bc); + let float = output == Output::Float; + let read_as = |x: f64| rounded(float, clamp01(x)); + // A code as Metal's blend reads it: a color byte's step over 4095, alpha's + // byte over 255, rounded to the arithmetic's type. + let decoded = |c: usize, code: u8| match c < 3 { + true => { + let step = crate::runtime_lane::srgb_step(u32::from(code)); + rounded(float, f64::from(step) / 4095.0) + } + false => rounded(float, f64::from(code) / 255.0), + }; + let mut wrong = Vec::new(); + for (i, &codes) in texels.iter().enumerate() { + let got = &read[4 * i..4 * i + 4]; + let s = returned(output, order, (i, codes), &sources); + let operands = |c: usize| Operands { + s: read_as(s[c]), + sa: read_as(s[3]), + d: decoded(c, codes[c]), + da: decoded(3, codes[3]), + c: read_as(f64::from(bc[c])), + ca: read_as(f64::from(bc[3])), + }; + let want: Vec = order + .iter() + .map(|&c| { + let form = if c < 3 { color_form } else { alpha_form }; + let bit = [ + ColorWriteMask::RED, + ColorWriteMask::GREEN, + ColorWriteMask::BLUE, + ColorWriteMask::ALPHA, + ][c]; + match form.filter(|_| mask.contains(bit)) { + Some(form) => { + let v = clamp01(form((float, fixture.safe), operands(c))); + match c < 3 { + true => bytes[(v * 4095.0).round_ties_even() as usize], + false => (v * 255.0).round_ties_even() as u8, + } + } + None => codes[c], + } + }) + .collect(); + if got != want.as_slice() { + wrong.push((i, got.to_vec(), want)); + } + } + let what = format!("{entry} {color:?} {alpha:?} {mask:?} {bc:?}"); + if through_inputs(&lane) { + println!( + "FETCH-BLEND8 {what} {pf:?} | {device} | through {} | Metal's {}/{} \ + texels | announced {noted:?}", + form(&lane), + TEXELS - wrong.len(), + TEXELS, + ); + } else { + checked(&lane, (&what, pf), ¬ed, &wrong); + } + drawn += 1; + } + } + } + } + assert!(drawn > 0, "no draw on {device}"); + let _ = messages.take_notices(); + quiet(lane, &messages); +} diff --git a/crates/metal2vulkan-validation/src/runtime_lane/framebuffer_fetch/generic_blend.rs b/crates/metal2vulkan-validation/src/runtime_lane/framebuffer_fetch/generic_blend.rs index fa61c79e9..03fd850d0 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/framebuffer_fetch/generic_blend.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/framebuffer_fetch/generic_blend.rs @@ -36,7 +36,11 @@ //! fast and safe math) the model holds every channel of `RGBA32Float` without fast math and of //! `RGBA8Unorm` of `float4` outputs, and `RGBA16Unorm`'s within one code; Metal blends //! `RGBA16Float` in `half` and writes it toward zero, so there the model is a code off in about -//! half the channels, and further where a `half` step overflows. +//! half the channels, and further where a `half` step overflows. Into `RGBA8Unorm_sRGB` too: the +//! function computes the 8-bit unorm blend's rounded forms over the decoded texel in the output's +//! type, encoded by Metal's table (`Blend::srgb8`), which the model's `float` blend of the decoded +//! texel, encoded by that table, meets within one code; Metal's without fast math, and within one +//! code of the fast-math fixture's on our probe. use super::{form, library, through_inputs}; use crate::runtime_lane::degrade_notices::counts; @@ -75,6 +79,8 @@ enum Layout { Unorm8, Rgb10a2, A8, + /// `RGBA8Unorm_sRGB`: each color byte Metal's twelve-bit step over 4095, alpha's over 255. + Srgb8, } impl Layout { @@ -83,7 +89,7 @@ impl Layout { match self { Layout::Float32 => 16, Layout::Half16 | Layout::Unorm16 => 8, - Layout::Snorm8 | Layout::Unorm8 | Layout::Rgb10a2 => 4, + Layout::Snorm8 | Layout::Unorm8 | Layout::Rgb10a2 | Layout::Srgb8 => 4, Layout::A8 => 1, } } @@ -93,7 +99,9 @@ impl Layout { match self { Layout::Float32 | Layout::Half16 => None, Layout::Snorm8 => Some(-1.0), - Layout::Unorm16 | Layout::Unorm8 | Layout::Rgb10a2 | Layout::A8 => Some(0.0), + Layout::Unorm16 | Layout::Unorm8 | Layout::Rgb10a2 | Layout::A8 | Layout::Srgb8 => { + Some(0.0) + } } } @@ -119,6 +127,10 @@ impl Layout { }) } Layout::A8 => [0.0, 0.0, 0.0, f32::from(b[0]) / 255.0], + Layout::Srgb8 => std::array::from_fn(|c| match c { + 3 => f32::from(b[3]) / 255.0, + _ => crate::runtime_lane::srgb_step(u32::from(b[c])) as f32 / 4095.0, + }), } } @@ -132,7 +144,7 @@ impl Layout { .map(|c| i64::from(u16::from_le_bytes([b[2 * c], b[2 * c + 1]]))) .collect(), Layout::Snorm8 => b.iter().map(|&x| i64::from(x as i8)).collect(), - Layout::Unorm8 => b.iter().map(|&x| i64::from(x)).collect(), + Layout::Unorm8 | Layout::Srgb8 => b.iter().map(|&x| i64::from(x)).collect(), Layout::Rgb10a2 => { let w = u32::from_le_bytes(b.try_into().unwrap()); vec![ @@ -165,6 +177,15 @@ impl Layout { code(v[3], 0.0, 3.0), ], Layout::A8 => vec![code(v[3], 0.0, 255.0)], + Layout::Srgb8 => (0..4) + .map(|c| match c { + 3 => code(v[3], 0.0, 255.0), + _ => { + let index = code(v[c], 0.0, 4095.0) as usize; + i64::from(super::blend8::SRGB_BYTES[index]) + } + }) + .collect(), } } } @@ -580,8 +601,9 @@ fn a_blended_fetch_of_another_format_stores_the_generic_blend() { } /// A blend of the second source, read from the function's second output (the owned fixture -/// `fbl_fetch_dual`), into a 32-bit float, a 16-bit float, a 16-bit unorm and an 8-bit unorm -/// target: each draw announces `unmeasured-fetch-blend` and stores the model's channels, as above. +/// `fbl_fetch_dual`), into a 32-bit float, a 16-bit float, a 16-bit unorm, an 8-bit unorm and an +/// 8-bit sRGB target: each draw announces `unmeasured-fetch-blend` and stores the model's channels, +/// as above. #[test] fn a_second_source_blend_of_a_fetched_attachment_stores_the_generic_blend() { let kind = Degradation::from_precision_note(PrecisionNote::UnmeasuredFetchBlend); @@ -595,6 +617,7 @@ fn a_second_source_blend_of_a_fetched_attachment_stores_the_generic_blend() { (PixelFormat::RGBA16Float, Layout::Half16), (PixelFormat::RGBA16Unorm, Layout::Unorm16), (PixelFormat::RGBA8Unorm, Layout::Unorm8), + (PixelFormat::RGBA8UnormSRGB, Layout::Srgb8), ]; let mut drawn = 0; for format in formats { diff --git a/crates/metal2vulkan/src/error/mod.rs b/crates/metal2vulkan/src/error/mod.rs index 5c298c723..46d92e88f 100644 --- a/crates/metal2vulkan/src/error/mod.rs +++ b/crates/metal2vulkan/src/error/mod.rs @@ -1412,7 +1412,8 @@ pub enum Feature { pub enum ExtendedRangeBlend { /// Under fast math, a factor of the second source (`Source1Color`, `Source1Alpha` and their /// one-minus forms): dual-source blending into such an attachment is not built. (Without fast - /// math it is, but for a function that writes no second output to the attachment.) + /// math it is. A function that writes no second output to the attachment Metal refuses: + /// [`DescriptorError::ColorAttachment`].) DualSource, /// Under fast math, the color channels' `BlendColor` with `OneMinusBlendColor` (either as /// the source factor) under `Subtract` or `ReverseSubtract`: Metal's result there follows @@ -1717,8 +1718,8 @@ pub enum DescriptorError { VertexLayout { layout: u32 }, /// A color attachment format without a fragment output, or of the wrong type class; one a /// fragment output has fewer components for than its channels; one whose blend reads a - /// second output without the first; or an integer attachment 0 under alpha to coverage - /// (Metal refuses each pipeline). + /// second output the function does not write, or writes without the first; or an integer + /// attachment 0 under alpha to coverage (Metal refuses each pipeline). ColorAttachment { index: u32 }, /// A raw Metal enum value outside the known set. UnknownEnumValue { ty: &'static str, value: u32 }, diff --git a/crates/metal2vulkan/src/lower/arith/extended_range/blend.rs b/crates/metal2vulkan/src/lower/arith/extended_range/blend.rs index 10864e7fa..d59d711cc 100644 --- a/crates/metal2vulkan/src/lower/arith/extended_range/blend.rs +++ b/crates/metal2vulkan/src/lower/arith/extended_range/blend.rs @@ -1252,6 +1252,43 @@ impl Blend { Ok(b) } + /// Metal's blend `eq` of a four-lane output of a module of math `math`, blended in `arith` + /// (the output's type), into an 8-bit sRGB attachment of format `pf` (`R8Unorm_sRGB`, + /// `RG8Unorm_sRGB`, `RGBA8Unorm_sRGB`, `BGRA8Unorm_sRGB`) storing the channels `written` of + /// four, computed by [`blend_srgb8`]: the 8-bit unorm blend of the format's unorm twin + /// ([`Blend::unorm8`]) over the destination as a fetch reads it, Metal's twelve-bit decode of + /// each color byte and alpha's byte over 255, the result stored by Metal's sRGB encode. Plain + /// Metal on the M3 Max under macOS 27.0.1 (our own MSL, random sources and texel bytes, `half4` + /// and `float4` outputs, fast and safe math, each of the four formats): every channel of + /// premultiplied and source-alpha over, the blend color's lerps, a blue-only and an + /// alpha-only write mask, a sum, and a minimum and maximum is that arithmetic's. Where the + /// 8-bit unorm blend is not built (a factor of the second source; under fast math, a format + /// without alpha's lerp, common factor or contracted pair), the rounded forms + /// ([`BlendMath::Rounded`]): Metal's without fast math (a second source's and the formats + /// without alpha's measured so), a near-equivalent under it. The flag is whether the blend is + /// Metal's: the 8-bit unorm blend, or the rounded forms without fast math. + pub fn srgb8( + eq: &BlendEquation, + pf: PixelFormat, + written: ColorWriteMask, + (math, arith): (BlendMath, BlendArith), + ) -> Result<(Blend, bool), Error> { + let (twin, has_alpha) = match pf { + PixelFormat::R8UnormSRGB => (PixelFormat::R8Unorm, false), + PixelFormat::RG8UnormSRGB => (PixelFormat::RG8Unorm, false), + PixelFormat::RGBA8UnormSRGB => (PixelFormat::RGBA8Unorm, true), + PixelFormat::BGRA8UnormSRGB => (PixelFormat::BGRA8Unorm, true), + _ => return Err(Unsupported::not_implemented(Feature::FramebufferFetch).into()), + }; + if let Ok(b) = Blend::unorm8(eq, twin, written, (math, arith)) { + return Ok((b, true)); + } + let family = Family::Unorm8(arith); + let rounded = BlendMath::Rounded; + let b = planned_for(eq, (has_alpha, family), written, (false, rounded))?; + Ok((b, math == rounded)) + } + /// Metal's blend `eq` of a four-lane output of a module of math `math` into a packed 16-bit /// unorm attachment (`B5G6R5Unorm`, `A1BGR5Unorm`, `ABGR4Unorm`, `BGR5A1Unorm`) storing the /// channels `written` of four, computed by [`blend_packed16`] in `half` arithmetic whatever the @@ -2191,7 +2228,40 @@ pub fn blend_unorm8( ) -> BResult { let s = clamped(fb, s, (0.0, 1.0))?; let d = unorm8_tile_value(fb, texel, arith)?; - clamped_blend(fb, b, arith, (s, d), color) + clamped_blend(fb, b, arith, (s, None, d), color) +} + +/// Metal's blend `b` ([`Blend::srgb8`]) of a four-lane output `s` (a `vec4` of `f32`: a `half4` +/// output's `half`s, or a `float4` one) over `decoded`, the 8-bit sRGB attachment's texel as a +/// fetch reads it (a `vec4` of `f32`: each color byte's twelve-bit step over 4095 and the alpha +/// byte over 255, correctly rounded, `math::unpack` of `unorm4x8_srgb`; a channel the format lacks +/// 0, alpha 1), in `arith`: a `vec4` of `f32` holding each blended lane, a `half` +/// (`BlendArith::Half`) or a `float` (`BlendArith::Float`), which the caller stores by Metal's +/// sRGB encode. The output, and `s1`, the second source (the function's second output, where `b` +/// reads it, [`Blend::reads_second`]), are clamped to `[0, 1]` first, a NaN to 0, and the +/// destination read rounded to the arithmetic's type: each `f32` the decode gives rounds to the +/// `half` its exact quotient does (no step over 4095 and no byte over 255 lies within an `f32` +/// rounding of a `half` midpoint; every one is checked, +/// `lower::arith::tests::blend8::an_srgb_step_s_half_is_its_quotient_s`). `color`, the blend +/// color, reads as [`blend_unorm8`]'s. +pub fn blend_srgb8( + fb: &mut FunctionBuilder<'_>, + b: &Blend, + arith: BlendArith, + (s, s1, decoded): (Value, Option, Value), + color: Option, +) -> BResult { + let f = floats(); + let s = clamped(fb, s, (0.0, 1.0))?; + let s1 = match s1 { + Some(v) => Some(clamped(fb, v, (0.0, 1.0))?), + None => None, + }; + let d = match arith { + BlendArith::Half => half_of(fb, f, decoded)?, + BlendArith::Float => decoded, + }; + clamped_blend(fb, b, arith, (s, s1, d), color) } /// The generic blend `b` ([`Blend::generic`]) of a four-lane output `s` (a `vec4` of `f32`) over @@ -2252,14 +2322,15 @@ pub fn blend_generic( lanes(fb, b, &inputs) } -/// Blend `b` of the clamped output `s` over the destination `d`, both `vec4`s of `f32` in -/// `arith`, the blend color `color` clamped to `[0, 1]` (a NaN 0) and rounded to `arith`, and -/// its one minus that of the read: [`blend_unorm8`]'s and [`blend_packed16`]'s arithmetic. +/// Blend `b` of the clamped output `s` (and second source `s1`, where `b` reads it) over the +/// destination `d`, `vec4`s of `f32` in `arith`, the blend color `color` clamped to `[0, 1]` (a +/// NaN 0) and rounded to `arith`, and its one minus that of the read: [`blend_unorm8`]'s, +/// [`blend_srgb8`]'s and [`blend_packed16`]'s arithmetic. fn clamped_blend( fb: &mut FunctionBuilder<'_>, b: &Blend, arith: BlendArith, - (s, d): (Value, Value), + (s, s1, d): (Value, Option, Value), color: Option, ) -> BResult { let f = floats(); @@ -2291,7 +2362,7 @@ fn clamped_blend( constant, sf: None, math: b.math, - s1: None, + s1, arith, negates_one_minus: false, }; @@ -2314,7 +2385,7 @@ pub fn blend_packed16( let f = floats(); let s = clamped(fb, s, (0.0, 1.0))?; let s = half_of(fb, f, s)?; - clamped_blend(fb, b, BlendArith::Half, (s, d), color) + clamped_blend(fb, b, BlendArith::Half, (s, None, d), color) } /// Metal's read of each lane of `texel` (a `vec4` of `f32`, an 8-bit unorm texel as the storage diff --git a/crates/metal2vulkan/src/lower/arith/tests/blend8.rs b/crates/metal2vulkan/src/lower/arith/tests/blend8.rs index 8b4a1f950..3bcaf929b 100644 --- a/crates/metal2vulkan/src/lower/arith/tests/blend8.rs +++ b/crates/metal2vulkan/src/lower/arith/tests/blend8.rs @@ -176,6 +176,41 @@ fn a_code_s_half_is_its_product_s() { } } +/// The `half` nearest `n / d` (a quotient in `[2^-14, 1]`, or zero), from the exact quotient: +/// `n` scaled to eleven significant bits over `d`, rounded to nearest even by the remainder. +fn exact_half(n: u64, d: u64) -> f64 { + if n == 0 { + return 0.0; + } + // No quotient but 1 lies near a power of two, so the `f64`'s exponent is the quotient's. + let e = (n as f64 / d as f64).log2().floor() as i32; + assert!(e >= -14, "{n} / {d} is no normal half"); + let scaled = n << (10 - e); + let (mut q, r) = (scaled / d, scaled % d); + if 2 * r > d || (2 * r == d && q % 2 == 1) { + q += 1; + } + q as f64 * 2f64.powi(e - 10) +} + +/// An 8-bit sRGB destination read in `half` (`blend_srgb8`): the `half` of the `f32` nearest each +/// twelve-bit step over 4095 (the decode of a color byte) and each byte over 255 (alpha's), as the +/// decode gives it correctly rounded, is the `half` nearest the exact quotient: for every step and +/// byte, so the read rounds once, as Metal's. +#[test] +fn an_srgb_step_s_half_is_its_quotient_s() { + for d in [4095u64, 255] { + for n in 0..=d { + let near = n as f32 / d as f32; + assert_eq!( + f64_to_f16(f64::from(near)), + f64_to_f16(exact_half(n, d)), + "{n} / {d}" + ); + } + } +} + /// `half_of` rounds to `half` as Metal does under each `half` rounding: to nearest even, half /// denormals kept, an infinity from 65520 up, the sign of a zero kept. Over every finite `half` of /// either sign: the `half` itself, the `f32`s beside it, the midpoint to the next `half` up in diff --git a/crates/metal2vulkan/src/lower/fragment/fetch.rs b/crates/metal2vulkan/src/lower/fragment/fetch.rs index d76b915dd..22a8dc391 100644 --- a/crates/metal2vulkan/src/lower/fragment/fetch.rs +++ b/crates/metal2vulkan/src/lower/fragment/fetch.rs @@ -77,8 +77,13 @@ //! byte over 255, a write encodes by Metal's thresholds (`math::unpack` and `math::pack` of //! `unorm4x8_srgb`; on the M4: every byte read, a texel an earlier draw of the //! pass wrote read as the decode of its stored byte, every encode threshold, 4, 194, 304 floats -//! and every half written). The one- and two-channel sRGB formats are not measured, and stay -//! refused; a packed 16-bit format the device samples but does not render +//! and every half written); a blended write encodes Metal's blend, its 8-bit unorm blend of the +//! format's unorm twin over the texel as a fetch decodes it (`extended_range::Blend::srgb8`, +//! [`srgb_texel`]: on the M3 Max under macOS 27.0.1 every channel of the blends measured, both +//! maths, `half4` and `float4`), and a blend of the second source the rounded forms, Metal's +//! without fast math, under it a near-equivalent the function notes +//! (`PrecisionNote::UnmeasuredFetchBlend`). The one- and two-channel sRGB formats are not built, +//! and stay refused; a packed 16-bit format the device samples but does not render //! (`metal::format::WordAttachment`: `A1BGR5Unorm`, `ABGR4Unorm` on the RTX 5080) through a view //! of the attachment in its word's unsigned integer format (`R16_UINT`, `StorageView::word`): a //! write stores Metal's word of the output (`stage_io::word_color::encode`), the fields of the @@ -257,9 +262,9 @@ //! splits around the draw, whose blend is the device's. A factor of the second source reads the //! function's second (index 1) output, four `half` or `float` lanes, clamped as the first (Metal //! makes and draws a pipeline that fetches and blends so; one whose function writes no second -//! output is refused, `ExtendedRangeBlend` `DualSource`). The generic blend also takes a 16-bit -//! float or 8-bit unorm attachment's blend of the second source, or beside a second output, whose -//! Metal arithmetic is not measured. +//! output Metal refuses, and so is it refused, `DescriptorError::ColorAttachment`). The generic +//! blend also takes a 16-bit float or 8-bit unorm attachment's blend of the second source, or +//! beside a second output, whose Metal arithmetic is not measured. //! //! A blocked attachment is refused with the blocker's reason (what the device lacks, or //! `NotImplemented`): no ordered path exists there. The storage form @@ -341,6 +346,16 @@ pub(crate) fn unorm8_format(pf: crate::metal::PixelFormat) -> bool { matches!(pf, P::R8Unorm | P::RG8Unorm | P::RGBA8Unorm | P::BGRA8Unorm) } +/// Whether `pf` is an 8-bit sRGB color format, whose blend Metal computes as its unorm twin's over +/// the decoded texel, encoded ([`extended_range::Blend::srgb8`]). +pub(crate) fn srgb8_format(pf: crate::metal::PixelFormat) -> bool { + use crate::metal::PixelFormat as P; + matches!( + pf, + P::R8UnormSRGB | P::RG8UnormSRGB | P::RGBA8UnormSRGB | P::BGRA8UnormSRGB + ) +} + /// Whether `pf` is a packed 16-bit unorm format (`metal::format::WordAttachment::Packed16`), whose /// blend Metal computes in `half` over its decoded codes ([`extended_range::Blend::packed16`]). pub(crate) fn packed16_format(pf: crate::metal::PixelFormat) -> bool { @@ -352,7 +367,8 @@ pub(crate) fn packed16_format(pf: crate::metal::PixelFormat) -> bool { /// Metal's blend `eq` of a format held directly, which the shader computes in the storage form, /// storing the channels `written` of four under math `math`: an 8-bit unorm attachment's in -/// `arith` ([`extended_range::Blend::unorm8`]), a packed 16-bit one's +/// `arith` ([`extended_range::Blend::unorm8`]), an 8-bit sRGB one's in `arith` +/// ([`extended_range::Blend::srgb8`], whether Metal's or not), a packed 16-bit one's /// ([`extended_range::Blend::packed16`], in `half` whatever the output), else a 16-bit float one's /// ([`extended_range::Blend::half_float`], which takes its arithmetic when it computes). The /// planning callers pass `BlendArith::Half`: what is refused, what reads the blend color, and the @@ -369,12 +385,28 @@ fn direct_blend( if packed16_format(pf) { return extended_range::Blend::packed16(eq, written, math); } + if srgb8_format(pf) { + return extended_range::Blend::srgb8(eq, pf, written, (math, arith)).map(|(b, _)| b); + } match unorm8_format(pf) { true => extended_range::Blend::unorm8(eq, pf, written, (math, arith)), false => extended_range::Blend::half_float(eq, pf, written, math), } } +/// Whether Metal's blend `eq` into the 8-bit sRGB attachment of `pf` storing the channels `written` +/// of four under math `math` is its 8-bit unorm blend's, or its rounded forms without fast math +/// ([`extended_range::Blend::srgb8`]'s flag): elsewhere the shader computes a near-equivalent. +fn srgb8_exact( + eq: &BlendEquation, + pf: crate::metal::PixelFormat, + written: ColorWriteMask, + math: extended_range::blend::BlendMath, +) -> bool { + let half = extended_range::blend::BlendArith::Half; + extended_range::Blend::srgb8(eq, pf, written, (math, half)).is_ok_and(|(_, exact)| exact) +} + /// The generic float blend `eq` into an attachment of `pf` storing the channels `written` of four /// ([`extended_range::Blend::generic`]): a format without alpha reads a destination alpha of one. fn generic( @@ -935,8 +967,8 @@ pub(crate) fn storage_form( // An 8-bit four-channel sRGB attachment is viewed in `R32_UINT`, whose bytes the function // decodes and encodes by Metal's measured conversions (a fetch reads Metal's // twelve-bit decode of the stored byte, `math::unpack`'s, even after an earlier draw of the - // pass wrote it, and a write stores `math::pack`'s encode). The one- and two-channel sRGB - // formats are not measured, nor is a blend into one. + // pass wrote it, and a write stores `math::pack`'s encode, of Metal's blend where it blends). + // The one- and two-channel sRGB formats are not built. // A BGRA-order attachment on a device that accesses its format without one in neither // direction (SPIR-V names no image format for it) is viewed in its RGBA-order twin, whose red // and blue the function exchanges on every read and write: the device converts each channel @@ -1007,6 +1039,16 @@ pub(crate) fn storage_form( && attachment.equation.is_some_and(|eq| { extended_range::Blend::packed16(&eq, written_of_four, use_.math).is_ok() }); + // And the blend of an 8-bit sRGB attachment viewed in its unsigned integer format, which no + // device blends: the shader computes Metal's, the 8-bit unorm blend over the decoded texel, + // encoded (`extended_range::Blend::srgb8`: its rounded forms where the 8-bit unorm blend is + // not built, a near-equivalent [`plan`] notes under fast math). + let srgb_blend = uint_view.is_some() + && attachment.blending_enabled + && !attachment.replaces + && attachment.equation.is_some_and(|eq| { + extended_range::Blend::srgb8(&eq, pf, written_of_four, (use_.math, half)).is_ok() + }); // And any other blend of a float-class format held directly (not an sRGB or a word one), // whose Metal arithmetic is not built: the shader computes the generic float blend // (`extended_range::Blend::generic`), a near-equivalent [`plan`] takes only where the function @@ -1025,6 +1067,7 @@ pub(crate) fn storage_form( || half_blend || unorm8_blend || word_blend + || srgb_blend || generic_blend) && stores }); @@ -1063,8 +1106,6 @@ pub(crate) fn storage_form( || (srgb && uint_view.is_none()) // An `RGB9E5Float` word's mantissas share its exponent: no field is kept apart. || (word == Some(WordAttachment::Rgb9e5) && stores && merged) - // Metal's blend into an sRGB attachment, a replacing one too, is not measured. - || (uint_view.is_some() && stores && attachment.blending_enabled) || (writes && attachment .write_mask @@ -1568,6 +1609,21 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> { // A blend of the second source reads the function's second (index 1) output, four `half` // or `float` lanes as the first's. let second = second_output4(cx, color)?; + // A blend of the second source whose function writes no second output: Metal refuses + // the pipeline ("Fragment shader does not write to render target color(0), index(1) that + // is required for blending"), as link refuses it where the device blends. + let reads_second = inputs + .attachments + .get(&color) + .copied() + .flatten() + .is_some_and(|a| { + a.blending_enabled && a.equation.is_some_and(|eq| eq.reads_second_source()) + }); + if reads_second && second.is_none() { + let invalid = DescriptorError::ColorAttachment { index: color }; + return Err(Error::InvalidDescriptor(invalid)); + } let generic_of = |view: StorageView, exact: &mut bool| { let reads_second = view .blend @@ -1575,9 +1631,6 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> { .is_some_and(|b| b.reads_second()); match (fetched.contains(&color), reads_second, second) { (false, _, _) => Err(not_implemented()), - (true, true, None) => Err(Unsupported::not_implemented( - Feature::ExtendedRangeBlend(ExtendedRangeBlend::DualSource), - )), (true, true, Some(None)) => Err(Unsupported::not_implemented( Feature::ExtendedRangeBlend(ExtendedRangeBlend::Output), )), @@ -1605,7 +1658,28 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> { direct_blend(&eq, view.pixel_format, written, (math, half)) }); let unorm8 = unorm8_format(view.pixel_format); + let srgb = view.uint_view.is_some(); match (planned, blended_output(cx.entry, color)) { + // An 8-bit sRGB blend (`extended_range::Blend::srgb8`), whose second source, + // where it reads one, is the function's second output: Metal's where its 8-bit + // unorm blend is built and the module states its math (Metal clamps the output + // first, so none of the output's arithmetic folds into it), else a + // near-equivalent the function notes, taken only where the function reads the + // attachment. + (Some(Ok(b)), _) if srgb => { + let stated = cx.entry.compile.fast_math.is_some(); + let exact = view.blend.is_some_and(|eq| { + srgb8_exact(&eq, view.pixel_format, written(view.kept), math) + }); + sixteen_exact = stated && exact; + match (b.reads_second(), second) { + (true, Some(None)) => Err(Unsupported::not_implemented( + Feature::ExtendedRangeBlend(ExtendedRangeBlend::Output), + )), + _ if sixteen_exact || fetched.contains(&color) => Ok((view, None)), + _ => Err(not_implemented()), + } + } // An 8-bit unorm blend of fewer lanes is not measured: the generic blend. (Some(Ok(_)), Some((_, lanes))) if unorm8 && lanes < 4 => { generic_of(view, &mut sixteen_exact) @@ -1651,16 +1725,14 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> { } } Ok(view) => match blend_of(&view, (outputs4.get(&color).copied(), blend_math(cx))) { - // A blend of the second source reads the function's index-1 output, four `half` - // or `float` lanes as the first's. - Ok(Some(b)) if b.reads_second() => match second_output4(cx, color)? { + // A blend of the second source reads the function's index-1 output (which it + // writes: Metal refuses the pipeline otherwise, above), four `half` or `float` + // lanes as the first's. + Ok(Some(b)) if b.reads_second() => match second { Some(Some(_)) => Ok((view, Some(b))), - Some(None) => Err(Unsupported::not_implemented(Feature::ExtendedRangeBlend( + _ => Err(Unsupported::not_implemented(Feature::ExtendedRangeBlend( ExtendedRangeBlend::Output, ))), - None => Err(Unsupported::not_implemented(Feature::ExtendedRangeBlend( - ExtendedRangeBlend::DualSource, - ))), }, Ok(b) => Ok((view, b)), Err(Error::Unsupported(gap)) => Err(gap), @@ -1708,7 +1780,9 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> { if half.is_ok_and(|h| h.reads_constant()) { cx.push.insert(PushField::HalfBlendColor); } - if view.generic_blend { + let srgb_unmeasured = + view.uint_view.is_some() && !srgb8_exact(&eq, pf, written, blend_math(cx)); + if view.generic_blend || srgb_unmeasured { cx.precision.insert(PrecisionNote::UnmeasuredFetchBlend); } else if view.word.is_some() { cx.precision.insert(PrecisionNote::DeviceColorConversion); @@ -1925,7 +1999,8 @@ pub(super) fn second_output4( /// ([`select_second_output`]), which no interface variable holds. pub(crate) fn blends_second(cx: &SelectCx<'_>, color: u32) -> bool { cx.families.fragment.fetch.get(&color).is_some_and(|sc| { - sc.view.blend.is_some() && (sc.view.extended.is_some() || sc.view.generic_blend) + sc.view.blend.is_some() + && (sc.view.extended.is_some() || sc.view.generic_blend || sc.view.uint_view.is_some()) }) } @@ -2544,7 +2619,9 @@ pub(super) fn emit_return( let table = crate::lower::texture::extended_table(cx, range)?; extended_range::encode(fb, range, v, table)? } - (None, _) if sc.view.uint_view.is_some() => srgb_texel(cx, fb, color, &sc, form, part)?, + (None, _) if sc.view.uint_view.is_some() => { + srgb_texel(cx, fb, color, &sc, (form, part), second)? + } (None, _) if sc.view.word.is_some() => word_texel(cx, fb, color, &sc, form, part)?, (None, _) => { // Metal's 16-bit float blend of an output of one to four lanes, its 8-bit unorm @@ -2818,10 +2895,10 @@ fn output_lanes(fb: &mut FunctionBuilder<'_>, form: Form, v: SValue) -> BResult< } /// Whether the function writes color attachment `color` through the storage form under a blend -/// the shader computes of a format held directly, Metal's 16-bit float or 8-bit unorm blend, so -/// that the write stores the value the blend gives, whatever the output and the device's -/// conversion (`exact`: and that blend is Metal's exactly, [`StorageColor::exact_blend`]). Not -/// the generic blend ([`StorageView::generic_blend`]), whose result the device's conversion +/// the shader computes of a format held directly, Metal's 16-bit float, 8-bit unorm or 8-bit sRGB +/// blend, so that the write stores the value the blend gives, whatever the output and the +/// device's conversion (`exact`: and that blend is Metal's exactly, [`StorageColor::exact_blend`]). +/// Not the generic blend ([`StorageView::generic_blend`]), whose result the device's conversion /// stores as it stores an output. pub(super) fn blends_in_shader(cx: &SelectCx<'_>, color: u32, exact: bool) -> bool { cx.families.fragment.fetch.get(&color).is_some_and(|sc| { @@ -3078,14 +3155,18 @@ fn srgb_decode( /// with 255; our probe checked every threshold, 4, 194, 304 floats and every half), its /// bytes in `format`'s order; a write that keeps channels takes their bytes from the texel read /// first at the invocation's pixel (and sample), inside the interlock, so they stay as they were, -/// bit for bit. +/// bit for bit. Under a blend (`StorageView::blend`) the encode is of Metal's blend of the output +/// over that texel, decoded as a fetch reads it ([`srgb_decode`]), in the output's type, the second +/// source `second` (the function's second output) where the blend reads one, and the blend color +/// from `PushField::HalfBlendColor` where it reads that (`extended_range::Blend::srgb8`, +/// `extended_range::blend::blend_srgb8`). fn srgb_texel( cx: &mut EmitCx<'_>, fb: &mut FunctionBuilder<'_>, color: u32, sc: &StorageColor, - form: Form, - part: SValue, + (form, part): (Form, SValue), + second: Option<(Form, SValue)>, ) -> BResult { let Some(table) = cx.decl.families.arith.srgb else { return Err(cx.fail("an sRGB storage write without Metal's table")); @@ -3098,6 +3179,49 @@ fn srgb_texel( { return Err(cx.fail("an sRGB storage write of another output than four float lanes")); } + // The texel the write reads first: the blend's destination, and the bytes a mask keeps. + let old = match sc.view.blend.is_some() || sc.view.merges() { + true => { + let texel = read_texel(cx, fb, color, sc)?; + Some(fb.composite_extract(texel, &[0])?) + } + false => None, + }; + let part = match (sc.view.blend, old) { + (Some(eq), Some(old)) => { + let arith = match form.float_fmt() { + Some(FloatFmt::Half) => extended_range::blend::BlendArith::Half, + _ => extended_range::blend::BlendArith::Float, + }; + let math = extended_range::blend::BlendMath::of(cx.entry.compile.fast_math); + let (pf, written) = (sc.view.pixel_format, written(sc.view.kept)); + let Ok((b, _)) = extended_range::Blend::srgb8(&eq, pf, written, (math, arith)) else { + return Err(cx.fail("an sRGB blend outside its forms")); + }; + let s1 = match (b.reads_second(), second) { + (true, Some((form, s1))) + if form.lanes == 4 + && matches!(form.float_fmt(), Some(FloatFmt::Half | FloatFmt::F32)) => + { + Some(s1) + } + (true, _) => return Err(cx.fail("a blend of the second source without its output")), + (false, _) => None, + }; + let decoded = srgb_decode(fb, sc.view.format, old, table)?; + let constant = match b.reads_constant() { + true => { + let field = cx.push_field(fb, PushField::HalfBlendColor)?; + Some(fb.composite_extract(field, &[0])?) + } + false => None, + }; + let parts = (part, s1, decoded); + extended_range::blend::blend_srgb8(fb, &b, arith, parts, constant)? + } + (Some(_), None) => return Err(cx.fail("an sRGB blend without its texel")), + (None, _) => part, + }; let f4 = form.with(Held::Float(crate::lower::arith::FloatFmt::F32)); let test = crate::lower::arith::nan::NanTest::for_modes(&cx.plan.families.arith.modes); let rgba = math::pack(fb, PackFormat::Unorm4x8Srgb, f4, part, Some(table), test)?; @@ -3119,8 +3243,9 @@ fn srgb_texel( .zip(bytes) .filter(|(c, _)| sc.view.kept.contains(**c)) .fold(0u32, |m, (_, at)| m | 0xff << at); - let old = read_texel(cx, fb, color, sc)?; - let old = fb.composite_extract(old, &[0])?; + let Some(old) = old else { + return Err(cx.fail("an sRGB merge without its texel")); + }; let keep = fb.u32_const(mask)?; let keep = fb.module().const_value(keep)?; let write = fb.u32_const(!mask)?; diff --git a/crates/metal2vulkan/src/lower/fragment/fetch/tests.rs b/crates/metal2vulkan/src/lower/fragment/fetch/tests.rs index 7b4facd0b..506106e87 100644 --- a/crates/metal2vulkan/src/lower/fragment/fetch/tests.rs +++ b/crates/metal2vulkan/src/lower/fragment/fetch/tests.rs @@ -153,11 +153,10 @@ fn a_clean_state_takes_the_storage_form() { } /// What the form does not model is `NotImplemented`: an amplified pipeline, a one- or two-channel -/// sRGB format, and, for a written attachment only, an sRGB format's blend (but one and zero, -/// added), a signed normalized format under a write mask that keeps some of its channels, alpha to -/// coverage, a returned sample mask at one sample, and a depth or stencil attachment without early -/// fragment tests, but where each draw's plan checks its tests. Another format's blend is the -/// generic one ([`StorageView::generic_blend`]). +/// sRGB format, and, for a written attachment only, a signed normalized format under a write mask +/// that keeps some of its channels, alpha to coverage, a returned sample mask at one sample, and a +/// depth or stencil attachment without early fragment tests, but where each draw's plan checks its +/// tests. Another format's blend is the generic one ([`StorageView::generic_blend`]). #[test] fn unmodelled_states_are_not_implemented() { let p = profile("moltenvk-m3", &[]); @@ -170,10 +169,6 @@ fn unmodelled_states_are_not_implemented() { let srgb = state(pf, |_| {}); assert_eq!(form(&srgb, false, READS, &p), ni, "{pf:?}"); } - let blended = state(PixelFormat::RGBA8UnormSRGB, |c| { - c.blending_enabled = true; - c.destination_rgb_blend_factor = crate::metal::BlendFactor::One; - }); let generic = state(PixelFormat::R32Float, |c| { c.blending_enabled = true; c.destination_rgb_blend_factor = crate::metal::BlendFactor::One; @@ -196,7 +191,6 @@ fn unmodelled_states_are_not_implemented() { ..WRITES }; for (what, inputs, use_) in [ - ("blending", &blended, WRITES), ("signed normalized write mask", &rg, WRITES), ("alpha to coverage", &coverage, WRITES), ("depth without early tests", &depth, late), @@ -220,12 +214,11 @@ fn unmodelled_states_are_not_implemented() { /// An 8-bit four-channel sRGB attachment takes the storage form through a view in `R32_UINT`, /// declared `R32ui` (without a format where the device grants that) with `uint` texels, which the -/// function reads and writes as floats it decodes and encodes itself; a blend into one, a replacing -/// blend too, is not measured, so a written attachment under it is `NotImplemented`, a read-only -/// one is not. +/// function reads and writes as floats it decodes and encodes itself; a blend into one is Metal's, +/// which the function computes ([`extended_range::Blend::srgb8`]), its second source's too, and a +/// replacing one stores the source as an unblended write does. #[test] fn a_four_channel_srgb_attachment_takes_a_uint_view() { - let ni = Err(Unsupported::not_implemented(Feature::FramebufferFetch)); for stem in [ "moltenvk-m3", "amd-rdna3-radv", @@ -259,15 +252,24 @@ fn a_four_channel_srgb_attachment_takes_a_uint_view() { // A mask that keeps channels merges their bytes. let masked = state(pf, |c| c.write_mask = ColorWriteMask::RED); assert!(form(&masked, false, WRITES, &p).is_ok(), "{stem} {pf:?}"); - for replaces in [false, true] { + for (destination, blends) in [ + (crate::metal::BlendFactor::One, true), + (crate::metal::BlendFactor::OneMinusSource1Color, true), + (crate::metal::BlendFactor::Zero, false), + ] { let blended = state(pf, |c| { c.blending_enabled = true; - if !replaces { - c.destination_rgb_blend_factor = crate::metal::BlendFactor::One; - } + c.destination_rgb_blend_factor = destination; + c.destination_alpha_blend_factor = destination; }); - assert_eq!(form(&blended, false, WRITES, &p), ni, "{stem} {pf:?}"); - assert!(form(&blended, false, READS, &p).is_ok(), "{stem} {pf:?}"); + let view = form(&blended, false, WRITES, &p).expect("the sRGB blend"); + assert_eq!( + view.blend.is_some(), + blends, + "{stem} {pf:?} {destination:?}" + ); + let read = form(&blended, false, READS, &p).expect("a read"); + assert_eq!(read.blend, None, "{stem} {pf:?} {destination:?}"); } } } diff --git a/crates/metal2vulkan/src/lower/fragment/input_blend.rs b/crates/metal2vulkan/src/lower/fragment/input_blend.rs index 40180a245..722ecc36d 100644 --- a/crates/metal2vulkan/src/lower/fragment/input_blend.rs +++ b/crates/metal2vulkan/src/lower/fragment/input_blend.rs @@ -29,7 +29,9 @@ use std::collections::BTreeMap; use crate::air::ir::TypeId as AirTypeId; -use crate::error::{Attachment, Error, ExtendedRangeBlend, Feature, RuntimeInput, Unsupported}; +use crate::error::{ + Attachment, DescriptorError, Error, ExtendedRangeBlend, Feature, RuntimeInput, Unsupported, +}; use crate::lower::arith::{extended_range, Form}; use crate::lower::emit::EmitCx; use crate::lower::select::SelectCx; @@ -142,16 +144,19 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> { extended_range::Blend::for_output(&eq, form, fetch::written(kept), (output, math)) .map_err(tied)?; // A blend of the second source reads the function's index-1 output, four `half` or - // `float` lanes as the first's. + // `float` lanes as the first's. Without one, Metal refuses the pipeline ("Fragment shader + // does not write to render target color(0), index(1) that is required for blending"). if blend.reads_second() { - let refused = match fetch::second_output4(cx, color).map_err(tied)? { - Some(Some(_)) => None, - Some(None) => Some(ExtendedRangeBlend::Output), - None => Some(ExtendedRangeBlend::DualSource), - }; - if let Some(gap) = refused { - let refused = Unsupported::not_implemented(Feature::ExtendedRangeBlend(gap)); - return Err(tied(refused.into())); + match fetch::second_output4(cx, color).map_err(tied)? { + Some(Some(_)) => {} + Some(None) => { + let gap = Feature::ExtendedRangeBlend(ExtendedRangeBlend::Output); + return Err(tied(Unsupported::not_implemented(gap).into())); + } + None => { + let invalid = DescriptorError::ColorAttachment { index: color }; + return Err(Error::InvalidDescriptor(invalid)); + } } } if blend.reads_constant() { diff --git a/crates/metal2vulkan/src/lower/fragment/mod.rs b/crates/metal2vulkan/src/lower/fragment/mod.rs index d5097c048..d7b079dc3 100644 --- a/crates/metal2vulkan/src/lower/fragment/mod.rs +++ b/crates/metal2vulkan/src/lower/fragment/mod.rs @@ -611,8 +611,8 @@ pub fn writes_through_storage(cx: &SelectCx<'_>, color: u32) -> bool { } /// Whether the function writes color attachment `color` in the storage form under Metal's -/// 16-bit float or 8-bit unorm blend, which the shader computes, and that blend is Metal's -/// exactly: the attachment stores Metal's value. +/// 16-bit float, 8-bit unorm or 8-bit sRGB blend, which the shader computes, and that blend is +/// Metal's exactly: the attachment stores Metal's value. pub fn blends_half_in_storage(cx: &SelectCx<'_>, color: u32) -> bool { fetch::blends_in_shader(cx, color, true) } @@ -631,9 +631,10 @@ pub fn blends_sixteen_in_storage(cx: &SelectCx<'_>, color: u32) -> bool { } /// Whether the function writes color attachment `color` in the storage form under a blend the -/// shader computes of a format held directly (Metal's 16-bit float or 8-bit unorm blend), exactly -/// or not: the write stores the value the blend gives, which no conversion of the device's -/// changes (an 8-bit unorm channel's code is rounded by Metal's rule in the shader). +/// shader computes of a format held directly (Metal's 16-bit float, 8-bit unorm or 8-bit sRGB +/// blend), exactly or not: the write stores the value the blend gives, which no conversion of the +/// device's changes (an 8-bit unorm channel's code is rounded by Metal's rule in the shader, an +/// sRGB one's encoded by Metal's table). pub fn blends_in_storage(cx: &SelectCx<'_>, color: u32) -> bool { fetch::blends_in_shader(cx, color, false) } diff --git a/crates/metal2vulkan/src/pipeline/artifact.rs b/crates/metal2vulkan/src/pipeline/artifact.rs index 5f6826986..00deb822b 100644 --- a/crates/metal2vulkan/src/pipeline/artifact.rs +++ b/crates/metal2vulkan/src/pipeline/artifact.rs @@ -1765,8 +1765,8 @@ pub enum PrecisionNote { /// normalized, 10-bit, packed float or `A8Unorm` format, among others), an 8-bit unorm one /// written by an output of fewer than four lanes, and a 16-bit float or 8-bit unorm one under a /// blend of the second source or beside a second (index 1) output. No Vulkan blend applies to - /// a storage write, - /// so the shader computes the pipeline's blend itself: in `float`, each factor, product and sum + /// a storage write, so the shader computes the pipeline's blend itself: in `float`, each + /// factor, product and sum /// rounded to nearest even, a factor of zero keeping its product, the source and the blend /// color clamped first to a normalized format's range (`[0, 1]`, `[-1, 1]`; a NaN to its low /// end) as Vulkan's blend clamps them, an output's missing lane zero, the result stored through @@ -1775,7 +1775,12 @@ pub enum PrecisionNote { /// that fuses a product within that product's rounding, and one of a format of fewer bits than /// a `float` within the format's own rounding of the result where Metal's arithmetic is at /// least as fine. A factor of the second source reads the function's second output, clamped as - /// the source. Validation derives no tolerance from it. + /// the source. An 8-bit sRGB attachment (`RGBA8Unorm_sRGB`, `BGRA8Unorm_sRGB`) under a blend of + /// the second source, in a module compiled with fast math, records it too: there the shader + /// computes Metal's 8-bit unorm blend's rounded forms over the decoded texel, in the output's + /// type, and stores the result by Metal's sRGB encode (`extended_range::Blend::srgb8`), which + /// is Metal's without fast math; under fast math Metal regroups the blend, unmeasured. + /// Validation derives no tolerance from it. UnmeasuredFetchBlend, } diff --git a/crates/metal2vulkan/src/pipeline/lower_inputs.rs b/crates/metal2vulkan/src/pipeline/lower_inputs.rs index e839e72c9..efc8d82eb 100644 --- a/crates/metal2vulkan/src/pipeline/lower_inputs.rs +++ b/crates/metal2vulkan/src/pipeline/lower_inputs.rs @@ -1366,6 +1366,28 @@ impl BlendEquation { alpha_operation: c.alpha_blend_operation, }) } + + /// Whether a factor reads the fragment's second output (`[[color(n), index(1)]]`): dual-source + /// blending. + pub(crate) fn reads_second_source(&self) -> bool { + use metal::BlendFactor as F; + [ + self.source_rgb, + self.destination_rgb, + self.source_alpha, + self.destination_alpha, + ] + .into_iter() + .any(|f| { + matches!( + f, + F::Source1Color + | F::OneMinusSource1Color + | F::Source1Alpha + | F::OneMinusSource1Alpha + ) + }) + } } impl LoweringInputs { diff --git a/crates/metal2vulkan/src/tests/engine_fetch_blend8.rs b/crates/metal2vulkan/src/tests/engine_fetch_blend8.rs index 99d461331..f56729292 100644 --- a/crates/metal2vulkan/src/tests/engine_fetch_blend8.rs +++ b/crates/metal2vulkan/src/tests/engine_fetch_blend8.rs @@ -17,7 +17,8 @@ //! subpass, its stages passing L3. Before the shader computed the //! blend, each was refused `NotImplemented(FramebufferFetch)` at color 0. Other blends (the blend //! color's among them) and write masks that keep channels compile the same way; a blend that reads -//! the second source is refused `NotImplemented(ExtendedRangeBlend(DualSource))`. No GPU is used. +//! the second source of a function that writes none is refused as Metal refuses its pipeline +//! (`InvalidDescriptor(ColorAttachment)`). No GPU is used. //! //! `llvm-as` assembles the fixtures; a missing tool skips visibly. @@ -25,7 +26,7 @@ use std::path::Path; use crate::budget::Budget; use crate::device::{Device, DeviceDescription, DevicePolicy, DeviceProfile}; -use crate::error::{Attachment, Error, ExtendedRangeBlend, Feature, Needs}; +use crate::error::{DescriptorError, Error, Needs}; use crate::library::{FunctionArtifact, Library}; use crate::metal::{BlendFactor, BlendOperation, ColorWriteMask, PixelFormat}; use crate::pipeline::artifact::PrecisionNote; @@ -246,6 +247,89 @@ fn a_blended_eight_bit_unorm_fetch_computes_metals_blend() { assert!(anv, "no ANV profile compiled the guest's shape"); } +/// A blended 8-bit four-channel sRGB attachment (`RGBA8Unorm_sRGB`, `BGRA8Unorm_sRGB`): on every +/// committed profile that orders fetch through the pixel interlock alone, each function compiles +/// in the storage form through the format's `R32_UINT` view with the blend it computes (Metal's +/// 8-bit unorm blend over the decoded texel, encoded: `extended_range::Blend::srgb8`), rounded +/// without fast math, and announces nothing, a write mask that keeps channels and the blend color +/// too; and its module passes L3. Before, each was refused `NotImplemented(FramebufferFetch)`. +/// The second source's blend (the owned fixture `engine/fbl_fetch_dual`, fast math), which Metal's +/// 8-bit unorm blend does not build, takes its rounded forms, noted `UnmeasuredFetchBlend`. +#[test] +fn a_blended_four_channel_srgb_fetch_computes_metals_blend() { + let (Some(fast), Some(safe), Some(dual)) = ( + assembled("fbl_fetch_blend8"), + assembled("fbl_fetch_blend8_safe"), + assembled("fbl_fetch_dual"), + ) else { + return; + }; + use BlendFactor as F; + let entries = [ + (&fast, "fbl8_over_loaded", false), + (&fast, "fbl8_over_loaded_float", false), + (&safe, "fbl8_safe_loaded", true), + (&safe, "fbl8_safe_loaded_float", true), + ]; + let lerp = BlendEquation { + source_rgb: F::BlendColor, + destination_rgb: F::OneMinusBlendColor, + ..OVER + }; + let states = [ + (OVER, ColorWriteMask::ALL), + (OVER, ColorWriteMask::RED.union(ColorWriteMask::ALPHA)), + (lerp, ColorWriteMask::ALL), + ]; + let second = BlendEquation { + source_rgb: F::Source1Color, + destination_rgb: F::OneMinusSource1Color, + source_alpha: F::Source1Alpha, + destination_alpha: F::OneMinusSource1Alpha, + ..OVER + }; + let mut checked = 0; + for (stem, p) in committed_profiles().expect("profiles") { + if !crate::lower::fragment::interlock_orders(&p) { + continue; + } + for pf in [PixelFormat::RGBA8UnormSRGB, PixelFormat::BGRA8UnormSRGB] { + for (eq, mask) in states { + let inputs = state(&p, pf, eq, mask); + for &(bc, entry, rounded) in &entries { + let what = format!("{stem} {pf:?} {eq:?} {mask:?} {entry}"); + let a = compile_with(bc, entry, &p, &inputs) + .unwrap_or_else(|e| panic!("{what}: {e}")); + assert_eq!(fetched(&a), Some((true, Some(eq), rounded)), "{what}"); + for note in NOTES + .into_iter() + .chain([PrecisionNote::UnmeasuredFetchBlend]) + { + assert!(!a.precision.contains(¬e), "{what}: {:?}", a.precision); + } + link_and_validate(&a, &p).unwrap_or_else(|e| panic!("{what}: L3: {e}")); + checked += 1; + } + } + let inputs = state(&p, pf, second, ColorWriteMask::ALL); + for entry in ["fbd_dual_half", "fbd_dual_float"] { + let what = format!("{stem} {pf:?} {entry}"); + let a = compile_with(&dual, entry, &p, &inputs) + .unwrap_or_else(|e| panic!("{what}: {e}")); + assert_eq!(fetched(&a), Some((true, Some(second), false)), "{what}"); + assert!( + a.precision.contains(&PrecisionNote::UnmeasuredFetchBlend), + "{what}: {:?}", + a.precision + ); + link_and_validate(&a, &p).unwrap_or_else(|e| panic!("{what}: L3: {e}")); + checked += 1; + } + } + } + assert!(checked > 0, "no interlock profile took the storage form"); +} + /// Other blends and write masks of an 8-bit unorm attachment: on every committed profile that /// orders fetch through the pixel interlock alone, each compiles in the storage form with the /// blend it computes, rounded without fast math, and announces nothing; one reading the blend @@ -354,11 +438,13 @@ fn another_eight_bit_unorm_blend_or_mask_computes_metals_blend() { assert!(checked > 0, "no interlock profile took the storage form"); } -/// A blend of an 8-bit unorm attachment that reads the second source is not measured, nor built -/// generically: on every committed profile that orders fetch through the pixel interlock alone it -/// is refused `NotImplemented(ExtendedRangeBlend(DualSource))` at color 0. +/// A blend of an 8-bit unorm attachment that reads the second source, of a function that writes no +/// second output: Metal refuses the pipeline ("Fragment shader does not write to render target +/// color(0), index(1) that is required for blending", plain Metal on the M3 Max under macOS +/// 27.0.1), and on every committed profile that orders fetch through the pixel interlock alone it +/// is refused so, `InvalidDescriptor(ColorAttachment)` of color 0. #[test] -fn an_eight_bit_unorm_second_source_blend_stays_refused() { +fn a_second_source_blend_without_its_output_is_refused_as_metal_refuses_it() { let Some(fast) = assembled("fbl_fetch_blend8") else { return; }; @@ -382,14 +468,7 @@ fn an_eight_bit_unorm_second_source_blend_stays_refused() { let inputs = state(&p, PixelFormat::BGRA8Unorm, eq, ColorWriteMask::ALL); let what = format!("{stem} {eq:?}"); match compile_with(&fast, "fbl8_over_loaded", &p, &inputs) { - Err(Error::Unsupported(u)) if u.needs == Needs::NotImplemented => { - let dual = Feature::ExtendedRangeBlend(ExtendedRangeBlend::DualSource); - assert_eq!(u.feature, dual, "{what}"); - assert_eq!( - u.location.as_ref().and_then(|at| at.attachment()), - Some(Attachment::Color(0)), - "{what}" - ); + Err(Error::InvalidDescriptor(DescriptorError::ColorAttachment { index: 0 })) => { checked += 1; } Err(e) if device_gap(&e) => eprintln!("{what}: {e}"), diff --git a/crates/metal2vulkan/src/tests/engine_fetch_generic_blend.rs b/crates/metal2vulkan/src/tests/engine_fetch_generic_blend.rs index 1adb3ef25..06c2b6e61 100644 --- a/crates/metal2vulkan/src/tests/engine_fetch_generic_blend.rs +++ b/crates/metal2vulkan/src/tests/engine_fetch_generic_blend.rs @@ -16,8 +16,8 @@ //! carrying the note. Before, each was refused `NotImplemented(FramebufferFetch)` at its color. //! A blend that reads the second source, or any blend beside a second (index 1) output (the owned //! fixture `engine/fbl_fetch_dual`), takes the generic blend too, a 16-bit float and an 8-bit -//! unorm attachment's among them; one of a function that writes no second output stays refused, -//! `NotImplemented(ExtendedRangeBlend(DualSource))`. No GPU is used. +//! unorm attachment's among them; one of a function that writes no second output is refused as +//! Metal refuses its pipeline, `InvalidDescriptor(ColorAttachment)`. No GPU is used. //! //! `llvm-as` assembles the fixtures; a missing tool skips visibly. @@ -26,7 +26,7 @@ use std::sync::Arc; use crate::budget::Budget; use crate::device::{Device, DeviceDescription, DevicePolicy, DeviceProfile}; -use crate::error::{Attachment, Error, ExtendedRangeBlend, Feature, Needs}; +use crate::error::{DescriptorError, Error, Needs}; use crate::library::{FunctionArtifact, Library}; use crate::metal::{BlendFactor, BlendOperation, ColorWriteMask, PixelFormat}; use crate::pipeline::artifact::PrecisionNote; @@ -434,10 +434,13 @@ fn a_second_source_blend_takes_the_generic_blend() { assert!(checked > 0, "no interlock profile took the storage form"); } -/// A blend of the second source of a function that writes no second output: refused -/// `NotImplemented(ExtendedRangeBlend(DualSource))` at color 0, whatever the format. +/// A blend of the second source of a function that writes no second output: Metal refuses the +/// pipeline ("Fragment shader does not write to render target color(0), index(1) that is required +/// for blending", plain Metal on the M3 Max under macOS 27.0.1, a fetching function and a plain +/// one, `half4` and `float4`), and so is it refused, `InvalidDescriptor(ColorAttachment)` of color +/// 0, whatever the format. #[test] -fn a_second_source_blend_without_its_output_stays_refused() { +fn a_second_source_blend_without_its_output_is_refused_as_metal_refuses_it() { let Some(fast) = assembled("fbl_fetch_blend8", false) else { return; }; @@ -475,17 +478,7 @@ fn a_second_source_blend_without_its_output_stays_refused() { let inputs = state(0, &r, &p); let what = format!("{stem} {pf:?} {eq:?}"); match compile_with(&fast, "fbl8_over_loaded", &p, &inputs) { - Err(Error::Unsupported(u)) if u.needs == Needs::NotImplemented => { - assert_eq!( - u.feature, - Feature::ExtendedRangeBlend(ExtendedRangeBlend::DualSource), - "{what}" - ); - assert_eq!( - u.location.as_ref().and_then(|at| at.attachment()), - Some(Attachment::Color(0)), - "{what}" - ); + Err(Error::InvalidDescriptor(DescriptorError::ColorAttachment { index: 0 })) => { checked += 1; } Err(Error::Unsupported(u)) => eprintln!("{what}: {u}"), diff --git a/crates/metal2vulkan/src/tests/engine_fragment.rs b/crates/metal2vulkan/src/tests/engine_fragment.rs index b5bfb458c..d77ae1c2a 100644 --- a/crates/metal2vulkan/src/tests/engine_fragment.rs +++ b/crates/metal2vulkan/src/tests/engine_fragment.rs @@ -2449,7 +2449,8 @@ fn a_premultiplied_blend_into_an_extended_range_attachment_is_computed_in_the_sh /// color and alpha: color 0 a written storage attachment, the fact naming the blend and its rounded /// math, and no dual-source output (`dualSrcBlend` not required); under a write mask of no channel /// it is made too, the second output stored nowhere. Under fast math the same pipeline is refused -/// `DualSource`, and so is the blend of a function without fast math that writes no second output. +/// `DualSource`; the blend of a function that writes no second output is refused as Metal refuses +/// its pipeline, `InvalidDescriptor(ColorAttachment)`. /// Into each of the six extended-range formats, unblended (the raw texel through the interface) or /// blended premultiplied over (the storage form's blend, which reads no second source), with and /// without fast math, the function's two outputs make the pipeline, the second stored nowhere: no @@ -2584,7 +2585,9 @@ fn a_second_source_blend_without_fast_math_reads_the_second_output() { ), } match pipeline(&safe, "stage_io_fragment_point") { - Err(Error::Unsupported(u)) if dual_source(&u) => {} + Err(Error::InvalidDescriptor(crate::error::DescriptorError::ColorAttachment { + index: 0, + })) => {} r => panic!("{stem}: no second output: {:?}", r.map(|_| ())), } // A second output no blend reads, into each extended-range format: stored nowhere. diff --git a/docs/API.md b/docs/API.md index 3310924be..b6f46c2f8 100644 --- a/docs/API.md +++ b/docs/API.md @@ -2516,7 +2516,12 @@ fast forms record, and each `PrecisionNote`'s rustdoc states its bound. the source and the blend color clamped first to a normalized format's range (a NaN to its low end), an output's missing lane zero, and the result stored through the device's conversion. Metal's blend arithmetic for these formats is not measured, so the bound is not known. A factor - of the second source reads the function's second output, clamped as the source. + of the second source reads the function's second output, clamped as the source. An 8-bit sRGB + attachment (`RGBA8Unorm_sRGB`, `BGRA8Unorm_sRGB`) under a blend of the second source, in a + module compiled with fast math, announces it too: the shader computes Metal's 8-bit unorm + blend's rounded forms over the decoded texel, in the output's type, and stores the result by + Metal's sRGB encode, Metal's without fast math; under fast math Metal regroups the blend, + unmeasured. - `metal2vulkan-degrade-fp8-value` (precision). `PrecisionNote::Fp8Value`: An 8-bit float converts to an integer from the format's documented value with Metal's saturating float-to-integer rule, where Metal's device here answers otherwise: Metal on Apple M3 compiles these reads but extends diff --git a/docs/FAST-PATHS.md b/docs/FAST-PATHS.md index efb00ae71..518ed9856 100644 --- a/docs/FAST-PATHS.md +++ b/docs/FAST-PATHS.md @@ -72,7 +72,7 @@ known. The rest of the differences are docs/API.md section 9's precision notes. | Signed zeros, infinities and NaNs where the device lacks `SignedZeroInfNanPreserve` at the operation's width. | A device capability. | `DeviceSignedZeroInfNan` (`device-signed-zero-inf-nan`) | | Every device but MoltenVK interpolates varyings by its own rounding, up to about `1.5e-4` from Metal's (`3e-4` on lavapipe). MoltenVK hands the varyings to Metal. | The exact path needs Metal's interpolation formula, which is not known. | `DeviceInterpolation` (`device-interpolation`) | | A fast-math function's `half` color into a blend: within three `half` ulps (16-bit float) or two `float` ulps (32-bit float). A fetched 16-bit float attachment's blend, computed in the pixel interlock, where Metal folds the output's own arithmetic into it or regroups it: within 2 `half` ulps at the operands' magnitude, 16 at the stored value's under cancellation; exact elsewhere. | Metal's compiler regroups the blend per pipeline, following its passes over the whole function; no form the function and the blend state decide is Metal's. | `HalfOutputFastMathBlend` (`half-output-fast-math-blend`) | -| A fetched blended attachment of a format whose Metal blend arithmetic is not built (32-bit float, 16-bit normalized, 8-bit signed normalized, 10-bit, packed float, `A8Unorm`; an 8-bit unorm one through fewer than four output lanes; a 16-bit float or 8-bit unorm one under a blend of the second source), on a device that orders fetch only through the pixel interlock (MoltenVK, RADV, ANV): the shader blends in `float`, each step rounded, the source and blend color clamped to a normalized format's range, the device's conversion storing the result. Bound not measured. | No Vulkan blend applies to the interlock's storage write, and Metal's blend arithmetic for these formats is not measured, so no exact form is known. | `UnmeasuredFetchBlend` (`unmeasured-fetch-blend`) | +| A fetched blended attachment of a format whose Metal blend arithmetic is not built (32-bit float, 16-bit normalized, 8-bit signed normalized, 10-bit, packed float, `A8Unorm`; an 8-bit unorm one through fewer than four output lanes; a 16-bit float or 8-bit unorm one under a blend of the second source), on a device that orders fetch only through the pixel interlock (MoltenVK, RADV, ANV): the shader blends in `float`, each step rounded, the source and blend color clamped to a normalized format's range, the device's conversion storing the result. A four-channel 8-bit sRGB one under a blend of the second source in a fast-math module: the 8-bit unorm blend's rounded forms over the decoded texel, encoded by Metal's table (Metal's without fast math). Bound not measured. | No Vulkan blend applies to the interlock's storage write, and Metal's blend arithmetic for these formats is not measured, so no exact form is known. | `UnmeasuredFetchBlend` (`unmeasured-fetch-blend`) | | Float simdgroup reductions sum in the device's association order. | Apple's order is not modelled. | `ReductionOrder` (`reduction-order`) | | A vertex or fragment function keeps more than 16 KiB a thread of private memory, up to the 192 KiB Metal holds, on a device whose Function storage was not measured: it runs on the driver's scratch, which past what the driver holds answers wrongly or hangs the GPU with no error. | Vulkan states no amount of Function storage; only a measurement of the device does. No other form is exact: a fragment function's helper invocations may not write the memory it would move to, and a vertex function's, a compute pre-pass, is not built. | `FunctionStorageAssumed` (`function-storage-assumed`) | | A render pipeline of more color attachments than the device draws at once (the lesser of `maxColorAttachments` and `maxFragmentOutputAttachments`, four at Vulkan's floor; Metal takes eight) draws each draw once per group of that many, each group in a render pass of its own over a twin of the pass's depth and stencil. Every variant's vertex stage is one module, `Position` invariant, and every fragment variant's `FragDepth`, `SampleMask` and `FragStencilRefEXT` are `Invariant`; groups past the first may differ at discard or depth edges if the driver compiles the variants differently. | The device holds no more attachments in one subpass. Vulkan's invariance rules make only identical pipelines repeat exactly, and the groups' fragment modules and attachments differ. | `ColorAttachmentGroups` (`color-attachment-groups`) | @@ -538,11 +538,12 @@ driver's. Each is open work. Vulkan blend applies to the storage form's write, so the function computes the blend: Metal's for an extended-range or 16-bit float attachment, and for an 8-bit unorm one (`R8Unorm`, `RG8Unorm`, `RGBA8Unorm`, `BGRA8Unorm`) of a four-lane output under any factor, operation, - write mask and blend color; the generic `float` blend, announced (`UnmeasuredFetchBlend`, the - row above), for every other format whose channels read as floats and for a blend of the second - source. Refused: a blend into an 8-bit `_sRGB` format (`FramebufferFetch`, `NotImplemented`), - and a blend of the second source by a function that writes no second output (`ExtendedRangeBlend`, - `DualSource`). A source-over survey on the M3 fits the 8-bit model to + write mask and blend color, and for a four-channel 8-bit sRGB one (`RGBA8Unorm_sRGB`, + `BGRA8Unorm_sRGB`) the same blend over the decoded texel, encoded by Metal's table; the generic + `float` blend, announced (`UnmeasuredFetchBlend`, the row above), for every other format whose + channels read as floats and for a blend of the second source (an sRGB one's in the 8-bit unorm + blend's rounded forms). Refused: a one- or two-channel 8-bit sRGB attachment's fetch + (`FramebufferFetch`, `NotImplemented`). A source-over survey on the M3 fits the 8-bit model to the 10-bit unorm and 8-bit snorm formats (with their clamps), and shows the 16-bit norms and `RGBA32Float` blending in `float` even for a `half4` output; their factor sets are not measured, so their exact forms are not built. diff --git a/docs/REFUSALS.md b/docs/REFUSALS.md index 366c4d2a0..fff6b54c8 100644 --- a/docs/REFUSALS.md +++ b/docs/REFUSALS.md @@ -14,14 +14,14 @@ 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 `b2cb69266`. +Generated at `935b4bb9a`. ## 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 | -| Runtime gaps | 66 | 66 | 1 | 8 | 43 | 14 | 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 | | Translation caps | 14 | 14 | 0 | 0 | 7 | 7 | 0 | @@ -48,7 +48,7 @@ Generated at `b2cb69266`. | `SimdWidth` | Simdgroup width 32 is not achievable for this usage, stage, and device | devices without VkProperty::MetalFragmentSimdgroups; devices without a capability the site computes (`width_needs(stage, st)`) | 2: `crates/metal2vulkan/src/device/subgroup.rs:377`, `crates/metal2vulkan/src/lower/simd/mod.rs:382` | `app`: simdgroup functions on a device whose subgroups cannot run 32 wide for the use | | `LocalSize` | A local size beyond a device limit on this axis (`None` | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/bind/dispatch.rs:475` | `app`: a threadgroup size past a smaller device's limit | | `IrreducibleConvergent` | An irreducible region containing a convergent instruction | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/structurize/irreducible.rs:108` | `rare`: irreducible loops around barriers or simd operations | -| `ComputeDerivativesWithSimd` | Compute derivatives in a flattened simd tier | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/lower/dispatch.rs:476` | `rare`: derivatives in a kernel | +| `ComputeDerivativesWithSimd` | Compute derivatives in a flattened simd tier | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/lower/dispatch.rs:472` | `rare`: derivatives in a kernel | | `ComputeDerivatives` | Derivatives outside fragment without compute-derivative support | devices without VkFeature::ComputeDerivativeGroupLinear; every device (no Vulkan mechanism); every device (not implemented) | 4: `crates/metal2vulkan/src/bind/dispatch.rs:320`, `crates/metal2vulkan/src/lower/sync/barrier.rs:486` (+2) | `rare`: derivatives in a kernel | | `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 | @@ -64,8 +64,8 @@ Generated at `b2cb69266`. | `CoherentMemory` | `coherent(device)` accesses (Vulkan memory model) | devices short of a Vulkan feature the site names | 1: `crates/metal2vulkan/src/lower/sync/memory_model.rs:207` | `rare`: coherent(device) accesses | | `Int64Atomics` | 64-bit atomics | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`) | 2: `crates/metal2vulkan/src/lower/access/atomic.rs:624`, `crates/metal2vulkan/src/lower/access/atomic.rs:633` | `rare`: 64-bit atomics | | `ImageAtomics` | Image atomics beyond 32-bit integers | devices without a capability the site computes (`gaps`); every device (no Vulkan mechanism) | 3: `crates/metal2vulkan-runtime/src/families/formats.rs:464`, `crates/metal2vulkan-runtime/src/families/formats.rs:468` (+1) | `rare`: texture atomics beyond 32-bit integers | -| `DescriptorCount` | Too many descriptors of one kind in a stage or pipeline | devices short of a device limit the site names; devices without VkLimit::MaxUniformBufferRange | 3: `crates/metal2vulkan/src/lower/access/mod.rs:1688`, `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:3772` (+5) | `app`: a buffer window past a device's descriptor range | +| `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:3658` (+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) | @@ -82,31 +82,31 @@ Generated at `b2cb69266`. | `SamplerLodBias` | Sampler LOD bias | devices short of a Vulkan feature the site names; devices without VkLimit::MaxSamplerLodBias; every device (no Vulkan mechanism) | 3: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:258`, `crates/metal2vulkan/src/lower/sampler/constexpr.rs:265` (+1) | `app`: constexpr samplers with an LOD bias | | `SamplerCompare` | Sampler compare functions outside what Vulkan allows for the image | devices short of a Vulkan feature the site names | 1: `crates/metal2vulkan/src/metal/sampler.rs:260` | `app`: compare samplers a device cannot apply to the image | | `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:882`, `crates/metal2vulkan/src/bind/instantiate.rs:888` (+1) | `app`: texture buffers past a device's texel-buffer limits | +| `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:5897` (+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) | +| `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) | 24: `crates/metal2vulkan-runtime/src/families/features.rs:1018`, `crates/metal2vulkan-runtime/src/render.rs:5894` (+22) | `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:4113`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312` (+3) | `rare`: vertex amplification | +| `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:3999`, `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:956`, `crates/metal2vulkan/src/lower/mesh/mod.rs:964` | `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:2719` (+4) | `rare`: stencil from the shader | +| `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:2685` (+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:1630`, `crates/metal2vulkan/src/bind/graphics.rs:3095` (+5) | `rare`: mesh pipelines | +| `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:1604`, `crates/metal2vulkan/src/bind/graphics.rs:3058` (+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) | | `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 | -| `RasterizationRateMap` | | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/fragment/mod.rs:930` | `rare`: rasterization rate maps | +| `RasterizationRateMap` | | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/fragment/mod.rs:931` | `rare`: rasterization rate maps | | `GpuEncodedIndirectCommands` | | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism); every device (not implemented) | 17: `crates/metal2vulkan/src/bind/replay.rs:556`, `crates/metal2vulkan/src/bind/replay.rs:796` (+15) | `rare`: indirect command buffers encoded by a kernel | -| `VulkanVersion` | The device's Vulkan version is below the 1.2 floor | devices without ApiVersion::V1_2 | 2: `crates/metal2vulkan/src/ash_interop/query.rs:927`, `crates/metal2vulkan/src/device/derive.rs:105` | `none`: a device below Vulkan 1.2 | +| `VulkanVersion` | The device's Vulkan version is below the 1.2 floor | devices without ApiVersion::V1_2 | 2: `crates/metal2vulkan/src/ash_interop/query.rs:926`, `crates/metal2vulkan/src/device/derive.rs:105` | `none`: a device below Vulkan 1.2 | | `Constant` | A bitcode constant record outside the typed model (block address, inline asm, `select` and other constant expressions the IR has no form for) | - | via a helper: 3: `crates/metal2vulkan-air/src/bitcode/constants.rs:210`, `crates/metal2vulkan-air/src/bitcode/constants.rs:268` (+1) | `none`: LLVM constant forms AIR does not emit | | `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 | @@ -122,7 +122,7 @@ Generated at `b2cb69266`. | `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:2176`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:1017` | `rare`: per-attachment blending on a device without independentBlend | +| `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:2173`, `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 | @@ -131,29 +131,29 @@ Generated at `b2cb69266`. | `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) | 8: `crates/metal2vulkan-runtime/src/binding_view.rs:156`, `crates/metal2vulkan-runtime/src/texture.rs:5150` (+6) | `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:998` (+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:1890`, `crates/metal2vulkan-runtime/src/mipmap_pick.rs:37` (+5) | `app`: generateMipmapsForTexture: where the device's filter is not Metal's | +| `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 | +| `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:1850`, `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:2876` | `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:2783` | `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:573` | `app`: a view of another component layout on a portability subset (MoltenVK) | +| `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 | | `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:473` | `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:469` | `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:632` | `app`: textures in Shared heaps on a device whose optimal images take no host memory | +| `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:630` | `app`: textures in Shared heaps on a device whose optimal images take no host memory | | `ViewportDepthRange` | A viewport depth range past `[0, 1]` (`setViewport:`), which Metal takes and the runtime draws natively (`VK_EXT_depth_range_unrestricted`) or... | drivers with a defect | 1: `crates/metal2vulkan-runtime/src/render_state.rs:1216` | `rare`: viewport depth outside [0, 1] | | `UndeclaredTextureUsage` | A shader write to a texture made without `ShaderWrite` (or `ShaderAtomic`), or a read of one made without `ShaderRead`, which plain Metal runs,... | every device (not implemented) | 2: `crates/metal2vulkan-runtime/src/binding_view.rs:141`, `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:72` | `app`: a shader write to a texture made without ShaderWrite, which plain Metal runs | | `RenderTargetSize` | A render pass whose render area or layers are past the device's framebuffer limits (`Capability::Limit` names `MaxFramebufferWidth`,... | devices short of a device limit the site names | 1: `crates/metal2vulkan-runtime/src/render_pass.rs:1271` | `rare`: a render area past a device's framebuffer limits | | `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) | 6: `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:305`, `crates/metal2vulkan/src/lower/fragment/fetch.rs:1578` (+4) | `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 | +| `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:1634` (+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 | | `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 | @@ -165,20 +165,20 @@ Generated at `b2cb69266`. |---|---|---|---|---| | `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:465`, `crates/metal2vulkan-runtime/src/texture.rs:1683` (+1) | `rare`: sparse heaps | +| `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 | | `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:1073` | `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:1512`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1519` (+3) | `app`: a heap texture the heap's memory type does not take | +| `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:1071` | `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:1510`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1517` (+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:523` | `none`: an ICB past one buffer | -| `IndirectRenderCommands` | What indirect command buffers lack of their render commands | every device (runtime piece not built) | 15: `crates/metal2vulkan-runtime/src/compute.rs:1291`, `crates/metal2vulkan-runtime/src/compute.rs:1376` (+13) | `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:3397` | `none`: an imageblock side past 65535 | +| `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 | +| `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) | -| `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:1166` | `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:1157` | `none`: device creation with an extension under an unknown name | +| `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) | | `TexelsPastBufferLength` | A 2D array over a buffer whose texels run past the buffer's length, which Metal makes over bytes its buffer's allocation has past the length | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/buffer_texture.rs:261`, `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105` | `rare`: a 2D array over a buffer past its length | | `OverlappingSurfaceRows` | A texture of an IOSurface plane (`Buffer::new_texture_with_iosurface_plane`, the stand-in for `newTextureWithDescriptor:iosurface:plane:`) whose... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/buffer_texture.rs:263` | `rare`: an IOSurface plane whose rows overlap | @@ -187,12 +187,12 @@ Generated at `b2cb69266`. | `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:6620` | `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:3305` (+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:6617` | `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:3302` (+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:7353`, `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:7345`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796` (+1) | `rare`: explicit imageblocks shared by tile and fragment functions | +| `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:7350`, `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:7342`, `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:1487`, `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:1469`, `crates/metal2vulkan-runtime/src/families/limits.rs:1019` | `app`: residency sets (missing API) | @@ -204,54 +204,55 @@ Generated at `b2cb69266`. | `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:1467` | `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:1468` | `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:1472` | `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:396` | `rare`: draws in rate-mapped passes the region path does not draw | +| `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:1340` | `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:2743` (+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:5795` | `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:1691`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1375` | `app`: an ASTC texture in a heap on a device without ASTC | +| `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:1305` | `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:2726` (+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:5775` | `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:1373` | `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:8029`, `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:7937`, `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 | | `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:8039` | `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:1669`, `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 | +| `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:7947` | `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:1634`, `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 | | `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:4938` | `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:4924` | `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) | -| `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:536`, `crates/metal2vulkan-runtime/src/blit_texture.rs:693` | `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:1029` | `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 | +| `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 | +| `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 | ## 3. Apple-only calls (`Error::AppleOnly`) | 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:2414`, `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126` (+1) | `none`: Apple-private (no public header) | +| `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:320` | `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) | | `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`) | Variant | What it blocks | Where | Sites | Reach | |---|---|---|---|---| -| `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:655` | `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:894` | `rare`: a texture buffer past maxTexelBufferElements | +| `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:3767` | `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:3811` | `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:3849` | `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:3653` | `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:3697` | `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:3735` | `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:609` | `rare`: Profile F's uniform-view fallback aliased by a write | +| `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 | ## 5. Translation caps (`Error::LimitExceeded(Limit)`) @@ -277,11 +278,11 @@ Generated at `b2cb69266`. | Variant | What it blocks | Where | Sites | Reach | |---|---|---|---|---| -| `ScreenExtent` | A screen extent above 16384 | every device (this crate's bound: Apple's compile unmeasured or crashing there) | 2: `crates/metal2vulkan-runtime/src/rate_map.rs:431`, `crates/metal2vulkan/src/bind/rate_map.rs:524` | `rare`: a rate map whose screen is past 16384 a side | -| `LayerCount` | More than two layers | every device (this crate's bound: Apple's compile unmeasured or crashing there) | 1: `crates/metal2vulkan/src/bind/rate_map.rs:528` | `none`: a rate map of more than two layers, which Apple's compile crashes on | -| `DenseSamples` | An axis with more quality samples than its screen extent plus one | every device (this crate's bound: Apple's compile unmeasured or crashing there) | 1: `crates/metal2vulkan/src/bind/rate_map.rs:539` | `rare`: a rate map axis with more quality samples than screen pixels | -| `SampleOutOfRange` | A sample outside `[0, 1]` (or `NaN`) on an axis of two or more samples | every device (this crate's bound: Apple's compile unmeasured or crashing there) | 1: `crates/metal2vulkan/src/bind/rate_map.rs:547` | `rare`: a rate map quality sample outside [0, 1] among others | -| `SampleCount` | An axis of more samples, not all equal, than the most measured on a map of its layer count, `max` | every device (this crate's bound: Apple's compile unmeasured or crashing there) | 1: `crates/metal2vulkan/src/bind/rate_map.rs:555` | `rare`: a rate map axis of more distinct samples than measured (9 on one layer, 4 on two) | +| `ScreenExtent` | A screen extent above 16384 | every device (this crate's bound: Apple's compile unmeasured or crashing there) | 1: `crates/metal2vulkan/src/bind/rate_map.rs:501` | `rare`: a rate map whose screen is past 16384 a side | +| `LayerCount` | More than two layers | every device (this crate's bound: Apple's compile unmeasured or crashing there) | 1: `crates/metal2vulkan/src/bind/rate_map.rs:505` | `none`: a rate map of more than two layers, which Apple's compile crashes on | +| `DenseSamples` | An axis with more quality samples than its screen extent plus one | every device (this crate's bound: Apple's compile unmeasured or crashing there) | 1: `crates/metal2vulkan/src/bind/rate_map.rs:516` | `rare`: a rate map axis with more quality samples than screen pixels | +| `SampleOutOfRange` | A sample outside `[0, 1]` (or `NaN`) on an axis of two or more samples | every device (this crate's bound: Apple's compile unmeasured or crashing there) | 1: `crates/metal2vulkan/src/bind/rate_map.rs:524` | `rare`: a rate map quality sample outside [0, 1] among others | +| `SampleCount` | An axis of more samples, not all equal, than the most measured on a map of its layer count, `max` | every device (this crate's bound: Apple's compile unmeasured or crashing there) | 1: `crates/metal2vulkan/src/bind/rate_map.rs:532` | `rare`: a rate map axis of more distinct samples than measured (9 on one layer, 4 on two) | ## 7. The translation deadline (`Error::Budget`; the runtime's `Error::Compile(Budget)`) @@ -309,7 +310,7 @@ Each refusal's sites, with the function that builds it. - `feature::SimdWidth`: `crates/metal2vulkan/src/device/subgroup.rs:377 (subgroup_tier)`; `crates/metal2vulkan/src/lower/simd/mod.rs:382 (finish)` - `feature::LocalSize`: `crates/metal2vulkan/src/bind/dispatch.rs:475 (regions)` - `feature::IrreducibleConvergent`: `crates/metal2vulkan/src/structurize/irreducible.rs:108 (refuse_tangled)` -- `feature::ComputeDerivativesWithSimd`: `crates/metal2vulkan/src/lower/dispatch.rs:476 (plan_kernel)` +- `feature::ComputeDerivativesWithSimd`: `crates/metal2vulkan/src/lower/dispatch.rs:472 (plan_kernel)` - `feature::ComputeDerivatives`: `crates/metal2vulkan/src/bind/dispatch.rs:320 (check_local)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:486 (select_derivative)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:495 (select_derivative)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:499 (select_derivative)` - `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)` @@ -325,11 +326,11 @@ Each refusal's sites, with the function that builds it. - `feature::CoherentMemory`: `crates/metal2vulkan/src/lower/sync/memory_model.rs:207 (check)` - `feature::Int64Atomics`: `crates/metal2vulkan/src/lower/access/atomic.rs:624 (select)`; `crates/metal2vulkan/src/lower/access/atomic.rs:633 (select)` - `feature::ImageAtomics`: `crates/metal2vulkan-runtime/src/families/formats.rs:464 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:468 (atomic_gap)`; `crates/metal2vulkan/src/lower/texture/slot.rs:900 (atomic_format)` -- `feature::DescriptorCount`: `crates/metal2vulkan/src/lower/access/mod.rs:1688 (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:3772 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3816 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3854 (patch_binding)`; `crates/metal2vulkan/src/bind/instantiate.rs:661 (bind_buffers)`; `crates/metal2vulkan/src/lower/access/function_table.rs:226 (select)`; `crates/metal2vulkan/src/lower/access/mod.rs:1184 (place_slots)` +- `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:3658 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3702 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3740 (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:2206 (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:1625 (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:2295 (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:303 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:649 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:656 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:2056 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3602 (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:1951 (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:80 (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:121 (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:389 (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:495 (new_render_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs:150 (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs:381 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:394 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:401 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:413 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:423 (check_format)`; `crates/metal2vulkan-runtime/src/ycbcr.rs:291 (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:1202 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1223 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1229 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1235 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1260 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1437 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1873 (select_read)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1979 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2006 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2025 (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:2366 (select)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3008 (cross_class)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3180 (select_image)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3350 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3387 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3720 (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:2788 (storage_choice_viewed)`; `crates/metal2vulkan/src/metal/format/mod.rs:2806 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2814 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2911 (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:2150 (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:1625 (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:2292 (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:1949 (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:150 (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:1243 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1264 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1270 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1276 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1301 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1478 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1947 (select_read)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2054 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2081 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2100 (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::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)` @@ -343,31 +344,31 @@ Each refusal's sites, with the function that builds it. - `feature::SamplerLodBias`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:258 (constexpr_desc)`; `crates/metal2vulkan/src/lower/sampler/constexpr.rs:265 (constexpr_desc)`; `crates/metal2vulkan/src/lower/sampler/constexpr.rs:271 (constexpr_desc)` - `feature::SamplerCompare`: `crates/metal2vulkan/src/metal/sampler.rs:260 (check_sampler)` - `feature::PixelSamplerCompare`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:115 (lowered)` -- `feature::TexelBuffer`: `crates/metal2vulkan/src/bind/instantiate.rs:882 (texel_ranges)`; `crates/metal2vulkan/src/bind/instantiate.rs:888 (texel_ranges)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1147 (plain_texture)` +- `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:5897 (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:1218 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1236 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1250 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1293 (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:1087 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1178 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1215 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1827 (plan_sample)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:789 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/fetch.rs:164 (storage_attachments)` +- `feature::FramebufferFetch`: `crates/metal2vulkan-runtime/src/families/features.rs:1018 (state)`; `crates/metal2vulkan-runtime/src/render.rs:5894 (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:1218 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1236 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1250 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1281 (srgb8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1330 (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:1128 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1219 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1256 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1901 (plan_sample)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:821 (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:4113 (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:796 (target_index)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:815 (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:956 (select)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:964 (select)` +- `feature::VertexAmplification`: `crates/metal2vulkan/src/bind/graphics.rs:3999 (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:2719 (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::StencilExport`: `crates/metal2vulkan-runtime/src/families/features.rs:1114 (state)`; `crates/metal2vulkan/src/bind/graphics.rs:2685 (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:3970 (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:1630 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:3095 (mesh_limit)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:517 (check_payload)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:556 (plan_entry)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:590 (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:702 (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:2376 (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:3856 (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:1604 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:3058 (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: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::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:1540 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1566 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1569 (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::VulkanVersion`: `crates/metal2vulkan/src/ash_interop/query.rs:927 (query)`; `crates/metal2vulkan/src/device/derive.rs:105 (with_deviations)` +- `feature::RasterizationRateMap`: `crates/metal2vulkan/src/lower/fragment/mod.rs:931 (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::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)` @@ -375,15 +376,15 @@ Each refusal's sites, with the function that builds it. - `feature::SubgroupOperations`: `crates/metal2vulkan-runtime/src/families/features.rs:1713 (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: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: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:185 (refuse)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3689 (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: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::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:3384 (mesh_draw)`; `crates/metal2vulkan/src/bind/graphics.rs:3437 (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:3272 (mesh_draw)`; `crates/metal2vulkan/src/bind/graphics.rs:3323 (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:2176 (check_pipeline)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1017 (uniform_blend)` +- `feature::IndependentBlending`: `crates/metal2vulkan-runtime/src/render.rs:2173 (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)` @@ -392,50 +393,50 @@ 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:5150 (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/texture/ycbcr_image.rs:302 (luma_view)`; `crates/metal2vulkan-runtime/src/view_plan.rs:434 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:486 (check_view)`; `crates/metal2vulkan-runtime/src/view_plan.rs:508 (check_view)` -- `feature::TextureSwizzle`: `crates/metal2vulkan-runtime/src/binding_view.rs:167 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:998 (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:3415 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3762 (select_write)`; `crates/metal2vulkan/src/lower/texture/slice.rs:307 (select)` -- `feature::MipmapGeneration`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1890 (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::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::MipmapGeneration`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1850 (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:2876 (gpu_times)` +- `feature::GpuTimes`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2783 (gpu_times)` - `feature::CountingVisibility`: `crates/metal2vulkan-runtime/src/visibility.rs:452 (check_mode)` -- `feature::ViewFormatReinterpretation`: `crates/metal2vulkan-runtime/src/view_plan.rs:573 (reinterpretation_refused)` +- `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::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:473 (splits_a_unit)` +- `feature::SparseMapping`: `crates/metal2vulkan-runtime/src/sparse/encoder.rs:469 (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:632 (tiling_refusal)` +- `feature::HeapTextureTiling`: `crates/metal2vulkan-runtime/src/texture/heap.rs:630 (tiling_refusal)` - `feature::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render_state.rs:1216 (depth_ranges_refused)` - `feature::UndeclaredTextureUsage`: `crates/metal2vulkan-runtime/src/binding_view.rs:141 (binding_view)`; `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:72 (refused)` - `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:3445 (alpha_test_refused)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2926 (mode_rounded_write)`; `crates/metal2vulkan/src/pipeline/private_state.rs:115 (refused)`; `crates/metal2vulkan/src/pipeline/private_state.rs:449 (logic_operation)` -- `feature::ExtendedRangeBlend`: `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:305 (refused)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1578 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1581 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1658 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1661 (plan)`; `crates/metal2vulkan/src/lower/fragment/input_blend.rs:153 (plan)` +- `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:1634 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1676 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1733 (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::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:1463 (image_error)`; `crates/metal2vulkan-runtime/src/texture.rs:2230 (storage_over_buffer)`; `crates/metal2vulkan-runtime/src/texture.rs:3050 (new_image_starting)`; `crates/metal2vulkan-runtime/src/texture.rs:4092 (image)`; `crates/metal2vulkan-runtime/src/texture.rs:5723 (host_copy)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:207 (new_surface_planes_texture)` +- `gap::Textures`: `crates/metal2vulkan-runtime/src/blit_texture.rs: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:5703 (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:465 (first_slice)`; `crates/metal2vulkan-runtime/src/texture.rs:1683 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture.rs:4840 (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:1716 (plan_sparse_texture)` +- `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)` - `gap::HeapPastMaxBufferSize`: `crates/metal2vulkan-runtime/src/heap.rs:714 (heap_size)` -- `gap::HeapTextureAlignment`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1073 (check_heap_base)` -- `gap::HeapTextureMemory`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1512 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1519 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2061 (host_heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2293 (memory_shadow)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:556 (memory_refusal)` +- `gap::HeapTextureAlignment`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1071 (check_heap_base)` +- `gap::HeapTextureMemory`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1510 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1517 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2059 (host_heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2291 (memory_shadow)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:554 (memory_refusal)` - `gap::FunctionTablePastMaxBufferLength`: `crates/metal2vulkan-runtime/src/function_table.rs:622 (past_limit)` -- `gap::IndirectCommandBufferPastMaxBufferLength`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:523 (new_indirect_command_buffer)` -- `gap::IndirectRenderCommands`: `crates/metal2vulkan-runtime/src/compute.rs:1291 (execute_range)`; `crates/metal2vulkan-runtime/src/compute.rs:1376 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/depth_stencil.rs:85 (gpu_resource_id)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:4422 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:518 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1632 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:7199 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7734 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8191 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8741 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1126 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2941 (record_forms)`; `crates/metal2vulkan-runtime/src/render/executions.rs:393 (execute_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:461 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:476 (execute_indirect_range)` -- `gap::IndirectImageblockSize`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3397 (set_imageblock_size)` +- `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:7196 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7681 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8098 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8605 (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::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::FeatureEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1166 (of)` -- `gap::ExtensionEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1157 (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:2226 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:5943 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7828 (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::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:2223 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:5940 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7775 (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::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)` @@ -443,12 +444,12 @@ 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:6620 (hidden_depth_stencil)` -- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:91 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3305 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7524 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7638 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7669 (draw_resident)` +- `gap::HiddenDepthStencil`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563 (hidden)`; `crates/metal2vulkan-runtime/src/render.rs:6617 (hidden_depth_stencil)` +- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:91 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3302 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7516 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7585 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7616 (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:7353 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929 (dispatch_tiles_resident)` -- `gap::TileAndFragmentImageblocks`: `crates/metal2vulkan-runtime/src/render.rs:7345 (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::ImageblockMasters`: `crates/metal2vulkan-runtime/src/render.rs:7350 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929 (dispatch_tiles_resident)` +- `gap::TileAndFragmentImageblocks`: `crates/metal2vulkan-runtime/src/render.rs:7342 (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:1487 (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:1469 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1019 (state)` @@ -460,44 +461,45 @@ Each refusal's sites, with the function that builds it. - `gap::ShaderValidation`: `crates/metal2vulkan-runtime/src/families/features.rs:1467 (state)` - `gap::ShaderLogging`: `crates/metal2vulkan-runtime/src/families/features.rs:1468 (state)` - `gap::DeviceNotifications`: `crates/metal2vulkan-runtime/src/families/features.rs:1472 (state)` -- `gap::RateMapRegions`: `crates/metal2vulkan-runtime/src/rate_mapped_pass.rs:396 (refusal)` +- `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:1340 (texture_copies_of_bytes)` -- `gap::RebindTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:637 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2743 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2758 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2769 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2812 (dma_buf_heap_images_again)` -- `gap::PvrtcBlockOrder`: `crates/metal2vulkan-runtime/src/texture.rs:5795 (host_copy)` -- `gap::DecodedHeapTexture`: `crates/metal2vulkan-runtime/src/texture.rs:1691 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1375 (heap_plan)` +- `gap::OverlappingTextureCopies`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1305 (texture_copies_of_bytes)` +- `gap::RebindTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:637 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2726 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2741 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2752 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2795 (dma_buf_heap_images_again)` +- `gap::PvrtcBlockOrder`: `crates/metal2vulkan-runtime/src/texture.rs:5775 (host_copy)` +- `gap::DecodedHeapTexture`: `crates/metal2vulkan-runtime/src/texture.rs:1682 (plan_sparse_texture)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1373 (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:8029 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/restart.rs:72 (gap)` +- `gap::PrivatePrimitives`: `crates/metal2vulkan-runtime/src/render.rs:7937 (draw_resident)`; `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:8039 (draw_resident)` -- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1669 (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:643 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:5108 (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:2952 (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:7947 (draw_resident)` +- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1634 (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:2935 (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:4938 (refuse_detached_texels)` +- `gap::DetachedTexelAccess`: `crates/metal2vulkan-runtime/src/texture.rs:4924 (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::MultisampledBufferCopy`: `crates/metal2vulkan-runtime/src/blit_texture.rs:536 (copy_from_buffer_to_texture)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:693 (copy_from_texture_to_buffer)` -- `gap::MultisampledBufferLayout`: `crates/metal2vulkan-runtime/src/sample_interleave.rs:1029 (plan)` +- `gap::PredicationDropsUngatedWork`: `crates/metal2vulkan-runtime/src/predication.rs:762 (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:2414 (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::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:320 (set_vertex_amplification_mode)` +- `apple::VertexAmplificationMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:195 (check)`; `crates/metal2vulkan-runtime/src/apple_only.rs:312 (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:655 (bind_buffers)` -- `bind::TexelBufferTooLarge`: `crates/metal2vulkan/src/bind/instantiate.rs:894 (texel_ranges)` +- `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:3767 (patch_binding)` -- `bind::PatchIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3811 (patch_binding)` -- `bind::ControlPointIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3849 (patch_binding)` +- `bind::TessellationFactorRange`: `crates/metal2vulkan/src/bind/graphics.rs:3653 (patch_binding)` +- `bind::PatchIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3697 (patch_binding)` +- `bind::ControlPointIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3735 (patch_binding)` - `bind::MissingStageInRegion`: `crates/metal2vulkan/src/bind/dispatch.rs:796 (instantiate)` -- `bind::UniformViewAliased`: `crates/metal2vulkan/src/bind/instantiate.rs:609 (check_uniform_aliasing)` +- `bind::UniformViewAliased`: `crates/metal2vulkan/src/bind/instantiate.rs:607 (check_uniform_aliasing)` - `bind::MissingDeviceAddress`: `crates/metal2vulkan/src/bind/plan/slots.rs:133 (plan_buffer)` - `limit::InlinedInstructions`: `crates/metal2vulkan-air/src/canon/inline.rs:330 (u32_of)`; `crates/metal2vulkan-air/src/canon/inline.rs:334 (usize_of)`; `crates/metal2vulkan-air/src/canon/inline.rs:61 (inline)` - `limit::OutputBlocks`: `crates/metal2vulkan/src/structurize/irreducible.rs:90 (round)`; `crates/metal2vulkan/src/structurize/mod.rs:187 (structure_prepared)`; `crates/metal2vulkan/src/structurize/structurizer_properties/mod.rs:423 (output_cap_is_checked_before_allocating)`; `crates/metal2vulkan/src/structurize/structurizer_properties/trees.rs:232 (the_output_cap_is_checked_before_emission)` @@ -513,10 +515,10 @@ Each refusal's sites, with the function that builds it. - `limit::ConstructNesting`: `crates/metal2vulkan/src/structurize/emit.rs:216 (check_tree)`; `crates/metal2vulkan/src/structurize/emit/predicate.rs:151 (facts)` - `limit::PrivateArenaBytes`: `crates/metal2vulkan/src/lower/access/local.rs:650 (use_arena)`; `crates/metal2vulkan/src/memory/plan.rs:1880 (place_allocas)`; `crates/metal2vulkan/src/memory/plan.rs:1887 (place_allocas)` - `limit::CallStackBytes`: `crates/metal2vulkan-air/src/canon/recursion.rs:118 (metal_stack)` -- `ratemap::ScreenExtent`: `crates/metal2vulkan-runtime/src/rate_map.rs:431 (compile_over)`; `crates/metal2vulkan/src/bind/rate_map.rs:524 (new)` -- `ratemap::LayerCount`: `crates/metal2vulkan/src/bind/rate_map.rs:528 (new)` -- `ratemap::DenseSamples`: `crates/metal2vulkan/src/bind/rate_map.rs:539 (new)` -- `ratemap::SampleOutOfRange`: `crates/metal2vulkan/src/bind/rate_map.rs:547 (new)` -- `ratemap::SampleCount`: `crates/metal2vulkan/src/bind/rate_map.rs:555 (new)` +- `ratemap::ScreenExtent`: `crates/metal2vulkan/src/bind/rate_map.rs:501 (new)` +- `ratemap::LayerCount`: `crates/metal2vulkan/src/bind/rate_map.rs:505 (new)` +- `ratemap::DenseSamples`: `crates/metal2vulkan/src/bind/rate_map.rs:516 (new)` +- `ratemap::SampleOutOfRange`: `crates/metal2vulkan/src/bind/rate_map.rs:524 (new)` +- `ratemap::SampleCount`: `crates/metal2vulkan/src/bind/rate_map.rs:532 (new)` - `budget::Time`: `crates/metal2vulkan-air/src/budget/mod.rs:275 (tick)`