From d6ae7e4e19c69c4a5ff683a19f0118ce6f2d5f47 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 23 Oct 2026 23:48:33 +0300 Subject: [PATCH] Format the two files the depth packet's landing left unformatted Content: the tree of `development` at f08d51cd71, unchanged. --- crates/metal2vulkan-runtime/src/depth_copy.rs | 37 +++++++++---------- .../runtime-sources.sha256 | 2 +- .../src/bind/depth_stencil_copy/tests.rs | 5 ++- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/depth_copy.rs b/crates/metal2vulkan-runtime/src/depth_copy.rs index efc79ab26..9d658be37 100644 --- a/crates/metal2vulkan-runtime/src/depth_copy.rs +++ b/crates/metal2vulkan-runtime/src/depth_copy.rs @@ -417,26 +417,25 @@ impl Device { // every variant, not a `matches!` that falls through to false: a new bits draw left out // of a fallthrough list builds a depth render pass over its colour image, which is how // `Depth16Bits` first shipped broken. - let colour = match copy { - DepthStencilCopy::DepthBits - | DepthStencilCopy::StencilBits - | DepthStencilCopy::MagnitudeBits - | DepthStencilCopy::Depth16Bits => true, - DepthStencilCopy::Depth - | DepthStencilCopy::DepthMagnitude - | DepthStencilCopy::Depth16Code - | DepthStencilCopy::StencilPlane { .. } - | DepthStencilCopy::StencilExport { .. } - | DepthStencilCopy::DepthFromStandIn { .. } => false, - // `DepthStencilCopy` is `#[non_exhaustive]`, so a variant added in the translator - // crate reaches here. A bits draw must say so above; defaulting to a depth pass is - // the failure this match exists to stop, so refuse rather than guess. - _ => { - return Err(internal( + let colour = + match copy { + DepthStencilCopy::DepthBits + | DepthStencilCopy::StencilBits + | DepthStencilCopy::MagnitudeBits + | DepthStencilCopy::Depth16Bits => true, + DepthStencilCopy::Depth + | DepthStencilCopy::DepthMagnitude + | DepthStencilCopy::Depth16Code + | DepthStencilCopy::StencilPlane { .. } + | DepthStencilCopy::StencilExport { .. } + | DepthStencilCopy::DepthFromStandIn { .. } => false, + // `DepthStencilCopy` is `#[non_exhaustive]`, so a variant added in the translator + // crate reaches here. A bits draw must say so above; defaulting to a depth pass is + // the failure this match exists to stop, so refuse rather than guess. + _ => return Err(internal( "a depth/stencil copy draw whose attachment kind this runtime does not state", - )) - } - }; + )), + }; let result = (|| { made.render_pass = match colour { true => bits_pass(raw, format, samples)?, diff --git a/crates/metal2vulkan-validation/runtime-sources.sha256 b/crates/metal2vulkan-validation/runtime-sources.sha256 index c2546d4d5..88261461a 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -56e9ea17dec3cb3b876b10bacbaec532592a4c0ed7411a87bb3782c65b842839 +1875b16fdaf9510528e04e803244d3b054835ce74e0fd424694dfca42d270eee diff --git a/crates/metal2vulkan/src/bind/depth_stencil_copy/tests.rs b/crates/metal2vulkan/src/bind/depth_stencil_copy/tests.rs index bba70e2d7..8e7a8e0f2 100644 --- a/crates/metal2vulkan/src/bind/depth_stencil_copy/tests.rs +++ b/crates/metal2vulkan/src/bind/depth_stencil_copy/tests.rs @@ -239,5 +239,8 @@ fn every_16_bit_code_survives_the_depth_pair_in_both_directions() { worst = worst.max((scaled - f64::from(code)).abs()); } // The half-step budget is 0.5; the docs quote this margin, so it is held to it. - assert!(worst < 2.0e-3, "the largest |depth * 65535 - code| is {worst}"); + assert!( + worst < 2.0e-3, + "the largest |depth * 65535 - code| is {worst}" + ); }