From b5916b2f7ba1048107ffd0194baec47fe75ce34b Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 22 Nov 2026 06:32:00 -0800 Subject: [PATCH] Translator: four public items nothing produces or names go: the replay fault report, the rate-map note, two rate-map errors and the rate-map axis Four of the eight findings on the binder's public surface, the ones no plan reaches: - (3) `bind::ReplayFaults`, with `StatusReport::replay_fault` and `replay_faults`, `StatusBits::REPLAY_FAULT` and `StatusWord::ReplayFaults`: no module writes the word or the bit. `StatusWord::SeqCstFences` keeps index 3, so no module changes; word 2 is now one nothing writes. - (5) `PrecisionNote::RasterizationRateMap`: no module or runtime path records it (the decoder is Apple's arithmetic, and the runtime draws no rate-mapped pass). Its API.md catalogue entry goes, and so does conformance's `Degradation::RasterizationRateMap` with the notice allowances of the three rate-map families, whose runtime side refuses every rate-map call (`Unavailable`, known-gaps-rt.tsv), so the allowance never applied. Validation's c3 list of deferred near-equivalents drops it, and its tests use `SparseResidency` instead. The translator's rate-map tests drop their assertions that the note is absent. - (6) `RateMapError::NoLayers` and `LayerCount`: only the test support `from_layers` made them; it now panics on a count no test passes. - (7) `RateMapAxis`: in no public signature; now crate-private. The codec encodes a precision note by its name, so no other note's encoding moves. No refusal in docs/REFUSALS.md changes (refusal_surface.py --check passes as is). Consumer search at reims-vgpu development cae6d420df, `git -C ~/Projects/steelbrain/reims-vgpu grep -n -w ITEM development -- '*.rs'`: ReplayFaults 0, replay_faults 0, replay_fault 0, REPLAY_FAULT 0, StatusWord 0, RasterizationRateMap 0, Degradation 0, RateMapError 0, NoLayers 0, LayerCount 0, RateMapAxis 0. Left for later, with the census's re-record: two authored cases' rationales (shard_013, lines 33 and 34) still say the decoder's answers carry the note. (cherry picked from commit b68324630b4c8446d7fe730b3877b31727546d1c) --- .../src/cases/rate_map_degenerate_forms.rs | 54 +------- .../src/cases/rate_map_sweeps.rs | 116 ------------------ .../src/cases/rate_maps.rs | 33 +---- .../src/degradation.rs | 5 - crates/metal2vulkan-conformance/src/tests.rs | 44 +------ crates/metal2vulkan-validation/src/c3.rs | 17 +-- .../metal2vulkan-validation/src/c3/tests.rs | 14 +-- .../src/coverage/tests.rs | 6 +- crates/metal2vulkan/src/bind/mod.rs | 8 +- crates/metal2vulkan/src/bind/rate_map.rs | 32 ++--- .../metal2vulkan/src/bind/rate_map/tests.rs | 11 +- crates/metal2vulkan/src/bind/status.rs | 60 ++++----- crates/metal2vulkan/src/cache/codec.rs | 1 - crates/metal2vulkan/src/pipeline/artifact.rs | 7 -- .../metal2vulkan/src/tests/engine_rate_map.rs | 16 +-- .../src/tests/engine_rate_map/integer.rs | 10 +- crates/metal2vulkan/tests/api_signatures.tsv | 12 -- crates/metal2vulkan/tests/api_surface.rs | 2 - docs/API.md | 4 - 19 files changed, 66 insertions(+), 386 deletions(-) diff --git a/crates/metal2vulkan-conformance/src/cases/rate_map_degenerate_forms.rs b/crates/metal2vulkan-conformance/src/cases/rate_map_degenerate_forms.rs index 2c1204f60..dd157e5ba 100644 --- a/crates/metal2vulkan-conformance/src/cases/rate_map_degenerate_forms.rs +++ b/crates/metal2vulkan-conformance/src/cases/rate_map_degenerate_forms.rs @@ -58,12 +58,9 @@ //! which the runtime refuses for that reason. No case here asks for it, which is the same bound //! `rate-map-zero-screen-width` keeps. -use crate::allowance::{Allowance, Justification, Loosening}; use crate::case::{ made, Abort, Case, Input, MetalSource, RateMapForm, RateMapLayer, RateMapRequest, Side, }; -use crate::degradation::Degradation; -use crate::replay::NOTICES_SITE; use crate::transcript::{ByteLayout, Element, Gaps, Node, Observed, Region, Sites}; /// The screen every case here states: `rate-map-zero-screen-width`'s, whose compiled answer on this @@ -176,21 +173,6 @@ impl Case for DegenerateFormCase { ]) } - fn allowances(&self) -> Vec { - // The same declaration `rate-map-zero-screen-width` makes, because the map is its map: the - // rate-map degradation the runtime announces when it makes a map that is not the identity. `0` by `64` at a half is not: its - // vertical axis lays 64 screen pixels into 33 physical ones, so a pass over it would be - // drawn region by region, a near-equivalent the runtime declares (`docs/API.md`'s degrade - // catalogue). Metal announces nothing, so the notices set is the one field that may differ, - // and the allowance is held to its evidence — the notice must actually have been announced - // on the run compared. - vec![Allowance::new( - format!("case/{NOTICES_SITE}/*"), - Loosening::Unchecked, - Justification::notice(Degradation::RasterizationRateMap), - )] - } - fn run(&self, side: &mut dyn Side, sites: &mut Sites) -> Result<(), Abort> { let layers = self.layers(); let request = RateMapRequest { @@ -350,15 +332,14 @@ mod tests { } } - /// Every case runs on Metal, states its descriptor as an input, and loosens nothing but the - /// notices site — the shape `tests::the_rate_map_cases_name_what_justifies_them` holds the - /// family's other half to. + /// Every case runs on Metal, states its descriptor as an input, and loosens nothing — the + /// shape `tests::the_rate_map_cases_name_what_justifies_them` holds the family's other half to. /// /// Every answer the map itself gives therefore compares **exactly**, which is the whole claim /// of these cases: a route that compiled a different map at a degenerate extent has nowhere to /// hide. #[test] - fn every_case_runs_on_metal_and_loosens_only_its_notices() { + fn every_case_runs_on_metal_and_loosens_nothing() { for case in all() { assert_eq!(case.metal_source(), MetalSource::Run, "{}", case.name); assert!(case.metal_source().forbidden().is_none(), "{}", case.name); @@ -369,26 +350,7 @@ mod tests { the case fed: {inputs:?}", case.name ); - let allowances = case.allowances(); - assert_eq!( - allowances.len(), - 1, - "{}: the rate-map degradation is the one notice this shape declares", - case.name - ); - for allowance in allowances { - match &allowance.justified_by { - Justification::Degradation(code) => { - assert!( - *code == Degradation::RasterizationRateMap.code(), - "{}: {code}", - case.name - ); - assert_eq!(allowance.path, format!("case/{NOTICES_SITE}/*")); - } - other => panic!("{}: an unexpected tolerance: {other:?}", case.name), - } - } + assert!(case.allowances().is_empty(), "{}", case.name); } } @@ -453,13 +415,7 @@ mod tests { answers.len() ); let (physical, _, identity, _) = answers.into_iter().next().expect("one answer"); - // The shape the allowance rests on: the map is not the identity, so the runtime announces - // the rate-map degradation and every case here has to declare it. - assert!( - !identity, - "0 by 64 at a half compiles the identity, so the notice these cases declare would \ - never fire and the declaration would be checking nothing" - ); + assert!(!identity, "0 by 64 at a half compiles the identity"); assert_eq!( physical, Some([0, 33]), diff --git a/crates/metal2vulkan-conformance/src/cases/rate_map_sweeps.rs b/crates/metal2vulkan-conformance/src/cases/rate_map_sweeps.rs index 7d5ce13c4..7ce9b38d4 100644 --- a/crates/metal2vulkan-conformance/src/cases/rate_map_sweeps.rs +++ b/crates/metal2vulkan-conformance/src/cases/rate_map_sweeps.rs @@ -70,14 +70,11 @@ //! built: a descriptor of three layers, and either coordinate map over a map of no layers or of a //! zero screen extent. -use crate::allowance::{Allowance, Justification, Loosening}; use crate::case::{ made, Abort, Case, CoordinateProbe, Input, MappedCoordinates, MetalSource, RateMapForm, RateMapLayer, RateMapRequest, Side, }; -use crate::degradation::Degradation; use crate::rate_map_space as space; -use crate::replay::NOTICES_SITE; use crate::transcript::{Node, Observed, Sites, Value}; /// The quality sweep: one layer at [`space::SWEEP_EXTENT`], over every quality of @@ -341,33 +338,6 @@ impl Point { (0..count).collect() } - /// Whether the compiled map is the identity inside its screen, so that making it announces - /// nothing. - /// - /// A map whose every tile spans as many screen pixels as physical ones maps every screen pixel - /// to itself; anything else is drawn region by region, which the runtime announces as the - /// `rasterization-rate-map` degradation when the map is made. A point that is not the identity - /// is why this family keeps a notice allowance. - /// - /// It is decided **per axis**, which only a degenerate screen distinguishes. An axis of no - /// screen pixels is one tile of nothing — no screen pixels and no physical ones — so it is the - /// identity whatever quality it was given, while the *other* axis of the same map is not if its - /// quality is below 1. `0` by `64` at a half is exactly that shape, and it is the one - /// `rate-map-zero-screen-width` compares and declares the notice for. Reading a zero extent as - /// making the whole map the identity would leave this walk's `0` by `64` and `64` by `0` rows - /// declaring no notice while the runtime announces one, which is a divergence of the suite's - /// own making. - fn identity(&self) -> bool { - self.layers.iter().all(|layer| { - [ - (&layer.horizontal, self.screen[0]), - (&layer.vertical, self.screen[1]), - ] - .into_iter() - .all(|(axis, extent)| extent == 0 || axis.iter().all(|sample| *sample >= 1.0)) - }) - } - /// The coordinate grid over this point's map, with each physical probe scaled to the layer's /// own derived extent. /// @@ -480,25 +450,6 @@ impl Case for RateMapSweep { ]) } - fn allowances(&self) -> Vec { - // Every point of every sweep but one states a quality below 1 somewhere, so making its map - // announces the rate-map degradation: a pass over such a map is drawn region by region, a - // near-equivalent the runtime declares (`docs/API.md`'s degrade catalogue). Metal announces - // nothing, so the notices set is the one field that may differ. - // - // The allowance is held to its evidence by the suite itself — the notice must have been - // announced on the run compared — and it is the only loosening this family declares. Every - // derived answer compares exactly, which is the point of the sweep. - if self.walk.points().iter().all(|point| point.identity()) { - return Vec::new(); - } - vec![Allowance::new( - format!("case/{NOTICES_SITE}/*"), - Loosening::Unchecked, - Justification::notice(Degradation::RasterizationRateMap), - )] - } - fn run(&self, side: &mut dyn Side, sites: &mut Sites) -> Result<(), Abort> { for point in self.walk.points() { let mut node = Node::branch(point.at.clone(), Vec::new()); @@ -635,24 +586,6 @@ impl Case for RateMapParameterData { ]) } - fn allowances(&self) -> Vec { - // The identity announces nothing, on either venue; anything else announces the rate-map - // degradation when the map is made, for the reason the sweeps' own allowance gives. - let identity = self.layers.iter().all(|layer| { - [&layer.horizontal, &layer.vertical] - .into_iter() - .all(|axis| axis.iter().all(|sample| *sample >= 1.0)) - }); - if identity { - return Vec::new(); - } - vec![Allowance::new( - format!("case/{NOTICES_SITE}/*"), - Loosening::Unchecked, - Justification::notice(Degradation::RasterizationRateMap), - )] - } - fn run(&self, side: &mut dyn Side, sites: &mut Sites) -> Result<(), Abort> { let request = RateMapRequest::new(self.screen, &self.layers); let map = made(sites, "map", side.rate_map(&request))?; @@ -1275,55 +1208,6 @@ mod tests { ); } - /// The identity is decided **per axis**, which is what a degenerate screen distinguishes: a - /// screen with one zero axis and a quality below 1 on the other is **not** the identity, and a - /// screen of two zero axes is. - /// - /// Without this, a zero extent read as making the whole map the identity leaves the `0` by `64` - /// and `64` by `0` rows declaring no notice while the runtime announces one — a divergence the - /// suite would have manufactured. `rate-map-zero-screen-width` compares the same descriptor and - /// declares the notice, so the two halves of the family would also have disagreed about one - /// shape. - #[test] - fn a_degenerate_screen_is_the_identity_only_where_both_axes_are() { - let by_screen: std::collections::BTreeMap<[u32; 2], bool> = Walk::DegenerateForms - .points() - .iter() - .map(|point| (point.screen, point.identity())) - .collect(); - assert_eq!( - by_screen.get(&[0, 64]), - Some(&false), - "0 by 64 at a half on each axis is not the identity: its vertical axis lays 64 \ - screen pixels into 33 physical ones" - ); - assert_eq!( - by_screen.get(&[64, 0]), - Some(&false), - "64 by 0 at a half on each axis is not the identity: its horizontal axis lays 64 \ - screen pixels into 33 physical ones" - ); - assert_eq!( - by_screen.get(&[0, 0]), - Some(&true), - "0 by 0 is the identity whatever its qualities: both axes are one tile of no \ - screen pixels and no physical ones" - ); - // And the answer is the compiled map's own, not a rule restated here. - for (screen, identity) in &by_screen { - let map = compiled( - *screen, - &[space::uniform_layer(space::SCREEN_SWEEP_QUALITY)], - ) - .expect("a degenerate screen compiles"); - assert_eq!( - map.is_identity(), - *identity, - "{screen:?}: the walk calls it identity={identity} and the compiled map disagrees" - ); - } - } - /// The walks fingerprint differently, so no recording of one is read against another's. #[test] fn the_walks_have_their_own_fingerprints() { diff --git a/crates/metal2vulkan-conformance/src/cases/rate_maps.rs b/crates/metal2vulkan-conformance/src/cases/rate_maps.rs index b800c47fc..0c083f4f8 100644 --- a/crates/metal2vulkan-conformance/src/cases/rate_maps.rs +++ b/crates/metal2vulkan-conformance/src/cases/rate_maps.rs @@ -39,10 +39,7 @@ //! physical-to-screen map of the same map answers) — which is why the runtime refuses all three. //! A pass over a mutable map is not a case either. -use crate::allowance::{Allowance, Justification, Loosening}; use crate::case::{made, Abort, Case, Input, MetalSource, RateMapLayer, RateMapRequest, Side}; -use crate::degradation::Degradation; -use crate::replay::NOTICES_SITE; use crate::transcript::{ByteLayout, Element, Gaps, Node, Observed, Region, Sites}; /// The case of a descriptor Metal counts as having no layers. @@ -85,10 +82,6 @@ pub struct RateMapCase { layers: Vec, /// The descriptor's label, which the map keeps. label: &'static str, - /// Whether the compiled map is the identity inside its screen. A map that is not announces - /// the `rasterization-rate-map` degradation when it is made, because a pass over it would be - /// drawn region by region, so such a case keeps one notice allowance; Metal announces nothing. - identity: bool, } /// Every case of the family. @@ -102,17 +95,14 @@ pub fn all() -> Vec { screen: [256, 256], layers: Vec::new(), label: "conformance-no-layers", - identity: true, }, // A descriptor of no screen width: its validation refuses it, and plain Metal compiles a - // map of one layer, which the runtime compiles too. Its vertical axis is not the - // identity, so making it announces the rate-map degradation. + // map of one layer. RateMapCase { name: ZERO_SCREEN_WIDTH, screen: [0, 64], layers: vec![RateMapLayer::uniform(0.5, 0.5)], label: "conformance-zero-width", - identity: false, }, ] } @@ -163,27 +153,6 @@ impl Case for RateMapCase { ]) } - fn allowances(&self) -> Vec { - // Exact is the default and every answer of these cases keeps it. A map of the identity - // announces nothing, on either venue (verified on MoltenVK and on lavapipe), so its case - // carries no allowance at all: a tolerance that never fires is one nobody is checking, and - // a device that does announce something there should fail the case until somebody names - // why. - if self.identity { - return Vec::new(); - } - // A map that is not the identity announces the rate-map degradation when it is made, a - // near-equivalent the runtime declares (`docs/API.md`'s degrade catalogue): a pass over - // such a map is drawn region by region, on this crate's tile lines. Metal announces - // nothing, so the notices set is the one field that may differ, and the allowance is held - // to its evidence — the notice must actually have been announced on the run compared. - vec![Allowance::new( - format!("case/{NOTICES_SITE}/*"), - Loosening::Unchecked, - Justification::notice(Degradation::RasterizationRateMap), - )] - } - fn run(&self, side: &mut dyn Side, sites: &mut Sites) -> Result<(), Abort> { let map = made(sites, site::MAP, side.rate_map(&self.request()))?; let facts = match side.rate_map_facts(map, LAYERS_READ) { diff --git a/crates/metal2vulkan-conformance/src/degradation.rs b/crates/metal2vulkan-conformance/src/degradation.rs index 47fa0b226..4cae3c512 100644 --- a/crates/metal2vulkan-conformance/src/degradation.rs +++ b/crates/metal2vulkan-conformance/src/degradation.rs @@ -65,8 +65,6 @@ pub enum Degradation { Fp8Value, /// `metal2vulkan-degrade-multisample-position`. MultisamplePosition, - /// `metal2vulkan-degrade-rasterization-rate-map`. - RasterizationRateMap, /// `metal2vulkan-degrade-bicubic-filter-arithmetic`. BicubicFilterArithmetic, /// `metal2vulkan-degrade-sparse-residency`. @@ -209,7 +207,6 @@ impl Degradation { Degradation::TessellationFactorInstance, Degradation::Fp8Value, Degradation::MultisamplePosition, - Degradation::RasterizationRateMap, Degradation::BicubicFilterArithmetic, Degradation::SparseResidency, Degradation::DeviceNanEncoding, @@ -309,7 +306,6 @@ impl Degradation { } Degradation::Fp8Value => "metal2vulkan-degrade-fp8-value", Degradation::MultisamplePosition => "metal2vulkan-degrade-multisample-position", - Degradation::RasterizationRateMap => "metal2vulkan-degrade-rasterization-rate-map", Degradation::BicubicFilterArithmetic => { "metal2vulkan-degrade-bicubic-filter-arithmetic" } @@ -421,7 +417,6 @@ impl Degradation { PrecisionNote::TessellationFactorInstance => Degradation::TessellationFactorInstance, PrecisionNote::Fp8Value => Degradation::Fp8Value, PrecisionNote::MultisamplePosition => Degradation::MultisamplePosition, - PrecisionNote::RasterizationRateMap => Degradation::RasterizationRateMap, PrecisionNote::BicubicFilterArithmetic => Degradation::BicubicFilterArithmetic, PrecisionNote::SparseResidency => Degradation::SparseResidency, PrecisionNote::DeviceNanEncoding => Degradation::DeviceNanEncoding, diff --git a/crates/metal2vulkan-conformance/src/tests.rs b/crates/metal2vulkan-conformance/src/tests.rs index 211bb7fb8..60b49a561 100644 --- a/crates/metal2vulkan-conformance/src/tests.rs +++ b/crates/metal2vulkan-conformance/src/tests.rs @@ -3335,8 +3335,7 @@ fn an_undocumented_refusal_is_one_row_and_names_no_excuse() { assert!(!printed.contains("documented"), "{printed}"); } -/// The rate-map cases state the descriptor they feed, name the words Metal's validation used, and -/// keep the refusal's allowance to the call's own site. +/// The rate-map cases state the descriptor they feed and loosen nothing. #[test] fn the_rate_map_cases_name_what_justifies_them() { let cases = crate::cases::rate_maps::all(); @@ -3358,44 +3357,9 @@ fn the_rate_map_cases_name_what_justifies_them() { inputs.iter().any(|input| input.name == "descriptor"), "{inputs:?}" ); - // Every allowance names something that exists -- the rate-map degradation -- over the - // notices site alone, so every answer of the map itself still compares exactly. - for allowance in case.allowances() { - match &allowance.justified_by { - Justification::Degradation(code) => { - assert!(code == Degradation::RasterizationRateMap.code(), "{code}"); - assert_eq!(allowance.path, "case/notices/*"); - } - other => panic!("an unexpected tolerance: {other:?}"), - } - } - } - // The map of the identity announces no rate-map degradation and declares none; the one that is - // not the identity announces it when the map is made. Neither rests on the validated oracle: - // the zero-screen-width refusal that did is closed. - let codes = |case: &crate::cases::rate_maps::RateMapCase| -> Vec { - case.allowances() - .iter() - .filter_map(|allowance| match &allowance.justified_by { - Justification::Degradation(code) => Some(code.clone()), - _ => None, - }) - .collect() - }; - assert!(codes(&cases[0]).is_empty()); - assert_eq!( - codes(&cases[1]), - vec![Degradation::RasterizationRateMap.code().to_owned()] - ); - for case in &cases { - assert!( - !case.allowances().iter().any(|allowance| matches!( - allowance.justified_by, - Justification::MetalValidation { .. } - )), - "{}", - case.name() - ); + // Every answer compares exactly: neither case loosens anything, and neither rests on the + // validated oracle (the zero-screen-width refusal that did is closed). + assert!(case.allowances().is_empty(), "{}", case.name()); } } diff --git a/crates/metal2vulkan-validation/src/c3.rs b/crates/metal2vulkan-validation/src/c3.rs index b29d614df..68b2e143c 100644 --- a/crates/metal2vulkan-validation/src/c3.rs +++ b/crates/metal2vulkan-validation/src/c3.rs @@ -7,8 +7,8 @@ //! reading inside the bound, and an exact match with it is not a property of the translation. The //! user decided that such cases are listed, each with its bound and cause, keyed by case and //! candidate, so that a changed candidate leaves the list and is reviewed again. A row that ran a -//! recorded near-equivalent no exact path replaces yet ([`DEFERRED_NEAR_EQUIVALENTS`]: a -//! rasterization-rate map's decoder, a sparse texture's filtered access, an explicit cube +//! recorded near-equivalent no exact path replaces yet ([`DEFERRED_NEAR_EQUIVALENTS`]: a sparse +//! texture's filtered access, an explicit cube //! gradient's footprint, a nearest cube texel from a correctly rounded reciprocal, a simdgroup //! operation's lanes before a discard, a depth comparison the device makes, a bicubic sum's //! unpinned arithmetic, a varying a device interpolates otherwise than Metal, a vertex simdgroup @@ -683,9 +683,6 @@ pub struct SlotRow { /// mismatch is still counted as one; only its reason names the note, whatever word differs, so a /// difference the note did not cause is labelled deferred too but hides nothing. /// -/// - The rasterization-rate map decoder's: Apple's GPU decoder reads fractional tile starts only -/// Apple's parameter data holds, and a moved coordinate changes what every later word of the row -/// reads, so no word's difference can be told apart from the note's. /// - A sparse texture's filtered access (`SparseResidency`): outside Metal's measured footprint /// rule its residency word is the device's footprint, and its filtered value is the device's /// filter, whose sub-texel precision need not be Metal's 1/256; an emulation of Metal's measured @@ -743,8 +740,7 @@ pub struct SlotRow { /// denormal, a `half` rounding) belongs in a per-word judgement of a reading's differing words, /// beside the check of each against Apple's bound, never in this list: a row-level match would /// reopen every signed-off reading whose row merely records the note. -pub const DEFERRED_NEAR_EQUIVALENTS: [PrecisionNote; 10] = [ - PrecisionNote::RasterizationRateMap, +pub const DEFERRED_NEAR_EQUIVALENTS: [PrecisionNote; 9] = [ PrecisionNote::SparseResidency, PrecisionNote::CubeGradientFootprint, PrecisionNote::QuadsCountedBeforeDiscard, @@ -789,13 +785,6 @@ impl OpenReason { /// The measured bound of a deferred near-equivalent ([`DEFERRED_NEAR_EQUIVALENTS`]). fn near_equivalent_bound(note: PrecisionNote) -> &'static str { match note { - PrecisionNote::RasterizationRateMap => { - "tile starts at integers where Apple M3's are fractional: decoder within 0.0194 px \ - physical to screen and 0.002 px screen to physical of Apple's GPU on the maps \ - measured; a rate-mapped pass's points within 0.025 px of Metal's where the device \ - keeps the viewport's fractions, and an axis's last physical line, where its last \ - tile maps under 2 screen pixels to one, shaded where Metal may leave it" - } PrecisionNote::SparseResidency => { "no bound: outside Metal's measured footprint rule (a runtime sampler, a mip level, \ repeat or mirrored addressing, a texel offset) a sample's or gather's residency is the \ diff --git a/crates/metal2vulkan-validation/src/c3/tests.rs b/crates/metal2vulkan-validation/src/c3/tests.rs index cbb3b5cbc..956052dd1 100644 --- a/crates/metal2vulkan-validation/src/c3/tests.rs +++ b/crates/metal2vulkan-validation/src/c3/tests.rs @@ -2990,8 +2990,8 @@ fn a_ray_tracing_refusal_is_out_of_scope_never_refused_or_a_gap() { assert!(!stated.holds()); } -/// The user's decision of 2026-10-03: a row that decoded a rasterization-rate map (the decoder's -/// recorded near-equivalent) stays open, with its measured bound as the reason, even when the list +/// The user's decision of 2026-10-03: a row that ran a recorded near-equivalent (a sparse +/// texture's residency here) stays open, with its measured bound as the reason, even when the list /// reviews it; a case whose rate map the product refuses is missing with the refusal as its reason. /// Neither holds C3, and an ordinary mismatch carries no reason. #[test] @@ -3013,12 +3013,12 @@ fn a_deferred_near_equivalent_stays_open_with_its_reason() { required_size: None, }), strategies: Default::default(), - precision: [PrecisionNote::RasterizationRateMap].into(), + precision: [PrecisionNote::SparseResidency].into(), containment: None, }], artifact: None, }); - row.comparison = ComparisonClass::Unbounded([PrecisionNote::RasterizationRateMap].into()); + row.comparison = ComparisonClass::Unbounded([PrecisionNote::SparseResidency].into()); row.status = noted_if_different(row.status); assert!(row.class_holds()); let mut refused = case(2, "refused"); @@ -3058,15 +3058,15 @@ fn a_deferred_near_equivalent_stays_open_with_its_reason() { .find(|row| row.case_id == case.case_id) .map(|row| (row.verdict, row.reason.clone())) }; - let deferred = OpenReason::NearEquivalent(PrecisionNote::RasterizationRateMap); + let deferred = OpenReason::NearEquivalent(PrecisionNote::SparseResidency); assert_eq!( open(&decoded), Some((Verdict::Mismatch, Some(deferred.clone()))) ); assert!( deferred.label().starts_with( - "deferred{near_equivalent:RasterizationRateMap:tile starts at integers where \ - Apple M3's are fractional" + "deferred{near_equivalent:SparseResidency:no bound: outside Metal's measured \ + footprint rule" ), "{}", deferred.label() diff --git a/crates/metal2vulkan-validation/src/coverage/tests.rs b/crates/metal2vulkan-validation/src/coverage/tests.rs index 976f48fef..ee51f87b3 100644 --- a/crates/metal2vulkan-validation/src/coverage/tests.rs +++ b/crates/metal2vulkan-validation/src/coverage/tests.rs @@ -101,16 +101,16 @@ fn a_rate_mapped_pass_records_its_regions() { screen_size: [37, 23], compiled_physical_size: [36, 23], regions: 2, - precision: [PrecisionNote::RasterizationRateMap].into(), + precision: [PrecisionNote::SparseResidency].into(), }); assert_eq!( census.comparison_class(), - ComparisonClass::derive([PrecisionNote::RasterizationRateMap], ["arith.float"]) + ComparisonClass::derive([PrecisionNote::SparseResidency], ["arith.float"]) ); let json = serde_json::to_value(&census).unwrap(); assert_eq!( json["rate_map_pass"]["precision"], - serde_json::json!(["RasterizationRateMap"]) + serde_json::json!(["SparseResidency"]) ); assert_eq!( serde_json::from_value::(json).unwrap(), diff --git a/crates/metal2vulkan/src/bind/mod.rs b/crates/metal2vulkan/src/bind/mod.rs index d7f2e0c6b..3c2e4fc67 100644 --- a/crates/metal2vulkan/src/bind/mod.rs +++ b/crates/metal2vulkan/src/bind/mod.rs @@ -107,9 +107,11 @@ pub use plan::{ GraphicsTemplate, ImageSource, ImageViewDesc, PlanDiagnostic, PushFieldPlacement, PushTemplate, ResourceUse, SamplerSource, UseTarget, VertexBufferBind, ViewSetup, WriteSource, }; +#[cfg(test)] +pub(crate) use rate_map::RateMapAxis; pub use rate_map::{ - RasterizationRateMap, RateMapAxis, RateMapDescriptor, RateMapError, RateMapLayerDescriptor, - UnpinnedCompile, MAX_SCREEN_EXTENT, + RasterizationRateMap, RateMapDescriptor, RateMapError, RateMapLayerDescriptor, UnpinnedCompile, + MAX_SCREEN_EXTENT, }; pub use replay::DRAW_ARGUMENT_BYTES; pub(crate) use replay::{merged_fragment_table, merged_vertex, MergedVertex}; @@ -126,7 +128,7 @@ pub use state::{ // How `BindState::shape` classes a buffer: the crate reads it from `state`, and a consumer takes // shapes from `BindState::shape`; only the crate's tests and validation reach it here. pub use pvrtc_decode::PvrtcDecode; -pub use status::{ExecutionStatus, ReplayFaults, StatusBits, StatusReport, StatusWord}; +pub use status::{ExecutionStatus, StatusBits, StatusReport, StatusWord}; pub use table::FunctionTableSnapshot; #[cfg(test)] pub(crate) use table::FunctionTableWords; diff --git a/crates/metal2vulkan/src/bind/rate_map.rs b/crates/metal2vulkan/src/bind/rate_map.rs index 6d49633f5..414894c05 100644 --- a/crates/metal2vulkan/src/bind/rate_map.rs +++ b/crates/metal2vulkan/src/bind/rate_map.rs @@ -159,9 +159,6 @@ impl RateMapLayerDescriptor { #[non_exhaustive] #[derive(Clone, Debug, PartialEq, Eq)] pub enum RateMapError { - /// A map of explicit tiles has no layer, so no vertical axis ([`RasterizationRateMap::new`] - /// compiles a map of none). - NoLayers, /// A screen extent is 0 or above [`MAX_SCREEN_EXTENT`], or explicit tiles cover more than /// 16384 screen pixels, the most Metal's parameter data holds. ScreenExtent { extent: u32 }, @@ -177,9 +174,6 @@ pub enum RateMapError { /// [`RasterizationRateMap::new`] does not compile the descriptor: it is outside the bounds /// where the compile is measured to be Apple's. Unpinned { reason: UnpinnedCompile }, - /// A map of explicit tiles has more than two layers: Metal's parameter data holds two - /// horizontal axes. - LayerCount { count: usize }, /// Layer `layer`'s vertical axis is not layer 0's: Metal's parameter data holds one vertical /// axis, every layer's. VerticalAxis { layer: usize }, @@ -270,7 +264,6 @@ impl fmt::Display for UnpinnedCompile { impl fmt::Display for RateMapError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { - RateMapError::NoLayers => f.write_str("explicit tiles need a layer"), RateMapError::ScreenExtent { extent } => write!( f, "screen extent {extent} is past {MAX_SCREEN_EXTENT}, or explicit tiles' is \ @@ -292,10 +285,6 @@ impl fmt::Display for RateMapError { RateMapError::Unpinned { reason } => { write!(f, "not compiled as Apple compiles it: {reason}") } - RateMapError::LayerCount { count } => write!( - f, - "{count} layers, more than the {MAX_COMPILED_LAYERS} Metal's parameter data holds" - ), RateMapError::OffsetTie { tile } => write!( f, "tile {tile}'s offset lies halfway between two 1/256-pixel steps, whose rounding \ @@ -314,7 +303,7 @@ impl std::error::Error for RateMapError {} /// One axis of a compiled layer: its tiles in screen order. #[derive(Clone, Debug, PartialEq, Eq, Hash)] -pub struct RateMapAxis { +pub(crate) struct RateMapAxis { granularity: u32, /// `(screen extent, physical extent)` per tile. tiles: Vec<(u32, u32)>, @@ -322,7 +311,7 @@ pub struct RateMapAxis { impl RateMapAxis { /// The physical extent the tiles cover. - pub fn physical_extent(&self) -> u32 { + pub(crate) fn physical_extent(&self) -> u32 { self.tiles.iter().map(|&(_, p)| p).sum() } @@ -663,19 +652,20 @@ impl RasterizationRateMap { } /// The map of these compiled layers, each `[horizontal, vertical]`, over `screen_size`: at - /// least one and at most two layers, each axis covering the map's screen extent, the layers - /// sharing one vertical axis (what Metal's parameter data holds). + /// least one and at most two layers (the tests' own maps; a test that passes another count + /// panics), each axis covering the map's screen extent, the layers sharing one vertical axis + /// (what Metal's parameter data holds). #[cfg(test)] pub(crate) fn from_layers( screen_size: [u32; 2], layers: Vec<[RateMapAxis; 2]>, ) -> Result { - let [_, vertical] = layers.first().ok_or(RateMapError::NoLayers)?; - if layers.len() > MAX_COMPILED_LAYERS { - return Err(RateMapError::LayerCount { - count: layers.len(), - }); - } + let [_, vertical] = layers.first().expect("a map of explicit tiles has a layer"); + assert!( + layers.len() <= MAX_COMPILED_LAYERS, + "{} layers, more than Metal's parameter data holds", + layers.len() + ); for (l, layer) in layers.iter().enumerate() { for (a, (axis, extent)) in layer.iter().zip(screen_size).enumerate() { if axis.screen_extent() != extent { diff --git a/crates/metal2vulkan/src/bind/rate_map/tests.rs b/crates/metal2vulkan/src/bind/rate_map/tests.rs index da61bffbc..47ddd06ea 100644 --- a/crates/metal2vulkan/src/bind/rate_map/tests.rs +++ b/crates/metal2vulkan/src/bind/rate_map/tests.rs @@ -654,10 +654,6 @@ fn the_two_maps_are_inverse() { /// Malformed descriptors and tiles, and tiles Metal's parameter data cannot hold, are refused. #[test] fn malformed_maps_are_refused() { - assert_eq!( - RasterizationRateMap::from_layers([16, 16], Vec::new()), - Err(RateMapError::NoLayers) - ); let mut d = RateMapDescriptor::new([70000, 16]); d.layers.push(layer(&[1.0], &[1.0])); assert_eq!( @@ -706,14 +702,9 @@ fn malformed_maps_are_refused() { Err(RateMapError::ExtentMismatch { layer: 0, axis: 0 }) ); assert_eq!( - RasterizationRateMap::from_layers([32, 16], vec![[x.clone(), y.clone()], [x.clone(), y2]]), + RasterizationRateMap::from_layers([32, 16], vec![[x.clone(), y], [x, y2]]), Err(RateMapError::VerticalAxis { layer: 1 }) ); - let three = vec![[x.clone(), y.clone()], [x.clone(), y.clone()], [x, y]]; - assert_eq!( - RasterizationRateMap::from_layers([32, 16], three), - Err(RateMapError::LayerCount { count: 3 }) - ); } /// A tile whose line's offset lies halfway between two of Metal's 1/256-pixel steps is refused: diff --git a/crates/metal2vulkan/src/bind/status.rs b/crates/metal2vulkan/src/bind/status.rs index b38bdb91c..08207ce9b 100644 --- a/crates/metal2vulkan/src/bind/status.rs +++ b/crates/metal2vulkan/src/bind/status.rs @@ -21,10 +21,9 @@ impl ExecutionStatus { [0; ExecutionStatus::BYTES] } - /// What the buffer's bytes report after the command buffer ran. The consumer maps a replay - /// fault, a mesh grid Metal's GPU - /// discards or the device cannot launch, and a cubic argument sampler's sample - /// to a command-buffer execution error, and treats resident-set misses by its own policy. + /// What the buffer's bytes report after the command buffer ran. The consumer maps a mesh grid + /// Metal's GPU discards or the device cannot launch, and a cubic argument sampler's sample, to a + /// command-buffer execution error, and treats resident-set misses by its own policy. pub fn decode(bytes: &[u8; ExecutionStatus::BYTES]) -> StatusReport { let word = |w: StatusWord| { let at = w.byte_offset() as usize; @@ -34,8 +33,6 @@ impl ExecutionStatus { StatusReport { resident_miss: bits.contains(StatusBits::RESIDENT_MISS), resident_misses: word(StatusWord::ResidentMisses), - replay_fault: bits.contains(StatusBits::REPLAY_FAULT), - replay_faults: ReplayFaults(word(StatusWord::ReplayFaults)), cubic_argument_sampler: bits.contains(StatusBits::CUBIC_ARGUMENT_SAMPLER), mesh_grid_discarded: bits.contains(StatusBits::MESH_GRID_DISCARDED), mesh_grid_past_limits: bits.contains(StatusBits::MESH_GRID_PAST_LIMITS), @@ -52,11 +49,6 @@ pub struct StatusReport { /// The number of resident-set misses counted (a `u32` the device increments, wrapping after /// `2^32` misses). pub resident_misses: u32, - /// The device replay's preprocess met a command it does not replay: that command dispatched - /// nothing. [`StatusReport::replay_faults`] says why. - pub replay_fault: bool, - /// Why the device replay's preprocess refused commands: the union of their reasons. - pub replay_faults: ReplayFaults, /// A function sampled through an argument buffer's sampler whose min or mag filter is /// `Cubic`, whose bicubic filter it does not emulate there /// (`RuntimeFact::CubicArgumentSampler`): no result of the command buffer is then Metal's. @@ -77,12 +69,11 @@ pub enum StatusWord { Status, /// Resident-miss count. Initial 0. ResidentMisses, - /// The device replay's fault reasons ([`ReplayFaults`]). Initial 0. - ReplayFaults, /// The word every sequentially consistent fence of the command buffer increments with an /// acquire-release atomic at the fence's scope (`lower::sync::barrier::seq_cst_order`), so /// that the fences of one command buffer are totally ordered, as Metal's are. Its value means - /// nothing; the decode does not read it. Initial 0. + /// nothing; the decode does not read it. Initial 0. It is the buffer's last word, after one + /// that nothing writes. SeqCstFences, } @@ -92,7 +83,6 @@ impl StatusWord { match self { StatusWord::Status => 0, StatusWord::ResidentMisses => 1, - StatusWord::ReplayFaults => 2, StatusWord::SeqCstFences => 3, } } @@ -110,8 +100,6 @@ pub struct StatusBits(pub u32); impl StatusBits { /// An access missed the resident set. pub const RESIDENT_MISS: StatusBits = StatusBits(1 << 0); - /// The device replay's preprocess refused a command; [`StatusWord::ReplayFaults`] holds why. - pub const REPLAY_FAULT: StatusBits = StatusBits(1 << 1); /// A function sampled, gathered, or queried through a sampler an argument buffer holds whose /// min or mag filter is `Cubic`, whose bicubic filter it does not emulate there /// (`RuntimeFact::CubicArgumentSampler`): its result is the device's through a nearest @@ -132,38 +120,38 @@ impl StatusBits { } } -/// Why the device replay's preprocess refused a command, the bits of [`StatusWord::ReplayFaults`]. -/// A refused command dispatches nothing; every other command of the range still runs, so a consumer -/// that reads a fault reports the command buffer's execution as failed, as Metal reports an -/// encoding fault, and may replay the range on the host instead (`CommandBuffer::decode`, which -/// names the command). -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] -pub struct ReplayFaults(pub u32); - #[cfg(test)] mod tests { use super::*; #[test] - fn words_are_distinct_and_fill_the_buffer() { + fn words_are_distinct_and_inside_the_buffer() { let words = [ StatusWord::Status, StatusWord::ResidentMisses, - StatusWord::ReplayFaults, StatusWord::SeqCstFences, ]; for (i, w) in words.iter().enumerate() { - assert_eq!(w.index() as usize, i, "{w:?}"); + assert!( + words[..i].iter().all(|other| other.index() != w.index()), + "{w:?}" + ); assert_eq!(w.byte_offset(), 4 * w.index(), "{w:?}"); + assert!( + w.byte_offset() as usize + 4 <= ExecutionStatus::BYTES, + "{w:?}" + ); } - assert_eq!(words.len() * 4, ExecutionStatus::BYTES); + assert_eq!( + StatusWord::SeqCstFences.byte_offset() as usize + 4, + ExecutionStatus::BYTES + ); } #[test] fn status_bits_are_distinct() { let bits = [ StatusBits::RESIDENT_MISS, - StatusBits::REPLAY_FAULT, StatusBits::CUBIC_ARGUMENT_SAMPLER, StatusBits::MESH_GRID_PAST_LIMITS, StatusBits::MESH_GRID_DISCARDED, @@ -174,8 +162,8 @@ mod tests { assert_eq!(all & b.0, 0); all |= b.0; } - assert!(StatusBits(all).contains(StatusBits::REPLAY_FAULT)); - assert!(!StatusBits::RESIDENT_MISS.contains(StatusBits::REPLAY_FAULT)); + assert!(StatusBits(all).contains(StatusBits::CUBIC_ARGUMENT_SAMPLER)); + assert!(!StatusBits::RESIDENT_MISS.contains(StatusBits::CUBIC_ARGUMENT_SAMPLER)); } /// The initial bytes are all zero, and `decode` of them reports nothing. @@ -200,15 +188,9 @@ mod tests { let r = ExecutionStatus::decode(&bytes); assert!(r.cubic_argument_sampler && !r.resident_miss); assert_eq!(r.resident_misses, 0); - bytes = [0u8; ExecutionStatus::BYTES]; - bytes[0..4].copy_from_slice(&StatusBits::REPLAY_FAULT.0.to_le_bytes()); - bytes[8..12].copy_from_slice(&0x41u32.to_le_bytes()); - let r = ExecutionStatus::decode(&bytes); - assert!(r.replay_fault && !r.cubic_argument_sampler); - assert_eq!(r.replay_faults, ReplayFaults(0x41)); let mut cubic = [0u8; ExecutionStatus::BYTES]; cubic[0..4].copy_from_slice(&StatusBits::CUBIC_ARGUMENT_SAMPLER.0.to_le_bytes()); let c = ExecutionStatus::decode(&cubic); - assert!(c.cubic_argument_sampler && !c.replay_fault); + assert!(c.cubic_argument_sampler && !c.resident_miss); } } diff --git a/crates/metal2vulkan/src/cache/codec.rs b/crates/metal2vulkan/src/cache/codec.rs index 5385dae3f..7e8c94baf 100644 --- a/crates/metal2vulkan/src/cache/codec.rs +++ b/crates/metal2vulkan/src/cache/codec.rs @@ -1384,7 +1384,6 @@ codec_enum! { TessellationFactorInstance, Fp8Value, MultisamplePosition, - RasterizationRateMap, BicubicFilterArithmetic, SparseResidency, DeviceNanEncoding, diff --git a/crates/metal2vulkan/src/pipeline/artifact.rs b/crates/metal2vulkan/src/pipeline/artifact.rs index 03f2508f5..187eea609 100644 --- a/crates/metal2vulkan/src/pipeline/artifact.rs +++ b/crates/metal2vulkan/src/pipeline/artifact.rs @@ -699,13 +699,6 @@ pub enum PrecisionNote { /// `[[point_coord]]` and a centroid varying at the sample and `[[position]]`'s z and w at the /// pixel, where they equal Metal's to the last bit or two. MultisamplePosition, - /// A render pass drawn by regions over a rasterization-rate map that is not the identity: its - /// regions' lines are this crate's tiles' exact lines, - /// where Apple's are its fixed-point ones, so a fragment's evaluated point lies within the - /// bound of Metal's. A module that decodes a map records none: its decoder is Apple's GPU - /// arithmetic over Metal's parameter data, bit for bit (it once recorded this note, when the - /// data was this crate's own layout). - RasterizationRateMap, /// A filter the module emulates by fetches sums its taps in the device's arithmetic, where /// Metal's sampler has its own datapath: Metal's bicubic filter (every format), and an /// extended-range texture's linear, 3D and linear-mip-filter samples (`BGR10_XR`, diff --git a/crates/metal2vulkan/src/tests/engine_rate_map.rs b/crates/metal2vulkan/src/tests/engine_rate_map.rs index fb6c10765..ac7ddb547 100644 --- a/crates/metal2vulkan/src/tests/engine_rate_map.rs +++ b/crates/metal2vulkan/src/tests/engine_rate_map.rs @@ -1,7 +1,6 @@ //! Rasterization-rate maps end to end (Apple's layout): `rasterization_rate_map_decoder`'s `float2` -//! maps compile to Apple's GPU decoder of Metal's parameter data on every tested profile, pass L3, -//! and record no `RasterizationRateMap` note (the decoder is Apple's arithmetic over Metal's -//! bytes). Its `float` arithmetic is the device's: its denormals the device's own, noted +//! maps compile to Apple's GPU decoder of Metal's parameter data on every tested profile and pass +//! L3 (the decoder is Apple's arithmetic over Metal's bytes). Its `float` arithmetic is the device's: its denormals the device's own, noted //! `DeviceDenormals`, and its `NaN` the device's, noted `NativeNanEncoding`. On the CPU interpreter, //! which keeps `float` denormals as lavapipe does, the module computes the shader decoder's //! arithmetic over the same bytes with denormals kept ([`kept`]): bit for bit, the sign of a zero @@ -267,11 +266,6 @@ fn the_decoder_answers_as_the_map() { let what = stem; let p = profile_with(stem); let a = compile(&bc, "rate_map", &p).unwrap_or_else(|e| panic!("{what}: {e}")); - assert!( - !a.precision.contains(&PrecisionNote::RasterizationRateMap), - "{what}: {:?}", - a.precision - ); assert!( a.precision.contains(&PrecisionNote::DeviceDenormals), "{what}: {:?}", @@ -388,7 +382,7 @@ fn stray_words_decode_without_a_fault() { /// A fragment function that unwarps its position through the map (the corpus's fragment shape: /// `map_screen_to_physical_coordinates(position.xy, layer)`, the layer a buffer word) compiles on -/// every profile, passes L3, and records no `RasterizationRateMap` note. +/// every profile and passes L3. #[test] fn a_fragment_function_maps_its_position() { let text = r#"target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32" @@ -433,10 +427,6 @@ attributes #1 = { nounwind willreturn memory(argmem: read) } let what = stem; let p = profile_with(stem); let a = compile(&bc, "unwarp", &p).unwrap_or_else(|e| panic!("{what}: {e}")); - assert!( - !a.precision.contains(&PrecisionNote::RasterizationRateMap), - "{what}" - ); link_and_validate(&a, &p).unwrap_or_else(|e| panic!("{what}: L3: {e}")); } } diff --git a/crates/metal2vulkan/src/tests/engine_rate_map/integer.rs b/crates/metal2vulkan/src/tests/engine_rate_map/integer.rs index e9bf2509c..a59c9aad1 100644 --- a/crates/metal2vulkan/src/tests/engine_rate_map/integer.rs +++ b/crates/metal2vulkan/src/tests/engine_rate_map/integer.rs @@ -1,6 +1,6 @@ //! The `uint2` overloads end to end, in the fixture `rate_map_integer` (compiled from our MSL by //! `scripts/regen-air-fixtures`): its kernel and its fragment function compile on every tested -//! profile, pass L3 and record no `RasterizationRateMap` note. On the CPU interpreter, which keeps +//! profile and pass L3. On the CPU interpreter, which keeps //! `float` denormals as lavapipe does, the kernel answers what `rate_map_data`'s shader decoders //! compute with denormals kept ([`kept_integer`]), for every layer and two past a map's, inside //! the screen, at and around each multiple of 32, past both extents and at far coordinates; where @@ -68,8 +68,7 @@ fn uints(c: &[[u32; 2]]) -> Vec { } /// Both `uint2` maps of every layer, as the shader decoders' arithmetic computes them with the -/// device's denormals ([`kept_integer`]), on every profile, with no `RasterizationRateMap` note; -/// Metal's answers at every point of a map's own layers. +/// device's denormals ([`kept_integer`]), on every profile; Metal's answers at every point of a map's own layers. #[test] fn the_integer_maps_answer_as_metal() { let Some(bc) = fixture() else { @@ -81,11 +80,6 @@ fn the_integer_maps_answer_as_metal() { let p = profile_with(stem); for entry in ["rate_map_integer", "rate_map_integer_pixel"] { let a = compile(&bc, entry, &p).unwrap_or_else(|e| panic!("{what} {entry}: {e}")); - assert!( - !a.precision.contains(&PrecisionNote::RasterizationRateMap), - "{what} {entry}: {:?}", - a.precision - ); link_and_validate(&a, &p).unwrap_or_else(|e| panic!("{what} {entry}: L3: {e}")); } let (plan, m) = typed_module(&bc, "rate_map_integer", &p).expect("module"); diff --git a/crates/metal2vulkan/tests/api_signatures.tsv b/crates/metal2vulkan/tests/api_signatures.tsv index a9afc57e4..36ba64445 100644 --- a/crates/metal2vulkan/tests/api_signatures.tsv +++ b/crates/metal2vulkan/tests/api_signatures.tsv @@ -70,7 +70,6 @@ assoc-const metal2vulkan::bind::RootTable::SINK_HOST_OFFSET pub const SINK_HOST_ assoc-const metal2vulkan::bind::StatusBits::CUBIC_ARGUMENT_SAMPLER pub const CUBIC_ARGUMENT_SAMPLER: StatusBits assoc-const metal2vulkan::bind::StatusBits::MESH_GRID_DISCARDED pub const MESH_GRID_DISCARDED: StatusBits assoc-const metal2vulkan::bind::StatusBits::MESH_GRID_PAST_LIMITS pub const MESH_GRID_PAST_LIMITS: StatusBits -assoc-const metal2vulkan::bind::StatusBits::REPLAY_FAULT pub const REPLAY_FAULT: StatusBits assoc-const metal2vulkan::bind::StatusBits::RESIDENT_MISS pub const RESIDENT_MISS: StatusBits assoc-const metal2vulkan::bind::TexelRows::FIRST pub const FIRST: usize assoc-const metal2vulkan::bind::TexelRows::HEIGHT pub const HEIGHT: usize @@ -244,7 +243,6 @@ assoc-const-value metal2vulkan::bind::RootTable::SINK_HOST_OFFSET (SINK_ROOT * E assoc-const-value metal2vulkan::bind::StatusBits::CUBIC_ARGUMENT_SAMPLER StatusBits(1 <<3) assoc-const-value metal2vulkan::bind::StatusBits::MESH_GRID_DISCARDED StatusBits(1 <<5) assoc-const-value metal2vulkan::bind::StatusBits::MESH_GRID_PAST_LIMITS StatusBits(1 <<4) -assoc-const-value metal2vulkan::bind::StatusBits::REPLAY_FAULT StatusBits(1 <<1) assoc-const-value metal2vulkan::bind::StatusBits::RESIDENT_MISS StatusBits(1 <<0) assoc-const-value metal2vulkan::bind::TexelRows::FIRST 3 assoc-const-value metal2vulkan::bind::TexelRows::HEIGHT 1 @@ -2131,8 +2129,6 @@ field metal2vulkan::bind::StageTable.threadgroup_lengths pub threadgroup_lengths field metal2vulkan::bind::StatusReport.cubic_argument_sampler pub cubic_argument_sampler: bool field metal2vulkan::bind::StatusReport.mesh_grid_discarded pub mesh_grid_discarded: bool field metal2vulkan::bind::StatusReport.mesh_grid_past_limits pub mesh_grid_past_limits: bool -field metal2vulkan::bind::StatusReport.replay_fault pub replay_fault: bool -field metal2vulkan::bind::StatusReport.replay_faults pub replay_faults: ReplayFaults field metal2vulkan::bind::StatusReport.resident_miss pub resident_miss: bool field metal2vulkan::bind::StatusReport.resident_misses pub resident_misses: u32 field metal2vulkan::bind::TessellationFactorBuffer.instance_stride pub instance_stride: u64 @@ -6516,7 +6512,6 @@ method metal2vulkan::bind::RasterizationRateMap::screen_size pub fn screen_size( method metal2vulkan::bind::RasterizationRateMap::screen_to_physical pub fn screen_to_physical(&self, c: [f32; 2], layer: u32) -> [f32; 2] method metal2vulkan::bind::RasterizationRateMap::to_bytes pub fn to_bytes(&self) -> Vec method metal2vulkan::bind::RasterizationRateMap::words pub fn words(&self) -> &[u32] -method metal2vulkan::bind::RateMapAxis::physical_extent pub fn physical_extent(&self) -> u32 method metal2vulkan::bind::RateMapDescriptor::new pub fn new(screen_size: [u32; 2]) -> RateMapDescriptor method metal2vulkan::bind::RateMapLayerDescriptor::new pub fn new(horizontal: Vec, vertical: Vec) -> RateMapLayerDescriptor method metal2vulkan::bind::SamplerDescriptor::new pub fn new() -> SamplerDescriptor @@ -7276,10 +7271,8 @@ struct metal2vulkan::bind::PushFieldPlacement #[cfg_attr(feature = "serde", deri struct metal2vulkan::bind::PushTemplate #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[derive(Clone, Debug, Default, PartialEq, Eq, Hash)] #[non_exhaustive] pub struct PushTemplate struct metal2vulkan::bind::PvrtcDecode #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[non_exhaustive] pub struct PvrtcDecode struct metal2vulkan::bind::RasterizationRateMap #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub struct RasterizationRateMap -struct metal2vulkan::bind::RateMapAxis #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub struct RateMapAxis struct metal2vulkan::bind::RateMapDescriptor #[derive(Clone, Debug, PartialEq)] #[non_exhaustive] pub struct RateMapDescriptor struct metal2vulkan::bind::RateMapLayerDescriptor #[derive(Clone, Debug, Default, PartialEq)] #[non_exhaustive] pub struct RateMapLayerDescriptor -struct metal2vulkan::bind::ReplayFaults #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] pub struct ReplayFaults(pub u32) struct metal2vulkan::bind::ResidentRange #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[non_exhaustive] pub struct ResidentRange struct metal2vulkan::bind::ResourceUse #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[non_exhaustive] pub struct ResourceUse struct metal2vulkan::bind::RootTable #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[derive(Clone, Debug, PartialEq, Eq, Hash)] #[non_exhaustive] pub struct RootTable @@ -8928,7 +8921,6 @@ variant metal2vulkan-runtime::PrecisionNote::NativeTranscendentals NativeTransce variant metal2vulkan-runtime::PrecisionNote::PixelSamplerScaling PixelSamplerScaling variant metal2vulkan-runtime::PrecisionNote::QuadsCountedBeforeDiscard QuadsCountedBeforeDiscard variant metal2vulkan-runtime::PrecisionNote::QuadsSplitByClipping QuadsSplitByClipping -variant metal2vulkan-runtime::PrecisionNote::RasterizationRateMap RasterizationRateMap variant metal2vulkan-runtime::PrecisionNote::ReductionOrder ReductionOrder variant metal2vulkan-runtime::PrecisionNote::RestrictedDepthRange RestrictedDepthRange variant metal2vulkan-runtime::PrecisionNote::RotatedBlendRounding RotatedBlendRounding @@ -9218,8 +9210,6 @@ variant metal2vulkan::bind::PushHole::ReplayRegionAddress ReplayRegionAddress { variant metal2vulkan::bind::PushHole::RootTableAddress RootTableAddress { stages: vk::ShaderStageFlags, offset: u32 } variant metal2vulkan::bind::RateMapError::ExtentMismatch ExtentMismatch { layer: usize, axis: usize } variant metal2vulkan::bind::RateMapError::Granularity Granularity { granularity: u32 } -variant metal2vulkan::bind::RateMapError::LayerCount LayerCount { count: usize } -variant metal2vulkan::bind::RateMapError::NoLayers NoLayers variant metal2vulkan::bind::RateMapError::NoSamples NoSamples { layer: usize, axis: usize } variant metal2vulkan::bind::RateMapError::OffsetTie OffsetTie { tile: usize } variant metal2vulkan::bind::RateMapError::ScreenExtent ScreenExtent { extent: u32 } @@ -9232,7 +9222,6 @@ variant metal2vulkan::bind::ResourceClass::Texture Texture(TextureFacts) variant metal2vulkan::bind::SamplerSource::Immutable Immutable variant metal2vulkan::bind::SamplerSource::Neutral Neutral(NeutralResource) variant metal2vulkan::bind::SamplerSource::Slot Slot { slot: SlotRef, compare: bool, integer: bool, opaque_black: OpaqueBlackBorder } -variant metal2vulkan::bind::StatusWord::ReplayFaults ReplayFaults variant metal2vulkan::bind::StatusWord::ResidentMisses ResidentMisses variant metal2vulkan::bind::StatusWord::SeqCstFences SeqCstFences variant metal2vulkan::bind::StatusWord::Status Status @@ -10364,7 +10353,6 @@ variant metal2vulkan::pipeline::PrecisionNote::NativeTranscendentals NativeTrans variant metal2vulkan::pipeline::PrecisionNote::PixelSamplerScaling PixelSamplerScaling variant metal2vulkan::pipeline::PrecisionNote::QuadsCountedBeforeDiscard QuadsCountedBeforeDiscard variant metal2vulkan::pipeline::PrecisionNote::QuadsSplitByClipping QuadsSplitByClipping -variant metal2vulkan::pipeline::PrecisionNote::RasterizationRateMap RasterizationRateMap variant metal2vulkan::pipeline::PrecisionNote::ReductionOrder ReductionOrder variant metal2vulkan::pipeline::PrecisionNote::RestrictedDepthRange RestrictedDepthRange variant metal2vulkan::pipeline::PrecisionNote::RotatedBlendRounding RotatedBlendRounding diff --git a/crates/metal2vulkan/tests/api_surface.rs b/crates/metal2vulkan/tests/api_surface.rs index a425f476c..a9aa4a51d 100644 --- a/crates/metal2vulkan/tests/api_surface.rs +++ b/crates/metal2vulkan/tests/api_surface.rs @@ -514,13 +514,11 @@ surface! { struct StatusBits E; struct StatusReport N; enum StatusWord N; - struct ReplayFaults E; const DRAW_ARGUMENT_BYTES; const DRAW_INDEX_ENTRY_BYTES; const MERGED_REST_FIRST; struct FunctionTableSnapshot O; struct RasterizationRateMap O; - struct RateMapAxis O; struct RateMapDescriptor N; struct RateMapLayerDescriptor N; enum RateMapError N; diff --git a/docs/API.md b/docs/API.md index 8908d90ab..c62c32612 100644 --- a/docs/API.md +++ b/docs/API.md @@ -2007,10 +2007,6 @@ bound. differs from Metal's by at most its change over half the pixel's diagonal, and a centroid varying by at most its change across the pixel's covered area; exact where the device evaluates a read where Metal does. -- `metal2vulkan-degrade-rasterization-rate-map` (precision). `PrecisionNote::RasterizationRateMap`: - A render pass drawn by regions over a rasterization-rate map that is not the identity: its - regions' lines are this crate's tiles' exact lines, where Apple's are its fixed-point ones, so a - fragment's evaluated point lies within a bounded distance of Metal's. - `metal2vulkan-degrade-bicubic-filter-arithmetic` (precision). `PrecisionNote::BicubicFilterArithmetic`: a filter emulated by fetches (Metal's bicubic filter on every format, and an extended-range texture's linear, 3D and linear-mip-filter samples) sums its