| 1 | //! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_device_group_creation.html> |
| 2 | |
| 3 | use craterust-analyzer cargo ash 0.38.0+1.3.281 crate/::preluderust-analyzer cargo ash 0.38.0+1.3.281 prelude/::*; |
| 4 | use craterust-analyzer cargo ash 0.38.0+1.3.281 crate/::vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/; |
| 5 | 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/; |
| 6 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/; |
| 7 | |
| 8 | 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_group_creationrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group_creation/::Instancerust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group_creation/Instance# { |
| 9 | /// Retrieve the number of elements to pass to [`enumerate_physical_device_groups()`][Self::enumerate_physical_device_groups()] |
| 10 | #[inline] |
| 11 | pub unsafe fn enumerate_physical_device_groups_lenrust-analyzer cargo ash 0.38.0+1.3.281 extensions/khr/device_group_creation/impl#[`crate::khr::device_group_creation::Instance`]enumerate_physical_device_groups_len().(&self) -> VkResultrust-analyzer cargo ash 0.38.0+1.3.281 prelude/VkResult#<usize> { |
| 12 | let mut group_count = 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().(); |
| 13 | (self.fprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group_creation/Instance#fp..enumerate_physical_device_groups_khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group_creation/InstanceFn#enumerate_physical_device_groups_khr.)( |
| 14 | self.handlerust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group_creation/Instance#handle., |
| 15 | group_count.as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/maybe_uninit/impl#[`MaybeUninit<T>`]as_mut_ptr().(), |
| 16 | ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/::null_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/null_mut().(), |
| 17 | ) |
| 18 | .assume_init_on_successrust-analyzer cargo ash 0.38.0+1.3.281 prelude/impl#[`vk::Result`]assume_init_on_success().(group_count) |
| 19 | .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(|c| c as usize) |
| 20 | } |
| 21 | |
| 22 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkEnumeratePhysicalDeviceGroupsKHR.html> |
| 23 | /// |
| 24 | /// Call [`enumerate_physical_device_groups_len()`][Self::enumerate_physical_device_groups_len()] to query the number of elements to pass to `out`. |
| 25 | /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. |
| 26 | #[inline] |
| 27 | pub unsafe fn enumerate_physical_device_groupsrust-analyzer cargo ash 0.38.0+1.3.281 extensions/khr/device_group_creation/impl#[`crate::khr::device_group_creation::Instance`]enumerate_physical_device_groups().( |
| 28 | &self, |
| 29 | out: &mut [vkrust-analyzer cargo ash 0.38.0+1.3.281 vk/::PhysicalDeviceGroupPropertiesrust-analyzer cargo ash 0.38.0+1.3.281 vk/definitions/PhysicalDeviceGroupProperties#<'_>], |
| 30 | ) -> VkResultrust-analyzer cargo ash 0.38.0+1.3.281 prelude/VkResult#<()> { |
| 31 | let mut count = out.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() as u32; |
| 32 | (self.fprust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group_creation/Instance#fp..enumerate_physical_device_groups_khrrust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group_creation/InstanceFn#enumerate_physical_device_groups_khr.)(self.handlerust-analyzer cargo ash 0.38.0+1.3.281 extensions_generated/khr/device_group_creation/Instance#handle., &mut count, out.as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_mut_ptr().()) |
| 33 | .resultrust-analyzer cargo ash 0.38.0+1.3.281 prelude/impl#[`vk::Result`]result().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 34 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(count as usize, out.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().()); |
| 35 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 36 | } |
| 37 | } |