| 1 | //! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_device_group.html> |
| 2 | |
| 3 | #[cfg(doc)] |
| 4 | use craterust-analyzer cargo ash 0.38.0+1.3.281 crate/::khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/; |
| 5 | use craterust-analyzer cargo ash 0.38.0+1.3.281 crate/::preluderust-analyzer cargo ash 0.38.0+1.3.281 prelude/::*; |
| 6 | use craterust-analyzer cargo ash 0.38.0+1.3.281 crate/::vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/; |
| 7 | use allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/::Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#; |
| 8 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/; |
| 9 | |
| 10 | impl craterust-analyzer cargo ash 0.38.0+1.3.281 crate/::khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/::device_grouprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/::Devicerust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device# { |
| 11 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceGroupPeerMemoryFeaturesKHR.html> |
| 12 | #[inline] |
| 13 | pub unsafe fn get_device_group_peer_memory_featuresrust-analyzer cargo ash 0.38.0+1.3.281 extensions/khr/device_group/impl#[`crate::khr::device_group::Device`]get_device_group_peer_memory_features().( |
| 14 | &self, |
| 15 | heap_index: u32, |
| 16 | local_device_index: u32, |
| 17 | remote_device_index: u32, |
| 18 | ) -> vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::PeerMemoryFeatureFlagsrust-analyzer cargo ash 0.38.0+1.3.281 vk/bitflags/PeerMemoryFeatureFlags# { |
| 19 | let mut peer_memory_features = memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::MaybeUninitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/MaybeUninit#::uninitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/impl#[`MaybeUninit<T>`]uninit().(); |
| 20 | (self.fprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device#fp..get_device_group_peer_memory_features_khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/DeviceFn#get_device_group_peer_memory_features_khr.)( |
| 21 | self.handlerust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device#handle., |
| 22 | heap_index, |
| 23 | local_device_index, |
| 24 | remote_device_index, |
| 25 | peer_memory_features.as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/impl#[`MaybeUninit<T>`]as_mut_ptr().(), |
| 26 | ); |
| 27 | peer_memory_features.assume_initrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/impl#[`MaybeUninit<T>`]assume_init().() |
| 28 | } |
| 29 | |
| 30 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDeviceMaskKHR.html> |
| 31 | #[inline] |
| 32 | pub unsafe fn cmd_set_device_maskrust-analyzer cargo ash 0.38.0+1.3.281 extensions/khr/device_group/impl#[`crate::khr::device_group::Device`]cmd_set_device_mask().(&self, command_buffer: vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::CommandBufferrust-analyzer cargo ash 0.38.0+1.3.281 vk/definitions/CommandBuffer#, device_mask: u32) { |
| 33 | (self.fprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device#fp..cmd_set_device_mask_khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/DeviceFn#cmd_set_device_mask_khr.)(command_buffer, device_mask) |
| 34 | } |
| 35 | |
| 36 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDispatchBaseKHR.html> |
| 37 | #[inline] |
| 38 | pub unsafe fn cmd_dispatch_baserust-analyzer cargo ash 0.38.0+1.3.281 extensions/khr/device_group/impl#[`crate::khr::device_group::Device`]cmd_dispatch_base().( |
| 39 | &self, |
| 40 | command_buffer: vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::CommandBufferrust-analyzer cargo ash 0.38.0+1.3.281 vk/definitions/CommandBuffer#, |
| 41 | base_group: (u32, u32, u32), |
| 42 | group_count: (u32, u32, u32), |
| 43 | ) { |
| 44 | (self.fprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device#fp..cmd_dispatch_base_khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/DeviceFn#cmd_dispatch_base_khr.)( |
| 45 | command_buffer, |
| 46 | base_group.0, |
| 47 | base_group.1, |
| 48 | base_group.2, |
| 49 | group_count.0, |
| 50 | group_count.1, |
| 51 | group_count.2, |
| 52 | ) |
| 53 | } |
| 54 | |
| 55 | /// Requires [`VK_KHR_surface`] to be enabled. |
| 56 | /// |
| 57 | /// Also available as [`khr::swapchain::Device::get_device_group_present_capabilities()`] since [Vulkan 1.1]. |
| 58 | /// |
| 59 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceGroupPresentCapabilitiesKHR.html> |
| 60 | /// |
| 61 | /// [Vulkan 1.1]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_VERSION_1_1.html |
| 62 | /// [`VK_KHR_surface`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_surface.html |
| 63 | #[inline] |
| 64 | pub unsafe fn get_device_group_present_capabilitiesrust-analyzer cargo ash 0.38.0+1.3.281 extensions/khr/device_group/impl#[`crate::khr::device_group::Device`]get_device_group_present_capabilities().( |
| 65 | &self, |
| 66 | device_group_present_capabilities: &mut vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::DeviceGroupPresentCapabilitiesKHRrust-analyzer cargo ash 0.38.0+1.3.281 vk/definitions/DeviceGroupPresentCapabilitiesKHR#<'_>, |
| 67 | ) -> VkResultrust-analyzer cargo ash 0.38.0+1.3.281 prelude/VkResult#<()> { |
| 68 | (self.fprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device#fp..get_device_group_present_capabilities_khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/DeviceFn#get_device_group_present_capabilities_khr.)( |
| 69 | self.handlerust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device#handle., |
| 70 | device_group_present_capabilities, |
| 71 | ) |
| 72 | .resultrust-analyzer cargo ash 0.38.0+1.3.281 prelude/impl#[`vk::Result`]result().() |
| 73 | } |
| 74 | |
| 75 | /// Requires [`VK_KHR_surface`] to be enabled. |
| 76 | /// |
| 77 | /// Also available as [`khr::swapchain::Device::get_device_group_surface_present_modes()`] since [Vulkan 1.1]. |
| 78 | /// |
| 79 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceGroupSurfacePresentModesKHR.html> |
| 80 | /// |
| 81 | /// [Vulkan 1.1]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_VERSION_1_1.html |
| 82 | /// [`VK_KHR_surface`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_surface.html |
| 83 | #[inline] |
| 84 | pub unsafe fn get_device_group_surface_present_modesrust-analyzer cargo ash 0.38.0+1.3.281 extensions/khr/device_group/impl#[`crate::khr::device_group::Device`]get_device_group_surface_present_modes().( |
| 85 | &self, |
| 86 | surface: vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::SurfaceKHRrust-analyzer cargo ash 0.38.0+1.3.281 vk/definitions/SurfaceKHR#, |
| 87 | ) -> VkResultrust-analyzer cargo ash 0.38.0+1.3.281 prelude/VkResult#<vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::DeviceGroupPresentModeFlagsKHRrust-analyzer cargo ash 0.38.0+1.3.281 vk/bitflags/DeviceGroupPresentModeFlagsKHR#> { |
| 88 | let mut modes = memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::MaybeUninitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/MaybeUninit#::uninitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/impl#[`MaybeUninit<T>`]uninit().(); |
| 89 | (self.fprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device#fp..get_device_group_surface_present_modes_khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/DeviceFn#get_device_group_surface_present_modes_khr.)( |
| 90 | self.handlerust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device#handle., |
| 91 | surface, |
| 92 | modes.as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/impl#[`MaybeUninit<T>`]as_mut_ptr().(), |
| 93 | ) |
| 94 | .assume_init_on_successrust-analyzer cargo ash 0.38.0+1.3.281 prelude/impl#[`vk::Result`]assume_init_on_success().(modes) |
| 95 | } |
| 96 | |
| 97 | /// On success, returns the next image's index and whether the swapchain is suboptimal for the surface. |
| 98 | /// |
| 99 | /// Requires [`VK_KHR_swapchain`] to be enabled. |
| 100 | /// |
| 101 | /// Also available as [`khr::swapchain::Device::acquire_next_image2()`] since [Vulkan 1.1]. |
| 102 | /// |
| 103 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAcquireNextImage2KHR.html> |
| 104 | /// |
| 105 | /// [Vulkan 1.1]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_VERSION_1_1.html |
| 106 | /// [`VK_KHR_swapchain`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_swapchain.html |
| 107 | #[inline] |
| 108 | pub unsafe fn acquire_next_image2rust-analyzer cargo ash 0.38.0+1.3.281 extensions/khr/device_group/impl#[`crate::khr::device_group::Device`]acquire_next_image2().( |
| 109 | &self, |
| 110 | acquire_info: &vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::AcquireNextImageInfoKHRrust-analyzer cargo ash 0.38.0+1.3.281 vk/definitions/AcquireNextImageInfoKHR#<'_>, |
| 111 | ) -> VkResultrust-analyzer cargo ash 0.38.0+1.3.281 prelude/VkResult#<(u32, bool)> { |
| 112 | let mut index = memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::MaybeUninitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/MaybeUninit#::uninitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/impl#[`MaybeUninit<T>`]uninit().(); |
| 113 | let err_code = |
| 114 | (self.fprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device#fp..acquire_next_image2_khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/DeviceFn#acquire_next_image2_khr.)(self.handlerust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Device#handle., acquire_info, index.as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/impl#[`MaybeUninit<T>`]as_mut_ptr().()); |
| 115 | match err_code { |
| 116 | vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::Resultrust-analyzer cargo ash 0.38.0+1.3.281 vk/enums/Result#::SUCCESSrust-analyzer cargo ash 0.38.0+1.3.281 vk/enums/impl#[Result]SUCCESS. => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((index.assume_initrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/impl#[`MaybeUninit<T>`]assume_init().(), false)), |
| 117 | vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::Resultrust-analyzer cargo ash 0.38.0+1.3.281 vk/enums/Result#::SUBOPTIMAL_KHRrust-analyzer cargo ash 0.38.0+1.3.281 vk/extensions/impl#[Result]SUBOPTIMAL_KHR. => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((index.assume_initrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/impl#[`MaybeUninit<T>`]assume_init().(), true)), |
| 118 | _ => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err_code), |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | impl craterust-analyzer cargo ash 0.38.0+1.3.281 crate/::khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/::device_grouprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/::Instancerust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Instance# { |
| 124 | /// Requires [`VK_KHR_surface`] to be enabled. |
| 125 | /// |
| 126 | /// Also available as [`khr::swapchain::Instance::get_physical_device_present_rectangles()`] since [Vulkan 1.1]. |
| 127 | /// |
| 128 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPhysicalDevicePresentRectanglesKHR.html> |
| 129 | /// |
| 130 | /// [Vulkan 1.1]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_VERSION_1_1.html |
| 131 | /// [`VK_KHR_surface`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_surface.html |
| 132 | #[inline] |
| 133 | pub unsafe fn get_physical_device_present_rectanglesrust-analyzer cargo ash 0.38.0+1.3.281 extensions/khr/device_group/impl#[`crate::khr::device_group::Instance`]get_physical_device_present_rectangles().( |
| 134 | &self, |
| 135 | physical_device: vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::PhysicalDevicerust-analyzer cargo ash 0.38.0+1.3.281 vk/definitions/PhysicalDevice#, |
| 136 | surface: vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::SurfaceKHRrust-analyzer cargo ash 0.38.0+1.3.281 vk/definitions/SurfaceKHR#, |
| 137 | ) -> VkResultrust-analyzer cargo ash 0.38.0+1.3.281 prelude/VkResult#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::Rect2Drust-analyzer cargo ash 0.38.0+1.3.281 vk/definitions/Rect2D#>> { |
| 138 | read_into_uninitialized_vectorrust-analyzer cargo ash 0.38.0+1.3.281 prelude/read_into_uninitialized_vector().(|count, data| { |
| 139 | (self.fprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/Instance#fp..get_physical_device_present_rectangles_khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group/InstanceFn#get_physical_device_present_rectangles_khr.)( |
| 140 | physical_device, |
| 141 | surface, |
| 142 | count, |
| 143 | data, |
| 144 | ) |
| 145 | }) |
| 146 | } |
| 147 | } |