Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/quad/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ fn main() {
.expect("Failed to create an instance!");
let surface = instance.create_surface(&window).expect("Failed to create a surface!");
let adapters = instance.enumerate_adapters();
// Return `window` so it is not dropped: dropping it invalidates `surface`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

(window, instance, adapters, surface)
};
#[cfg(feature = "gl")]
Expand Down Expand Up @@ -619,7 +620,7 @@ where
submission_complete_fences.push(
device
.create_fence(true)
.expect("Could not create semaphore"),
.expect("Could not create fence"),
);
cmd_buffers.push(cmd_pools[i].allocate_one(command::Level::Primary));
}
Expand Down Expand Up @@ -927,6 +928,8 @@ where
}
self.device
.destroy_render_pass(ManuallyDrop::into_inner(ptr::read(&self.render_pass)));
self.surface
.unconfigure_swapchain(&self.device);
self.device
.free_memory(ManuallyDrop::into_inner(ptr::read(&self.buffer_memory)));
self.device
Expand Down