From 421443fa05fa79b389c1a28fcd7a1ed04b8df776 Mon Sep 17 00:00:00 2001 From: Sascha Willems Date: Wed, 23 Oct 2019 20:56:59 +0200 Subject: [PATCH] Added vkGetPhysicalDeviceWin32PresentationSupportKHR --- libportability-gfx/src/impls.rs | 9 +++++++++ libportability-gfx/src/lib.rs | 4 ++++ libportability-icd/src/lib.rs | 1 + libportability/src/lib.rs | 8 ++++++++ 4 files changed, 22 insertions(+) diff --git a/libportability-gfx/src/impls.rs b/libportability-gfx/src/impls.rs index bf89f89..ae0e4d6 100644 --- a/libportability-gfx/src/impls.rs +++ b/libportability-gfx/src/impls.rs @@ -521,6 +521,7 @@ pub extern "C" fn gfxGetInstanceProcAddr( vkGetPhysicalDeviceSurfaceCapabilitiesKHR, PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR => gfxGetPhysicalDeviceSurfaceCapabilitiesKHR, vkGetPhysicalDeviceSurfaceFormatsKHR, PFN_vkGetPhysicalDeviceSurfaceFormatsKHR => gfxGetPhysicalDeviceSurfaceFormatsKHR, vkGetPhysicalDeviceSurfacePresentModesKHR, PFN_vkGetPhysicalDeviceSurfacePresentModesKHR => gfxGetPhysicalDeviceSurfacePresentModesKHR, + vkGetPhysicalDeviceWin32PresentationSupportKHR, PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR => gfxGetPhysicalDeviceWin32PresentationSupportKHR, vkCreateWin32SurfaceKHR, PFN_vkCreateWin32SurfaceKHR => gfxCreateWin32SurfaceKHR, vkCreateMetalSurfaceEXT, PFN_vkCreateMetalSurfaceEXT => gfxCreateMetalSurfaceEXT, @@ -4384,6 +4385,14 @@ pub extern "C" fn gfxGetPhysicalDeviceSurfacePresentModesKHR( code } +#[inline] +pub extern "C" fn gfxGetPhysicalDeviceWin32PresentationSupportKHR( + adapter: VkPhysicalDevice, + queueFamilyIndex: u32 +) -> VkBool32 { + VK_TRUE +} + #[inline] pub extern "C" fn gfxCreateSwapchainKHR( gpu: VkDevice, diff --git a/libportability-gfx/src/lib.rs b/libportability-gfx/src/lib.rs index bc81356..f69ad24 100644 --- a/libportability-gfx/src/lib.rs +++ b/libportability-gfx/src/lib.rs @@ -6938,6 +6938,10 @@ pub type PFN_vkCreateMacOSSurfaceMVK = ::std::option::Option VkResult>; +pub type PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR = ::std::option::Option VkBool32>; #[repr(C)] #[derive(Debug, Copy)] diff --git a/libportability-icd/src/lib.rs b/libportability-icd/src/lib.rs index 289308e..6a40578 100644 --- a/libportability-icd/src/lib.rs +++ b/libportability-icd/src/lib.rs @@ -55,5 +55,6 @@ pub extern "C" fn vk_icdGetPhysicalDeviceProcAddr( vkGetPhysicalDeviceSurfaceCapabilitiesKHR, PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR => gfxGetPhysicalDeviceSurfaceCapabilitiesKHR, vkGetPhysicalDeviceSurfaceFormatsKHR, PFN_vkGetPhysicalDeviceSurfaceFormatsKHR => gfxGetPhysicalDeviceSurfaceFormatsKHR, vkGetPhysicalDeviceSurfacePresentModesKHR, PFN_vkGetPhysicalDeviceSurfacePresentModesKHR => gfxGetPhysicalDeviceSurfacePresentModesKHR, + vkGetPhysicalDeviceWin32PresentationSupportKHR, PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR => gfxGetPhysicalDeviceWin32PresentationSupportKHR, } } diff --git a/libportability/src/lib.rs b/libportability/src/lib.rs index d3ff69f..9af511e 100644 --- a/libportability/src/lib.rs +++ b/libportability/src/lib.rs @@ -239,6 +239,14 @@ pub extern "C" fn vkGetPhysicalDeviceSurfacePresentModesKHR( gfxGetPhysicalDeviceSurfacePresentModesKHR(adapter, surface, pPresentModeCount, pPresentModes) } +#[no_mangle] +pub extern "C" fn vkGetPhysicalDeviceWin32PresentationSupportKHR( + adapter: VkPhysicalDevice, + queueFamilyIndex: u32, +) -> VkBool32 { + gfxGetPhysicalDeviceWin32PresentationSupportKHR(adapter, queueFamilyIndex) +} + #[no_mangle] pub extern "C" fn vkCreateSwapchainKHR( device: VkDevice,