diff --git a/crates/metal2vulkan/src/pipeline/artifact.rs b/crates/metal2vulkan/src/pipeline/artifact.rs index 8132422a3..91fb7d33e 100644 --- a/crates/metal2vulkan/src/pipeline/artifact.rs +++ b/crates/metal2vulkan/src/pipeline/artifact.rs @@ -826,8 +826,11 @@ pub enum PrecisionNote { FastMathRewrites, /// A tessellation pipeline's vertex order: Metal's clockwise output winding is declared /// `VertexOrderCcw` and its counter-clockwise one `VertexOrderCw`, as MoltenVK maps them under - /// Vulkan's default upper-left domain origin. Not read on Metal: the other mapping reverses the - /// facing of every generated triangle. + /// Vulkan's default upper-left domain origin. Measured for both windings against Metal's bytes + /// (recorded on an Apple M3 Max) by a consumer's device test, + /// `tessellation_states_tessellate_as_metals`, on RADV (Radeon 780M, RX 7900 XTX), NVIDIA + /// Turing and MoltenVK; other drivers are not measured, where the other mapping would reverse + /// the facing of every generated triangle. TessellationWinding, /// A tessellation pipeline's factors at the edges of Metal's stated rules: a subnormal edge /// factor is positive and does not cull (its level is the range's lower end), where a flush to diff --git a/crates/metal2vulkan/src/pipeline/link/tessellation/control.rs b/crates/metal2vulkan/src/pipeline/link/tessellation/control.rs index d2892cc88..ae4962684 100644 --- a/crates/metal2vulkan/src/pipeline/link/tessellation/control.rs +++ b/crates/metal2vulkan/src/pipeline/link/tessellation/control.rs @@ -25,8 +25,10 @@ //! `position_in_patch` lane for lane, Metal's clockwise output winding is `VertexOrderCcw` and its //! counter-clockwise one `VertexOrderCw`: MoltenVK maps Vulkan's orders to Metal's windings //! reversed (`mvkMTLWindingFromSpvExecutionMode`, with SPIRV-Cross passing `gl_TessCoord` through -//! unchanged for that origin). That is read from MoltenVK's conformant mapping, not observed on -//! Metal (an A-track reading). +//! unchanged for that origin). Measured: a consumer's device test, +//! `tessellation_states_tessellate_as_metals`, matches Metal's bytes (recorded on an Apple M3 Max) +//! for both windings, the clockwise default and the counter-clockwise one, on RADV (Radeon 780M, +//! RX 7900 XTX), NVIDIA Turing and MoltenVK; other drivers are not measured. //! //! **The patch index**. Metal's patch index (`[[patch_id]]`, the element of the patch's control //! points and per-patch attributes) is the patch's position, or, for a draw with a patch index @@ -104,8 +106,9 @@ //! (NaN, zero, negative) or upper end (`+∞`). The pushed scale is a positive `half` or 2^32, so //! the scaled product lies in `[2^-48, 2^48)`: every float the stage computes is finite. //! -//! Read from Metal's documentation but not observed, and noted on the pipeline's evaluation stage -//! ([`Control::notes`]): the output winding's vertex order; whether the fractional partitions' +//! Noted on the pipeline's evaluation stage ([`Control::notes`]): the output winding's vertex +//! order, measured on four drivers (above) and not on the rest; and, read from Metal's +//! documentation but not observed: whether the fractional partitions' //! levels take the scaled factor in `float` (Metal's `integer` levels take it unrounded, and a //! product below `half`'s least subnormal does not cull); a subnormal edge factor and a NaN inside //! factor under the fractional partitions (under `integer`, Metal's answer is this stage's); and @@ -207,10 +210,11 @@ impl Control { factors::factor_bytes(domain) } - /// The readings this control stage takes without a Metal observation, as precision notes - /// (the module docs): the winding and the edge cases always, the scale when it is enabled, - /// and the instance addressing under a per-instance step function. Link notes them on the - /// pipeline's evaluation stage ([`super::note_evaluation_stage`]). + /// The readings this control stage takes without a Metal observation on every driver, as + /// precision notes (the module docs): the winding (measured on four drivers) and the edge + /// cases always, the scale when it is enabled, and the instance addressing under a + /// per-instance step function. Link notes them on the pipeline's evaluation stage + /// ([`super::note_evaluation_stage`]). pub fn notes(&self) -> Vec { let mut notes = vec![ PrecisionNote::TessellationWinding, diff --git a/docs/API.md b/docs/API.md index 07981d898..8765e9997 100644 --- a/docs/API.md +++ b/docs/API.md @@ -4737,7 +4737,10 @@ bound. - `metal2vulkan-degrade-tessellation-winding` (precision). `PrecisionNote::TessellationWinding`: A tessellation pipeline's vertex order: Metal's clockwise output winding is declared `VertexOrderCcw` and its counter-clockwise one `VertexOrderCw`, as MoltenVK maps them under - Vulkan's default upper-left domain origin. + Vulkan's default upper-left domain origin. Measured for both windings against Metal's bytes + (recorded on an Apple M3 Max) by a consumer's device test, + `tessellation_states_tessellate_as_metals`, on RADV (Radeon 780M, RX 7900 XTX), NVIDIA Turing + and MoltenVK; other drivers are not measured. - `metal2vulkan-degrade-tessellation-factor-edge-cases` (precision). `PrecisionNote::TessellationFactorEdgeCases`: A tessellation pipeline's factors at the edges of Metal's stated rules: a subnormal edge factor is positive and does not cull (its level is the