diff --git a/crates/metal2vulkan-runtime/src/degradation.rs b/crates/metal2vulkan-runtime/src/degradation.rs index 376bb621f..012803af3 100644 --- a/crates/metal2vulkan-runtime/src/degradation.rs +++ b/crates/metal2vulkan-runtime/src/degradation.rs @@ -2193,7 +2193,10 @@ degradations! { /// 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 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 diff --git a/crates/metal2vulkan-runtime/src/tests/degradation.rs b/crates/metal2vulkan-runtime/src/tests/degradation.rs index c0aa3c851..0218cc0c4 100644 --- a/crates/metal2vulkan-runtime/src/tests/degradation.rs +++ b/crates/metal2vulkan-runtime/src/tests/degradation.rs @@ -56,6 +56,15 @@ fn codes_are_distinct_and_decode() { assert_eq!(seen.insert(code, kind), None, "{code} names two kinds"); assert_eq!(Degradation::from_code(code), Some(kind)); assert!(!kind.cost().is_empty(), "{kind:?}"); + // Its name, code and cost read with single spaces: a string literal continued onto the + // next line without a `\` keeps the line's break and indent, which every relayed notice + // line would carry. + for text in [format!("{kind:?}"), code.to_owned(), kind.cost().to_owned()] { + assert!( + !text.contains(" ") && !text.contains(['\n', '\t']), + "{kind:?}: {text:?} holds two spaces, a newline or a tab" + ); + } } assert_eq!(Degradation::from_code("metal2vulkan-degrade-"), None); }