bedrock/
surface.rs

1//! Vulkan Surface/Swapchain Extensions
2
3use crate::*;
4
5/// A semaphore or a fence
6pub enum CompletionHandler<Fence: crate::Fence, Semaphore: crate::Semaphore> {
7    /// A Host synchronizer(aka Fence)
8    Host(Fence),
9    /// A Queue synchronizer(aka Semaphore)
10    Queue(Semaphore),
11}
12
13/// A semaphore or a fence, externally synchronized on host access
14pub enum CompletionHandlerMut<'d> {
15    /// A Host synchronizer(aka Fence)
16    Host(VkHandleRefMut<'d, VkFence>),
17    /// A Queue synchronizer(aka Semaphore)
18    Queue(VkHandleRefMut<'d, VkSemaphore>),
19}
20
21cfg_if! {
22    if #[cfg(feature = "VK_KHR_surface")] {
23        mod surface;
24        pub use self::surface::*;
25    }
26}
27
28cfg_if! {
29    if #[cfg(feature = "VK_KHR_swapchain")] {
30        mod swapchain;
31        pub use self::swapchain::*;
32    }
33}
34
35cfg_if! {
36    if #[cfg(all(feature = "VK_KHR_swapchain", feature = "VK_KHR_surface"))] {
37        mod swapchain_surface_integrated;
38        pub use self::swapchain_surface_integrated::*;
39    }
40}
41
42cfg_if! {
43    if #[cfg(feature = "VK_EXT_full_screen_exclusive")] {
44        mod full_screen_exclusive;
45        pub use self::full_screen_exclusive::*;
46    }
47}