Skip to content

Commit

Permalink
instance: Make enumerate_physical_device_groups unsafe
Browse files Browse the repository at this point in the history
All Vulkan functions are marked `unsafe` and
`enumerate_physical_device_groups` should not be an exception to that.
  • Loading branch information
MarijnS95 authored and Ralith committed Nov 11, 2021
1 parent c4dd1d6 commit 6640ecb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions ash/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,14 @@ impl Instance {
}

#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumeratePhysicalDeviceGroups.html>"]
pub fn enumerate_physical_device_groups(
pub unsafe fn enumerate_physical_device_groups(
&self,
out: &mut [vk::PhysicalDeviceGroupProperties],
) -> VkResult<()> {
unsafe {
let mut group_count = out.len() as u32;
self.instance_fn_1_1
.enumerate_physical_device_groups(self.handle(), &mut group_count, out.as_mut_ptr())
.into()
}
let mut group_count = out.len() as u32;
self.instance_fn_1_1
.enumerate_physical_device_groups(self.handle(), &mut group_count, out.as_mut_ptr())
.into()
}

#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceFeatures2.html>"]
Expand Down

0 comments on commit 6640ecb

Please sign in to comment.