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
This commit is contained in:
Janis 2025-01-05 01:15:13 +01:00
parent ac40cddfb7
commit 1a1625cf33

View file

@ -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<vk::Semaphore>) -> Result<()> {
self.swapchain.clone().present(self, wait)