From: Jacob Lifshay Date: Wed, 26 Sep 2018 03:41:56 +0000 (-0700) Subject: add more type asserts and fix api types X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bf41acc11fe2043128bd2334175547afda7bd121;p=kazan.git add more type asserts and fix api types --- diff --git a/vulkan-driver/src/lib.rs b/vulkan-driver/src/lib.rs index 2b256a3..b66dd1d 100644 --- a/vulkan-driver/src/lib.rs +++ b/vulkan-driver/src/lib.rs @@ -21,8 +21,8 @@ const ASSERT_TYPE_VK_ICD_GET_INSTANCE_PROC_ADDR: api::PFN_vkGetInstanceProcAddr const ICD_VERSION: u32 = 5; #[no_mangle] -pub extern "system" fn vk_icdNegotiateLoaderICDInterfaceVersion( - supported_version: &mut u32, +pub unsafe extern "system" fn vk_icdNegotiateLoaderICDInterfaceVersion( + supported_version: *mut u32, ) -> api::VkResult { if *supported_version > ICD_VERSION { *supported_version = ICD_VERSION; @@ -30,6 +30,10 @@ pub extern "system" fn vk_icdNegotiateLoaderICDInterfaceVersion( api::VK_SUCCESS } +#[allow(dead_code)] +const ASSERT_TYPE_VK_ICD_NEGOTIATE_LOADER_ICD_INTERFACE_VERSION: + api::PFN_vkNegotiateLoaderICDInterfaceVersion = Some(vk_icdNegotiateLoaderICDInterfaceVersion); + #[no_mangle] pub extern "system" fn vk_icdGetPhysicalDeviceProcAddr( instance: api::VkInstance, @@ -93,5 +97,9 @@ pub extern "system" fn vk_icdGetPhysicalDeviceProcAddr( } } +#[allow(dead_code)] +const ASSERT_TYPE_VK_ICD_GET_PHYSICAL_DEVICE_PROC_ADDR: api::PFN_GetPhysicalDeviceProcAddr = + Some(vk_icdGetInstanceProcAddr); + #[cfg(test)] mod tests {}