Commit 883e817b by Sascha Willems Committed by Alexis Hétu

Added vkGetPhysicalDeviceWin32PresentationSupportKHR to Vulkan ICD

This adds an ICD entrypoint for vkGetPhysicalDeviceWin32PresentationSupportKHR to the Win32 platform. This change will allow tools that make use of this function to work with the swiftshader ICD. One such tool is my Vulkan Hardware Capability viewer, that would crash on ICDs not implementing this. Bug: b/143207519 Change-Id: I23552cf072595b97f3032416a51c0db13d3f87a9 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/37509 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 7738ed71
...@@ -106,6 +106,7 @@ static const std::unordered_map<std::string, PFN_vkVoidFunction> instanceFunctio ...@@ -106,6 +106,7 @@ static const std::unordered_map<std::string, PFN_vkVoidFunction> instanceFunctio
#ifdef VK_USE_PLATFORM_WIN32_KHR #ifdef VK_USE_PLATFORM_WIN32_KHR
// VK_KHR_win32_surface // VK_KHR_win32_surface
MAKE_VULKAN_INSTANCE_ENTRY(vkCreateWin32SurfaceKHR), MAKE_VULKAN_INSTANCE_ENTRY(vkCreateWin32SurfaceKHR),
MAKE_VULKAN_INSTANCE_ENTRY(vkGetPhysicalDeviceWin32PresentationSupportKHR),
#endif #endif
}; };
#undef MAKE_VULKAN_INSTANCE_ENTRY #undef MAKE_VULKAN_INSTANCE_ENTRY
......
...@@ -2832,6 +2832,13 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(VkInstance instance, cons ...@@ -2832,6 +2832,13 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(VkInstance instance, cons
return vk::Win32SurfaceKHR::Create(pAllocator, pCreateInfo, pSurface); return vk::Win32SurfaceKHR::Create(pAllocator, pCreateInfo, pSurface);
} }
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex)
{
TRACE("(VkPhysicalDevice physicalDevice = %p, uint32_t queueFamilyIndex = %d)",
physicalDevice, queueFamilyIndex);
return VK_TRUE;
}
#endif #endif
#ifndef __ANDROID__ #ifndef __ANDROID__
......
...@@ -216,3 +216,4 @@ EXPORTS ...@@ -216,3 +216,4 @@ EXPORTS
vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR
; VK_KHR_win32_surface ; VK_KHR_win32_surface
vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR
vkGetPhysicalDeviceWin32PresentationSupportKHR
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment