From 1a1625cf3351a230bb5609a3bd333d3866b097b7 Mon Sep 17 00:00:00 2001 From: Janis Date: Sun, 5 Jan 2025 01:15:13 +0100 Subject: [PATCH] fix: Eq for SwapchainFrame, this should be more rigorous will be more rigorous if `index` is monotonically increasing instead of modulo of in-flight-frames --- crates/renderer/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/renderer/src/lib.rs b/crates/renderer/src/lib.rs index 05d682b..f0b058f 100644 --- a/crates/renderer/src/lib.rs +++ b/crates/renderer/src/lib.rs @@ -584,6 +584,13 @@ pub struct SwapchainFrame { pub release: vk::Semaphore, } +impl Eq for SwapchainFrame {} +impl PartialEq for SwapchainFrame { + fn eq(&self, other: &Self) -> bool { + self.index == other.index && self.image == other.image + } +} + impl SwapchainFrame { fn present(self, wait: Option) -> Result<()> { self.swapchain.clone().present(self, wait)