From b14260ea79ddf2647651b620a7f23e928fad9199 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 19 Nov 2026 10:35:45 -0800 Subject: [PATCH] rt surface: the dma-buf allocations' flags helper is a Unix host's, as the dma-buf is m3-max-53422: clippy for both Windows targets found address_flags unused there (dead_code), as only the cfg(unix) dma-buf form calls it. It is cfg(unix) now. The other checks were 0. --- crates/metal2vulkan-rt/src/surface.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-rt/src/surface.rs b/crates/metal2vulkan-rt/src/surface.rs index 92112e0bc..4e13a47b3 100644 --- a/crates/metal2vulkan-rt/src/surface.rs +++ b/crates/metal2vulkan-rt/src/surface.rs @@ -1360,8 +1360,9 @@ fn acquire(from: u32, to: u32, buffer: vk::Buffer) -> vk::BufferMemoryBarrier2<' .size(vk::WHOLE_SIZE) } -/// The flags every allocation of a surface's memory takes: device addresses, which its buffer -/// needs (`VUID-vkBindBufferMemory-bufferDeviceAddress-03339`). +/// The flags every allocation of a dma-buf surface's memory takes: device addresses, which its +/// buffer needs (`VUID-vkBindBufferMemory-bufferDeviceAddress-03339`). +#[cfg(unix)] fn address_flags() -> vk::MemoryAllocateFlagsInfo<'static> { vk::MemoryAllocateFlagsInfo::default().flags(vk::MemoryAllocateFlags::DEVICE_ADDRESS) }