Mark some more functions as unsafe
This commit is contained in:
parent
59d49b2159
commit
cda39148e9
|
@ -34,13 +34,12 @@ pub trait DeviceV1_1: DeviceV1_0 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_device_group_peer_memory_features(
|
unsafe fn get_device_group_peer_memory_features(
|
||||||
&self,
|
&self,
|
||||||
heap_index: vk::uint32_t,
|
heap_index: vk::uint32_t,
|
||||||
local_device_index: vk::uint32_t,
|
local_device_index: vk::uint32_t,
|
||||||
remote_device_index: vk::uint32_t,
|
remote_device_index: vk::uint32_t,
|
||||||
) -> vk::PeerMemoryFeatureFlags {
|
) -> vk::PeerMemoryFeatureFlags {
|
||||||
unsafe {
|
|
||||||
let mut peer_memory_features = mem::uninitialized();
|
let mut peer_memory_features = mem::uninitialized();
|
||||||
self.fp_v1_1().get_device_group_peer_memory_features(
|
self.fp_v1_1().get_device_group_peer_memory_features(
|
||||||
self.handle(),
|
self.handle(),
|
||||||
|
@ -51,7 +50,6 @@ pub trait DeviceV1_1: DeviceV1_0 {
|
||||||
);
|
);
|
||||||
peer_memory_features
|
peer_memory_features
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unsafe fn cmd_set_device_mask(
|
unsafe fn cmd_set_device_mask(
|
||||||
&self,
|
&self,
|
||||||
|
|
|
@ -145,12 +145,11 @@ pub trait InstanceV1_1: InstanceV1_0 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_physical_device_image_format_properties2(
|
unsafe fn get_physical_device_image_format_properties2(
|
||||||
&self,
|
&self,
|
||||||
physical_device: vk::PhysicalDevice,
|
physical_device: vk::PhysicalDevice,
|
||||||
format_info: &vk::PhysicalDeviceImageFormatInfo2,
|
format_info: &vk::PhysicalDeviceImageFormatInfo2,
|
||||||
) -> VkResult<vk::ImageFormatProperties2> {
|
) -> VkResult<vk::ImageFormatProperties2> {
|
||||||
unsafe {
|
|
||||||
let mut image_format_prop = mem::uninitialized();
|
let mut image_format_prop = mem::uninitialized();
|
||||||
let err_code = self.fp_v1_1().get_physical_device_image_format_properties2(
|
let err_code = self.fp_v1_1().get_physical_device_image_format_properties2(
|
||||||
physical_device,
|
physical_device,
|
||||||
|
@ -163,7 +162,6 @@ pub trait InstanceV1_1: InstanceV1_0 {
|
||||||
Err(err_code)
|
Err(err_code)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn get_physical_device_queue_family_properties2(
|
fn get_physical_device_queue_family_properties2(
|
||||||
&self,
|
&self,
|
||||||
|
@ -199,12 +197,11 @@ pub trait InstanceV1_1: InstanceV1_0 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_physical_device_sparse_image_format_properties2(
|
unsafe fn get_physical_device_sparse_image_format_properties2(
|
||||||
&self,
|
&self,
|
||||||
physical_device: vk::PhysicalDevice,
|
physical_device: vk::PhysicalDevice,
|
||||||
format_info: &vk::PhysicalDeviceSparseImageFormatInfo2,
|
format_info: &vk::PhysicalDeviceSparseImageFormatInfo2,
|
||||||
) -> Vec<vk::SparseImageFormatProperties2> {
|
) -> Vec<vk::SparseImageFormatProperties2> {
|
||||||
unsafe {
|
|
||||||
let mut format_count = 0;
|
let mut format_count = 0;
|
||||||
self.fp_v1_1()
|
self.fp_v1_1()
|
||||||
.get_physical_device_sparse_image_format_properties2(
|
.get_physical_device_sparse_image_format_properties2(
|
||||||
|
@ -224,14 +221,12 @@ pub trait InstanceV1_1: InstanceV1_0 {
|
||||||
format_prop.set_len(format_count as usize);
|
format_prop.set_len(format_count as usize);
|
||||||
format_prop
|
format_prop
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn get_physical_device_external_buffer_properties(
|
unsafe fn get_physical_device_external_buffer_properties(
|
||||||
&self,
|
&self,
|
||||||
physical_device: vk::PhysicalDevice,
|
physical_device: vk::PhysicalDevice,
|
||||||
external_buffer_info: &vk::PhysicalDeviceExternalBufferInfo,
|
external_buffer_info: &vk::PhysicalDeviceExternalBufferInfo,
|
||||||
) -> vk::ExternalBufferProperties {
|
) -> vk::ExternalBufferProperties {
|
||||||
unsafe {
|
|
||||||
let mut image_format_prop = mem::uninitialized();
|
let mut image_format_prop = mem::uninitialized();
|
||||||
self.fp_v1_1()
|
self.fp_v1_1()
|
||||||
.get_physical_device_external_buffer_properties(
|
.get_physical_device_external_buffer_properties(
|
||||||
|
@ -241,14 +236,12 @@ pub trait InstanceV1_1: InstanceV1_0 {
|
||||||
);
|
);
|
||||||
image_format_prop
|
image_format_prop
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn get_physical_device_external_fence_properties(
|
unsafe fn get_physical_device_external_fence_properties(
|
||||||
&self,
|
&self,
|
||||||
physical_device: vk::PhysicalDevice,
|
physical_device: vk::PhysicalDevice,
|
||||||
external_fence_info: &vk::PhysicalDeviceExternalFenceInfo,
|
external_fence_info: &vk::PhysicalDeviceExternalFenceInfo,
|
||||||
) -> vk::ExternalFenceProperties {
|
) -> vk::ExternalFenceProperties {
|
||||||
unsafe {
|
|
||||||
let mut fence_prop = mem::uninitialized();
|
let mut fence_prop = mem::uninitialized();
|
||||||
self.fp_v1_1()
|
self.fp_v1_1()
|
||||||
.get_physical_device_external_fence_properties(
|
.get_physical_device_external_fence_properties(
|
||||||
|
@ -258,14 +251,12 @@ pub trait InstanceV1_1: InstanceV1_0 {
|
||||||
);
|
);
|
||||||
fence_prop
|
fence_prop
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn get_physical_device_external_semaphore_properties(
|
unsafe fn get_physical_device_external_semaphore_properties(
|
||||||
&self,
|
&self,
|
||||||
physical_device: vk::PhysicalDevice,
|
physical_device: vk::PhysicalDevice,
|
||||||
external_semaphore_info: &vk::PhysicalDeviceExternalSemaphoreInfo,
|
external_semaphore_info: &vk::PhysicalDeviceExternalSemaphoreInfo,
|
||||||
) -> vk::ExternalSemaphoreProperties {
|
) -> vk::ExternalSemaphoreProperties {
|
||||||
unsafe {
|
|
||||||
let mut semaphore_prop = mem::uninitialized();
|
let mut semaphore_prop = mem::uninitialized();
|
||||||
self.fp_v1_1()
|
self.fp_v1_1()
|
||||||
.get_physical_device_external_semaphore_properties(
|
.get_physical_device_external_semaphore_properties(
|
||||||
|
@ -276,7 +267,6 @@ pub trait InstanceV1_1: InstanceV1_0 {
|
||||||
semaphore_prop
|
semaphore_prop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
pub trait InstanceV1_0 {
|
pub trait InstanceV1_0 {
|
||||||
|
|
Loading…
Reference in a new issue