pub struct Device {
    pub(crate) fp: DeviceFn,
    pub(crate) handle: Device,
}Expand description
VK_KHR_swapchain device-level functions
Fields§
§fp: DeviceFn§handle: DeviceImplementations§
Source§impl Device
 
impl Device
Sourcepub unsafe fn create_swapchain(
    &self,
    create_info: &SwapchainCreateInfoKHR<'_>,
    allocation_callbacks: Option<&AllocationCallbacks<'_>>,
) -> VkResult<SwapchainKHR>
 
pub unsafe fn create_swapchain( &self, create_info: &SwapchainCreateInfoKHR<'_>, allocation_callbacks: Option<&AllocationCallbacks<'_>>, ) -> VkResult<SwapchainKHR>
Sourcepub unsafe fn destroy_swapchain(
    &self,
    swapchain: SwapchainKHR,
    allocation_callbacks: Option<&AllocationCallbacks<'_>>,
)
 
pub unsafe fn destroy_swapchain( &self, swapchain: SwapchainKHR, allocation_callbacks: Option<&AllocationCallbacks<'_>>, )
Sourcepub unsafe fn get_swapchain_images(
    &self,
    swapchain: SwapchainKHR,
) -> VkResult<Vec<Image>>
 
pub unsafe fn get_swapchain_images( &self, swapchain: SwapchainKHR, ) -> VkResult<Vec<Image>>
Sourcepub unsafe fn acquire_next_image(
    &self,
    swapchain: SwapchainKHR,
    timeout: u64,
    semaphore: Semaphore,
    fence: Fence,
) -> VkResult<(u32, bool)>
 
pub unsafe fn acquire_next_image( &self, swapchain: SwapchainKHR, timeout: u64, semaphore: Semaphore, fence: Fence, ) -> VkResult<(u32, bool)>
On success, returns the next image’s index and whether the swapchain is suboptimal for the surface.
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAcquireNextImageKHR.html
Sourcepub unsafe fn queue_present(
    &self,
    queue: Queue,
    present_info: &PresentInfoKHR<'_>,
) -> VkResult<bool>
 
pub unsafe fn queue_present( &self, queue: Queue, present_info: &PresentInfoKHR<'_>, ) -> VkResult<bool>
On success, returns whether the swapchain is suboptimal for the surface.
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueuePresentKHR.html
Sourcepub unsafe fn get_device_group_present_capabilities(
    &self,
    device_group_present_capabilities: &mut DeviceGroupPresentCapabilitiesKHR<'_>,
) -> VkResult<()>
 
pub unsafe fn get_device_group_present_capabilities( &self, device_group_present_capabilities: &mut DeviceGroupPresentCapabilitiesKHR<'_>, ) -> VkResult<()>
Only available since Vulkan 1.1.
Also available as khr::device_group::Device::get_device_group_present_capabilities()
when VK_KHR_surface is enabled.
Sourcepub unsafe fn get_device_group_surface_present_modes(
    &self,
    surface: SurfaceKHR,
) -> VkResult<DeviceGroupPresentModeFlagsKHR>
 
pub unsafe fn get_device_group_surface_present_modes( &self, surface: SurfaceKHR, ) -> VkResult<DeviceGroupPresentModeFlagsKHR>
Only available since Vulkan 1.1.
Also available as khr::device_group::Device::get_device_group_surface_present_modes()
when VK_KHR_surface is enabled.
Sourcepub unsafe fn acquire_next_image2(
    &self,
    acquire_info: &AcquireNextImageInfoKHR<'_>,
) -> VkResult<(u32, bool)>
 
pub unsafe fn acquire_next_image2( &self, acquire_info: &AcquireNextImageInfoKHR<'_>, ) -> VkResult<(u32, bool)>
On success, returns the next image’s index and whether the swapchain is suboptimal for the surface.
Only available since Vulkan 1.1.
Also available as khr::device_group::Device::acquire_next_image2()
when VK_KHR_swapchain is enabled.
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAcquireNextImage2KHR.html