Announce device-subpixel-snap where the band draws on a driver not measured to snap a half step as Metal

line_widths' wide_lines_draw_metal_s_parallelograms (and its exact-answers
twin) failed on the RTX 5080 Laptop GPU (NVIDIA 615.71.09, b5080 entries
nvlane-lane2-a2f and nvlane-lane3-a2f at a2f4c50f94) and on lavapipe
(llvmpipe, LLVM 23.1.1, Mesa 26.2.4, nvlane-lvplines-a2f) at "rows
offset by (r - 32) / 512 width 0": both drew the map's rows 18 to 49
where Metal draws 17 to 48. Before a5e1d20bd9 the 5080 failed earlier in
that test, at "LANE strip 1", so this case had not run there.

The case draws lines at y = r + 0.5 + (r - 32) / 512, which the band
draws at width 1/16 (half width 16/512). band.rs leaves the corners'
snap to 1/256 pixel to the device's rasterizer, where Metal snaps the
endpoints first, a half step rounded up, and offsets them after; the two
agree on the grid, and for odd r the endpoint lies half a step off it.
Half steps rounded down give the device's map exactly: odd r covers its
row for r in 19..49 and even r for 18..48, against Metal's 17..48 (round
to even gives the same rows here). The band's arithmetic is exact at
these values (side 64, every conversion a power of two), so the rounding
is the rasterizer's, which Vulkan leaves to the implementation: the
device's own answer, so it is announced, not emulated.

- DriverFact::SubpixelSnapIsMetals (appended): the driver's rasterizer
  snaps a vertex half a step off its 1/256-pixel grid as Metal snaps a
  line's endpoint, up. Row: MoltenVK on the M3 Max (APPLE9), where this
  lane's maps pass (a2f4c50f94, m3-max-994: 1847 of 1847). NVIDIA and
  lavapipe drew otherwise, so neither takes it; every other driver is
  unmeasured.
- Degradation::DeviceSubpixelSnap ("device-subpixel-snap", precision):
  announced by line_route at each draw the band draws on a driver
  without the fact. Its catalogue entry in docs/API.md, a FAST-PATHS
  known gap, and the conformance suite's NATIVE_NOTES (the device's own
  answer) take it. band.rs's and line_width.rs's docs say where the two
  snaps differ.
- The lane announces it per draw; a band case with a vertex an odd
  multiple of 1/512 pixel off (in framebuffer pixels) is left unchecked
  where it is announced, and every other band case is still compared
  with Metal's map. Held to the fact: never announced where the driver
  has it, and some case unchecked where it does not and the device
  tessellates. degrade_notices lists SUBPIXEL_SNAP as its site.
- driver_facts' profile test expects the fact on moltenvk-m3.

Note sets: MoltenVK on the M3 Max takes the fact, so it announces
nothing new. NVIDIA, lavapipe, RADV and ANV now announce
device-subpixel-snap at band draws. api_signatures.tsv gains the three
items (blessed); docs/REFUSALS.md regenerates unchanged. driver_facts.rs,
degradation.rs and line_width.rs are runtime pin inputs, so
RUNTIME_VERSION and the pin are the orchestrator's to move.

Verified: cargo fmt; scripts/api-signatures --check after --bless;
refusal_surface.py. Builds, clippy, the unit tests and the 5080, M3 and
lavapipe lane reruns are in the next jobs.

(cherry picked from commit 2574f4bb084656035feae4ef714bac96f720f497)
This commit is contained in:
Anees Iqbal committed 2026-11-05 05:11:14 -08:00
1 parent 21ed65814e
commit d261d6ed46
11 files changed
+180 -24

No files matched your search

@@ -460,8 +460,9 @@ pub fn set_past_layout_notice() -> crate::allowance::Allowance {
/// each step to `half`);
/// - **resolves**: `device-rounded-resolve`;
/// - **coverage**: the device's own conversion of a fragment's alpha to its coverage under
/// alpha-to-coverage (`device-alpha-coverage`), and its choice of the pixel a width-1 line covers
/// at a vertex two pixels' diamonds share (`device-line-ties`).
/// alpha-to-coverage (`device-alpha-coverage`), its choice of the pixel a width-1 line covers
/// at a vertex two pixels' diamonds share (`device-line-ties`), and its rasterizer's snap of a
/// line band's corner half a step off its subpixel grid (`device-subpixel-snap`).
///
/// **What is not here**, and stays each case's to declare: a note of what the device **lacks**
/// (`device-signed-zero-inf-nan`, `device-anisotropic-filter`, `device-point-size`,
@@ -515,6 +516,7 @@ pub const NATIVE_NOTES: &[metal2vulkan_runtime::Degradation] = {
D::DeviceRoundedResolve,
D::DeviceAlphaCoverage,
D::DeviceLineTies,
D::DeviceSubpixelSnap,
]
};
@@ -2185,6 +2185,15 @@ degradations! {
"a line through a vertex two pixels' diamonds share covers the pixel the device \
chooses, where Metal covers the lower one, so such a pixel, and the rest of a line \
that runs along such vertices, can lie a row or a column from Metal's";
/// A draw whose lines, or a triangle's edges in fill mode `Lines`, the runtime's band draws
/// (a width other than 1 the device's own lines do not draw as Metal's) on a driver not
/// measured to snap a vertex half a step off its 1/256-pixel subpixel grid as Metal snaps
/// a line's endpoint ([`metal2vulkan::device::DriverFact::SubpixelSnapIsMetals`],
/// `render/line_width.rs`): the band's corners, the endpoints offset by a multiple of 1/32
/// pixel, are snapped by the device's rasterizer, where Metal snaps the endpoints up first,
/// so the two differ only where an endpoint lies half a step off the grid.
DeviceSubpixelSnap = "device-subpixel-snap", Precision,
"a line's band whose endpoint lies half a 1/256-pixel step off the subpixel grid is snapped the way the device rounds, where Metal rounds the endpoint up, so a pixel whose centre lies within that half step of the band's edge can be drawn, or left out, a row or a column from Metal's";
/// A draw of lines, or an emulated mesh draw of lines, under Apple's last provoking vertex
/// (`setProvokingVertexMode:` 1), of a pipeline state that reads it (a flat input, or a
/// slice or viewport its vertex function selects), on a device without
@@ -67,7 +67,12 @@
//! either way, and a triangle rotated faces alike. The band's depth bias is the device's, of
//! each of its triangles' own slope and depths, where Metal's is the triangle's: a draw of
//! edges as the band under a slope factor, or a constant factor over a float depth, is announced
//! (`Degradation::WideEdgeDepthBias`).
//! (`Degradation::WideEdgeDepthBias`). The band's corners, its endpoints offset by a multiple of
//! 1/32 pixel, are snapped by the device's rasterizer, where Metal snaps the endpoints first: the
//! two agree but for an endpoint half a 1/256-pixel step off the grid, which Metal rounds up and
//! the device as it rounds, so a draw the band draws on a driver not measured to round it up
//! (`DriverFact::SubpixelSnapIsMetals`) is announced (`Degradation::DeviceSubpixelSnap`, at each
//! draw).
//! - **Nearest**: the device's own lines at the width nearest Metal's they draw (`w'`, 1/16 at 0,
//! clamped into `lineWidthRange` where it enables `wideLines`, else 1), where neither route above
//! draws `w'`, announced (`Degradation::LinesAtNearestWidth`, with why): a mesh draw's lines and
@@ -392,8 +397,9 @@ impl ShapeInputs<'_> {
/// The route `call`'s draw of `pipeline` as `assembly` draws its lines by at the encoder's
/// width (the module docs), of a draw that may draw a primitive where `primitives`
/// ([`draws_primitives`]); announcing a device line that differs from Metal's, one at the
/// nearest width, and the device's lines at width 1 on a driver whose ties are not measured to
/// be Metal's, where `announce`.
/// nearest width, the device's lines at width 1 on a driver whose ties are not measured to be
/// Metal's, and the band on a driver whose subpixel snap is not measured to be Metal's, where
/// `announce`.
pub(super) fn line_route(
&self,
call: &'static str,
@@ -445,10 +451,14 @@ impl ShapeInputs<'_> {
LineRoute::Nearest { width, .. } => width == 1.0,
LineRoute::Device { .. } | LineRoute::Band { .. } => false,
};
let ties = (self.device.properties().driver_facts).contains(&DriverFact::LineTiesAreMetals);
if announce && width_one && !ties {
let facts = &self.device.properties().driver_facts;
if announce && width_one && !facts.contains(&DriverFact::LineTiesAreMetals) {
announce_line_ties(self.device, call);
}
let banded = matches!(route, LineRoute::Band { .. });
if announce && banded && !facts.contains(&DriverFact::SubpixelSnapIsMetals) {
announce_subpixel_snap(self.device, call);
}
route
}
}
@@ -467,6 +477,21 @@ fn announce_line_ties(device: &crate::Device, call: &'static str) {
});
}
/// Announce `call`'s draw of lines or edges as bands on a driver not measured to snap a vertex
/// half a step off its subpixel grid as Metal snaps a line's endpoint (the module docs).
fn announce_subpixel_snap(device: &crate::Device, call: &'static str) {
device.degrade(Degradation::DeviceSubpixelSnap, || {
(
format!("{call}: a draw of lines or edges as bands"),
"the device's driver is not measured to snap a vertex half a step off its \
1/256-pixel subpixel grid as Metal snaps a line's endpoint \
(DriverFact::SubpixelSnapIsMetals): the band's corners are snapped by the device's \
rasterizer, Metal's endpoints up before they are offset"
.to_owned(),
)
});
}
/// Announce `call`'s draw of lines `w` pixels wide by the device's own lines, which differ from
/// Metal's parallelogram there (the module docs).
fn announce_device_lines(device: &crate::Device, call: &'static str, w: f32) {
@@ -187,7 +187,7 @@ use super::indirect_dispatches::INDIRECT_DISPATCHES;
use super::indirect_executions::{NIL_OFFSETS, RELEASED_STATES};
use super::indirect_host_steps::HOST_STEPS;
use super::kept_buffer_bytes::KEPT_BYTES;
use super::line_widths::{LINE_TIES, WIDE_LINES};
use super::line_widths::{LINE_TIES, SUBPIXEL_SNAP, WIDE_LINES};
use super::linear_attachments::{CHOSEN_COPIES, LINEAR_COPIES};
use super::memoryless::MEMORYLESS_TEXEL_BUFFERS;
use super::mesh_draws::EMULATED_MESH;
@@ -527,6 +527,7 @@ fn every_kind_has_a_site_a_lane_test_takes() {
&PROVOKING,
&WIDE_LINES,
&LINE_TIES,
&SUBPIXEL_SNAP,
&CAPPED_ANISOTROPY,
&NOT_MIPMAPPED_ANISOTROPY,
&IN_PLACE,
@@ -38,7 +38,12 @@
//! at width 1 on a driver not measured to break a tie at a vertex two pixels' diamonds share as
//! Metal does (`DriverFact::LineTiesAreMetals`: the RTX 5080 Laptop GPU draws the lane's strip's
//! diagonal a row higher, and lavapipe, Mesa 26.2.4, leaves out its first pixel) is announced
//! (`device-line-ties`) and left unchecked, and only there.
//! (`device-line-ties`) and left unchecked, and only there. A draw the band draws on a driver not
//! measured to snap a vertex half a step off its 1/256-pixel subpixel grid as Metal snaps a line's
//! endpoint (`DriverFact::SubpixelSnapIsMetals`: the RTX 5080 Laptop GPU and lavapipe draw the
//! lines offset from rows of centres by `(r - 32) / 512` a row lower) is announced
//! (`device-subpixel-snap`) and, where a vertex lies half a step off the grid, left unchecked;
//! every other such case is compared as any other.
//! Nothing is refused. A draw of
//! no complete primitive (the consumer's triangles of 1 and 2 vertices, by vertices and by
//! indices, under the last provoking vertex) draws nothing and takes no route. Not covered:
@@ -81,6 +86,11 @@ pub(super) const WIDE_LINES: [Degradation; 3] = [
/// (`DriverFact::LineTiesAreMetals`).
pub(super) const LINE_TIES: [Degradation; 1] = [Degradation::DeviceLineTies];
/// The kind a draw the band draws announces on a driver not measured to snap a vertex half a step
/// off its 1/256-pixel subpixel grid as Metal snaps a line's endpoint
/// (`DriverFact::SubpixelSnapIsMetals`).
pub(super) const SUBPIXEL_SNAP: [Degradation; 1] = [Degradation::DeviceSubpixelSnap];
/// What a lane's draw of the device's lines at width 1 announces on `device`: [`LINE_TIES`] where
/// its driver lacks `DriverFact::LineTiesAreMetals`, nothing where it has it.
pub(super) fn line_ties(device: &Device) -> &'static [Degradation] {
@@ -203,6 +213,9 @@ struct LineFacts {
exact_policy: bool,
/// The driver breaks a tie at a vertex two pixels' diamonds share as Metal does.
ties: bool,
/// The driver snaps a vertex half a step off its subpixel grid as Metal snaps a line's
/// endpoint.
snaps: bool,
}
impl LineFacts {
@@ -220,6 +233,7 @@ impl LineFacts {
parallelograms: limits.non_strict_wide_lines_use_parallelogram,
exact_policy: compile.policy().wide_lines == WideLinePolicy::Exact,
ties: (device.properties().driver_facts).contains(&DriverFact::LineTiesAreMetals),
snaps: (device.properties().driver_facts).contains(&DriverFact::SubpixelSnapIsMetals),
}
}
@@ -1332,14 +1346,17 @@ struct Found {
/// Cases the device's lines drew at width 1 on a driver whose ties are not measured to be
/// Metal's, announced (`device-line-ties`): left unchecked.
ties: usize,
/// Cases the band drew with a vertex half a step off the subpixel grid on a driver whose snap
/// is not measured to be Metal's, announced (`device-subpixel-snap`): left unchecked.
snaps: usize,
/// The device's lines.
facts: Option<LineFacts>,
}
/// The notices among `messages`' since the last take: the `DeviceWideLines`,
/// `LinesAtNearestWidth`, `WideEdgeDepthBias` and `DeviceLineTies` ones, and the reasons of the
/// nearest-width ones.
fn announced_lines(messages: &Messages) -> ([usize; 4], Vec<String>) {
/// `LinesAtNearestWidth`, `WideEdgeDepthBias`, `DeviceLineTies` and `DeviceSubpixelSnap` ones, and
/// the reasons of the nearest-width ones.
fn announced_lines(messages: &Messages) -> ([usize; 5], Vec<String>) {
let notices = messages.take_notices();
let notices: Vec<_> = notices
.iter()
@@ -1352,7 +1369,28 @@ fn announced_lines(messages: &Messages) -> ([usize; 4], Vec<String>) {
.map(|n| n.reason.clone())
.collect();
let [wide, nearest, biased] = WIDE_LINES.map(count);
([wide, nearest, biased, count(LINE_TIES[0])], reasons)
let [ties, snaps] = [LINE_TIES[0], SUBPIXEL_SNAP[0]].map(count);
([wide, nearest, biased, ties, snaps], reasons)
}
/// Whether a vertex of `shot`'s draws lies half a 1/256-pixel step off the subpixel grid, in the
/// framebuffer of `shot.side` pixels a side: an odd multiple of 1/512 pixel, where the band's
/// corners, snapped by the device's rasterizer, can lie a step from Metal's.
fn half_step_vertex(shot: &Shot) -> bool {
let half_side = shot.side as f32 / 2.0;
let half_step = |p: f32| {
let steps = p * 512.0;
steps == steps.round() && (steps as i64).rem_euclid(2) == 1
};
(shot.encoders.iter().flatten()).any(|draw| {
draw.points.iter().any(|&[x, y]| {
let [x, y] = match draw.clip {
true => [(x + 1.0) * half_side, (1.0 - y) * half_side],
false => [x, y],
};
half_step(x) || half_step(y)
})
})
}
/// The draws of each route between two work counts: the band's, the device's lines' at Metal's
@@ -1405,7 +1443,9 @@ fn printed(drawn: &Drawn, shot: &Shot, check: Check, blocks: &[String]) -> Vec<S
/// a depth bias that can differ from Metal's, where the device's lines draw it at another width
/// than Metal's, compared with Metal's map at width 1 where that width is 1, or where they draw it
/// at width 1 on a driver whose ties are not measured to be Metal's, `device-line-ties`, announced
/// exactly there); and each draw at a width other than 1 counted by a route. Nothing is refused.
/// exactly there, or where the band draws a vertex half a step off the subpixel grid on a driver
/// whose snap is not measured to be Metal's, `device-subpixel-snap`, announced at every band
/// draw there); and each draw at a width other than 1 counted by a route. Nothing is refused.
fn run(policy: DevicePolicy) -> Found {
let cache = ScratchCache::new().unwrap();
let messages = Messages::default();
@@ -1413,7 +1453,10 @@ fn run(policy: DevicePolicy) -> Found {
{
let device = validated_device_with(TEST_DEVICE, &messages, cache.path(), |options| {
options.policy = policy;
options.announce_each = WIDE_LINES.into_iter().chain(LINE_TIES).collect();
options.announce_each = (WIDE_LINES.into_iter())
.chain(LINE_TIES)
.chain(SUBPIXEL_SNAP)
.collect();
})
.unwrap();
let facts = LineFacts::of(&device);
@@ -1472,7 +1515,8 @@ fn run(policy: DevicePolicy) -> Found {
bands += band;
device_lines += own;
nearest_lines += nearest;
let ([announced, announced_nearest, biased, ties], _) = announced_lines(&messages);
let ([announced, announced_nearest, biased, ties, snaps], _) =
announced_lines(&messages);
assert_eq!(
band + own + nearest,
shot.wide_draws(),
@@ -1503,6 +1547,19 @@ fn run(policy: DevicePolicy) -> Found {
found.ties += 1;
continue;
}
// The band's draws are announced on a driver without the fact, and nowhere else; a
// case of a vertex half a step off the grid is left unchecked there, every other one
// is Metal's.
if snaps > 0 {
assert!(
band > 0 && !facts.snaps,
"{name}: {key}: a subpixel snap notice"
);
if half_step_vertex(shot) {
found.snaps += 1;
continue;
}
}
if announced > 0 {
found.announced += 1;
continue;
@@ -1578,8 +1635,9 @@ fn run(policy: DevicePolicy) -> Found {
};
first_last.push((first, last));
}
// Their endpoints lie on the subpixel grid, so a band's snap notice leaves them Metal's.
match announced_lines(&messages).0 {
[_, _, _, ties] if ties > 0 => {
[_, _, _, ties, _] if ties > 0 => {
assert!(
!facts.ties,
"{name}: width {width}: line ties announced with the fact"
@@ -1587,8 +1645,8 @@ fn run(policy: DevicePolicy) -> Found {
found.ties += 1;
continue;
}
[0, 0, 0, _] => {}
[_, 0, _, _] => {
[0, 0, 0, _, _] => {}
[_, 0, _, _, _] => {
found.announced += 1;
continue;
}
@@ -1604,12 +1662,23 @@ fn run(policy: DevicePolicy) -> Found {
}
found.cases = cases.len() + quantized.len();
assert_eq!(
found.matched + found.announced + found.biased + found.nearest + found.ties,
found.matched
+ found.announced
+ found.biased
+ found.nearest
+ found.ties
+ found.snaps,
found.cases,
"{found:?}"
);
// The width-1 cases announce the driver's ties exactly where it lacks the fact.
// The width-1 cases announce the driver's ties exactly where it lacks the fact, and the
// band's half-step cases its snap, where the band draws them.
assert_eq!(found.ties > 0, !facts.ties, "{found:?}");
if facts.snaps || !tessellates {
assert_eq!(found.snaps, 0, "{found:?}");
} else {
assert!(found.snaps > 0, "{found:?}");
}
// Every measured map was drawn, but those the lane leaves to other lanes.
let undrawn: Vec<&str> = (blocks.keys())
.filter(|key| !accounted.contains(*key))
@@ -1656,7 +1725,7 @@ fn wide_lines_draw_metal_s_parallelograms() {
if facts.tessellates && found.announced == 0 {
assert_eq!(
found.matched,
found.cases - found.biased - found.ties,
found.cases - found.biased - found.ties - found.snaps,
"{found:?}"
);
assert!(found.edges_matched > 0, "{found:?}");
@@ -1678,7 +1747,7 @@ fn wide_lines_draw_metal_s_parallelograms_under_exact_answers() {
assert_eq!((found.announced, found.nearest), (0, 0), "{found:?}");
assert_eq!(
found.matched,
found.cases - found.biased - found.ties,
found.cases - found.biased - found.ties - found.snaps,
"{found:?}"
);
assert_eq!(found.edges_matched + found.biased, found.edges, "{found:?}");
@@ -1514,6 +1514,15 @@ pub enum DriverFact {
/// over it. On a driver without it the runtime announces `device-line-ties` at each draw whose
/// lines or edges the device's lines draw at width 1 (`render/line_width.rs`).
LineTiesAreMetals,
/// The driver's rasterizer snaps a vertex half a step off its 1/256-pixel subpixel grid as
/// Metal snaps a line's endpoint there: up. The runtime's band of a line or an edge
/// (`pipeline::link::band`) places its corners at the endpoint offset by a multiple of 1/32
/// pixel and leaves their snap to the rasterizer, where Metal snaps the endpoint first and
/// then offsets it: the two agree on the grid, and at a half step only where the driver
/// rounds it up. Vulkan leaves the rounding to the implementation. On a driver without it
/// the runtime announces `device-subpixel-snap` at each draw whose lines or edges the band
/// draws (`render/line_width.rs`).
SubpixelSnapIsMetals,
}
impl DriverFact {
@@ -1994,6 +2003,14 @@ const DYNAMIC_RESTART_WARNING: DriverDiagnostic = DriverDiagnostic {
/// such a vertex (3.5, 1.0), which Metal covers, so it does not take the fact. Every other driver
/// is unmeasured.
///
/// `SubpixelSnapIsMetals`, measured by `runtime_lane::line_widths` (Metal's maps of the probe's
/// lines at widths 0 and 1/16 offset from rows and columns of centres by `(r - 32) / 512` pixel,
/// half of them half a step off the grid, which the band draws): MoltenVK 1.4.2 on the M3 Max
/// under macOS 27.0.1, every map Metal's. NVIDIA's 615.71.09 on the RTX 5080 Laptop GPU and
/// lavapipe (llvmpipe on LLVM 23.1.1, Mesa 26.2.4) both draw the rows' map a row lower than
/// Metal's (rows 18 to 49 where Metal draws 17 to 48), as a half step rounded down gives, so
/// neither takes the fact. Every other driver is unmeasured.
///
/// MoltenVK 1.4.2 on the M3 Max under macOS 27.0.1 (2026-10-21, the runtime lanes in release
/// builds under `--cfg m2v_gpu`, each fact taken):
/// - Measured by the lane that measured its 1.4.1 row, which passed: `DepthImageKeepsDenormals`
@@ -2385,6 +2402,10 @@ pub(crate) const MEASURED: &[Measured<DriverFact>] = &[
device: Some(APPLE9),
..moltenvk_on_apple(DriverFact::LineTiesAreMetals)
},
Measured {
device: Some(APPLE9),
..moltenvk_on_apple(DriverFact::SubpixelSnapIsMetals)
},
];
/// Intel's `vendorID`.
@@ -417,6 +417,7 @@ const HEAP_COLORS: DriverFact = DriverFact::ColorImagesLieAsMetalHeapTextures;
const HEAP_MULTISAMPLE_COLORS: DriverFact =
DriverFact::MultisampleColorImagesLieAsMetalHeapTextures;
const LINE_TIES: DriverFact = DriverFact::LineTiesAreMetals;
const SUBPIXEL_SNAP: DriverFact = DriverFact::SubpixelSnapIsMetals;
/// Each committed profile's driver has the runtime's driver facts its rows name, on its vendor and
/// GPU, at its release as at any other.
@@ -553,6 +554,7 @@ fn the_committed_profiles_drivers_have_their_facts() {
HEAP_COLORS,
HEAP_MULTISAMPLE_COLORS,
LINE_TIES,
SUBPIXEL_SNAP,
],
),
("nvidia-pascal-linux", vec![DENORMALS, PLANES]),
@@ -33,7 +33,9 @@
//! `(sx, sy)` the draw pushes beside `h` (`PushField::LineBand`, the stage's own push range). The
//! rasterizer snaps each corner to the device's subpixel grid, where Metal snaps the endpoints to
//! 1/256 pixel and then offsets them: on a grid of 1/256 the two agree, `h` being a multiple of
//! 1/32 pixel.
//! 1/32 pixel, but for an endpoint half a step off the grid, which Metal rounds up and the
//! device's rasterizer as it rounds (`DriverFact::SubpixelSnapIsMetals`; the runtime announces
//! the band's draws on a driver without it).
//!
//! A line's corner `(u, v)` lies at endpoint `u` (0 the first, 1 the second), offset by `(2v - 1)
//! h`, so the two triangles cover the parallelogram exactly and wind alike in every direction
@@ -5123,6 +5123,7 @@ macro-member metal2vulkan-runtime::Degradation::DeviceRoundedResolve DeviceRound
macro-member metal2vulkan-runtime::Degradation::DeviceSampleLevel DeviceSampleLevel = "device-sample-level";
macro-member metal2vulkan-runtime::Degradation::DeviceSampling DeviceSampling = "device-sampling";
macro-member metal2vulkan-runtime::Degradation::DeviceSignedZeroInfNan DeviceSignedZeroInfNan = "device-signed-zero-inf-nan";
macro-member metal2vulkan-runtime::Degradation::DeviceSubpixelSnap DeviceSubpixelSnap = "device-subpixel-snap", Precision,
macro-member metal2vulkan-runtime::Degradation::DeviceTexelConversion DeviceTexelConversion = "device-texel-conversion";
macro-member metal2vulkan-runtime::Degradation::DeviceTranscendentals DeviceTranscendentals = "device-transcendentals";
macro-member metal2vulkan-runtime::Degradation::DeviceVertexConversion DeviceVertexConversion = "device-vertex-conversion";
@@ -11427,6 +11428,7 @@ variant metal2vulkan-runtime::DriverFact::ShadowCopyBackDispatchFaster ShadowCop
variant metal2vulkan-runtime::DriverFact::ShadowCopyInDispatchFaster ShadowCopyInDispatchFaster
variant metal2vulkan-runtime::DriverFact::SignallingSubmitsStallEvery1024 SignallingSubmitsStallEvery1024
variant metal2vulkan-runtime::DriverFact::SubmissionsWithoutSignalsMerge SubmissionsWithoutSignalsMerge
variant metal2vulkan-runtime::DriverFact::SubpixelSnapIsMetals SubpixelSnapIsMetals
variant metal2vulkan-runtime::DriverFact::TileStoreIsMetals TileStoreIsMetals
variant metal2vulkan-runtime::DriverFact::TimestampPoolsAreCounterSampleBuffers TimestampPoolsAreCounterSampleBuffers
variant metal2vulkan-runtime::DriverFact::TimestampsWaitForEveryQueue TimestampsWaitForEveryQueue
@@ -12680,6 +12682,7 @@ variant metal2vulkan::device::DriverFact::ShadowCopyBackDispatchFaster ShadowCop
variant metal2vulkan::device::DriverFact::ShadowCopyInDispatchFaster ShadowCopyInDispatchFaster
variant metal2vulkan::device::DriverFact::SignallingSubmitsStallEvery1024 SignallingSubmitsStallEvery1024
variant metal2vulkan::device::DriverFact::SubmissionsWithoutSignalsMerge SubmissionsWithoutSignalsMerge
variant metal2vulkan::device::DriverFact::SubpixelSnapIsMetals SubpixelSnapIsMetals
variant metal2vulkan::device::DriverFact::TileStoreIsMetals TileStoreIsMetals
variant metal2vulkan::device::DriverFact::TimestampPoolsAreCounterSampleBuffers TimestampPoolsAreCounterSampleBuffers
variant metal2vulkan::device::DriverFact::TimestampsWaitForEveryQueue TimestampsWaitForEveryQueue
Can't render this file because it is too large.
+13
View File
@@ -2951,6 +2951,19 @@ bound.
through a vertex two pixels' diamonds share covers the pixel the device chooses, where Metal
covers the lower one, so such a pixel, and the rest of a line that runs along such vertices, can
lie a row or a column from Metal's.
- `metal2vulkan-degrade-device-subpixel-snap` (precision). `DeviceSubpixelSnap`: A draw whose
lines, or a triangle's edges in fill mode `Lines`, the runtime's band draws (a width other than 1
that the device's own lines do not draw as Metal's), on a driver without
`DriverFact::SubpixelSnapIsMetals` (measured: MoltenVK on the M3 Max). Metal snaps a line's
endpoints to 1/256 pixel, a half step rounded up, then offsets them by half the width; the band
offsets them and leaves its corners' snap to the device's rasterizer, whose rounding of a half
step Vulkan leaves to the implementation. The two agree but where an endpoint lies half a step off
the grid (on NVIDIA's 615.71.09 on the RTX 5080 Laptop GPU and on lavapipe, lines offset from
rows of centres by odd multiples of 1/512 pixel draw a row lower, as a half step rounded down
gives). Cost: a line's band whose
endpoint lies half a 1/256-pixel step off the subpixel grid is snapped the way the device rounds,
where Metal rounds the endpoint up, so a pixel whose centre lies within that half step of the
band's edge can be drawn, or left out, a row or a column from Metal's.
- `metal2vulkan-degrade-provoking-vertex-lines` (precision). `ProvokingVertexLines`: A draw of
lines, or an emulated mesh draw of lines, under Apple's last provoking vertex
(`setProvokingVertexMode:` 1), of a pipeline state that reads it (a flat input, or a slice or
+9
View File
@@ -888,6 +888,15 @@ driver's. Each is open work.
of the line lane's strip, which starts on such a vertex, so it announces too; RADV and ANV unrun,
so announced there.
- **A line band's endpoint half a subpixel step off the grid off the M3 Max**
(`runtime_lane::line_widths`, the lines offset from rows and columns of centres by
`(r - 32) / 512`): the band leaves its corners' snap to 1/256 pixel to the device's rasterizer,
where Metal snaps the endpoints first, a half step rounded up. NVIDIA's 615.71.09 on the RTX 5080
Laptop GPU and lavapipe (Mesa 26.2.4) draw those lines a row lower than Metal's, as a half step
rounded down gives. Vulkan leaves that rounding to the implementation. Announced (`device-subpixel-snap`) at
each band draw on a driver without `DriverFact::SubpixelSnapIsMetals` (MoltenVK on the M3 Max has
it); RADV and ANV unrun, so announced there.
- **Lines under Apple's `setLineWidth:` at a width other than 1 that neither route draws as Metal**
(`render/line_width.rs`). Drawn by the device's own lines at the nearest width they draw (1 pixel
without `wideLines`), announced `lines-at-nearest-width`: a mesh draw's lines and edges and a