diff --git a/core/vulkan/vk_virtual_swapchain/cc/layer.cpp b/core/vulkan/vk_virtual_swapchain/cc/layer.cpp index 6f76d283b..e2fb6906d 100644 --- a/core/vulkan/vk_virtual_swapchain/cc/layer.cpp +++ b/core/vulkan/vk_virtual_swapchain/cc/layer.cpp @@ -516,6 +516,7 @@ vkGetInstanceProcAddr(VkInstance instance, const char* funcName) { INTERCEPT(vkGetPhysicalDeviceSurfaceSupportKHR); INTERCEPT(vkGetPhysicalDeviceSurfaceFormatsKHR); + INTERCEPT(vkGetPhysicalDeviceSurfaceFormats2KHR); INTERCEPT(vkGetPhysicalDeviceSurfaceCapabilitiesKHR); INTERCEPT(vkGetPhysicalDeviceSurfaceCapabilities2KHR); INTERCEPT(vkGetPhysicalDeviceSurfacePresentModesKHR); diff --git a/core/vulkan/vk_virtual_swapchain/cc/swapchain.cpp b/core/vulkan/vk_virtual_swapchain/cc/swapchain.cpp index a90fe6afd..33b5613a1 100644 --- a/core/vulkan/vk_virtual_swapchain/cc/swapchain.cpp +++ b/core/vulkan/vk_virtual_swapchain/cc/swapchain.cpp @@ -213,6 +213,15 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR( return VK_SUCCESS; } +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats) { + return swapchain::vkGetPhysicalDeviceSurfaceFormatsKHR( + physicalDevice, pSurfaceInfo->surface, pSurfaceFormatCount, + pSurfaceFormats); +} + VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { diff --git a/core/vulkan/vk_virtual_swapchain/cc/swapchain.h b/core/vulkan/vk_virtual_swapchain/cc/swapchain.h index db42b4f74..d51bf1608 100644 --- a/core/vulkan/vk_virtual_swapchain/cc/swapchain.h +++ b/core/vulkan/vk_virtual_swapchain/cc/swapchain.h @@ -55,6 +55,11 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats); +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats); + VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); @@ -122,4 +127,4 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass( VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); } // namespace swapchain -#endif // VK_VIRTUAL_SWAPCHAIN_SWAPCHAIN_H_ \ No newline at end of file +#endif // VK_VIRTUAL_SWAPCHAIN_SWAPCHAIN_H_