mirror of
https://github.com/italicsjenga/portability.git
synced 2024-11-26 00:41:33 +11:00
Merge #202
202: Added vkGetPhysicalDeviceWin32PresentationSupportKHR r=kvark a=SaschaWillems This PR adds vkGetPhysicalDeviceWin32PresentationSupportKHR, which will allow applications that query this work with gfx-portability. One such application is my Vulkan Hardware Capability Viewer. Adding this function will also silences a Vulkan loader debug message that is shown for ICDs not implementing vkGetPhysicalDeviceWin32PresentationSupportKHR. The implementation will always just return true. Co-authored-by: Sascha Willems <webmaster@saschawillems.de>
This commit is contained in:
commit
a9edbc0337
|
@ -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,
|
||||
|
|
|
@ -6938,6 +6938,10 @@ pub type PFN_vkCreateMacOSSurfaceMVK = ::std::option::Option<unsafe extern "C" f
|
|||
pSurface: *mut VkSurfaceKHR,
|
||||
) -> VkResult>;
|
||||
|
||||
pub type PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR = ::std::option::Option<unsafe extern "C" fn(
|
||||
physicalDevice: VkPhysicalDevice,
|
||||
queueFamilyIndex: u32,
|
||||
) -> VkBool32>;
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue