From cd820256e0434e7c8a12091132aed77414fa6106 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 23 Nov 2026 21:05:14 -0800 Subject: [PATCH] rt: the Direct3D 11 usage test compares the usage past the bind flags with 0 What: the usage test's assert_eq! had lost its right-hand side (a stray comma where the 0 was), so the Windows test build of 341c76960b failed to compile (the module builds only for Windows under m2v_gpu or m2v_cpu_icd, so the host's clippy did not see it). It now compares the image's usage past what the bind flags give with 0. Why the list refuses nothing a guest reaches: 62c860ccb5 lists only the plane's own format, the descriptor's and (341c76960b) the descriptor's sRGB sibling. Before it, a plane whose descriptor asked PixelFormatView listed every same-size colour format Metal views it as, wherever the import query took the list: the 10-bit luma (R16_UNORM) too was mutable with R16Uint, R16Sint, R16Snorm, R16Float, the RG8 forms and the packed 16-bit forms, beside the STORAGE that 62c860ccb5 names. A view in those formats is now Gap::TextureView of SurfacePixelFormat. The consumer views a texture over a drawn plane in its own format or its sRGB sibling only (shapes.rs:22-25 at 360eef13fa), and any other format goes to a shape of its own (shapes.rs:25-27), so the import never receives a view in R16Uint, RG8Uint or a packed form. After this form the 10-bit luma is the Direct3D 11 description: not mutable, no storage. How verified: the Windows cross-build of this tip compiles the test (341c76960b's did not, job m3-max-72907). The device run on the lab's Windows host, red at the parent and green here, and the runtime's checks are reported with their job ids to the lander. --- crates/metal2vulkan-runtime/src/tests/d3d11.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/tests/d3d11.rs b/crates/metal2vulkan-runtime/src/tests/d3d11.rs index c3dd7bf46..cf251732c 100644 --- a/crates/metal2vulkan-runtime/src/tests/d3d11.rs +++ b/crates/metal2vulkan-runtime/src/tests/d3d11.rs @@ -768,11 +768,11 @@ mod on_device { given.as_raw() ); assert_eq!( - (usage & !given).as_raw(), - , - "{label}: a usage the bind flags do not give, of {:#x}", - usage.as_raw() - ); + (usage & !given).as_raw(), + 0, + "{label}: a usage the bind flags do not give, of {:#x}", + usage.as_raw() + ); assert!( usage.contains(read), "{label}: copied and sampled: {:#x}",