Skip to content

Commit

Permalink
Handle vkGetPhysicalDeviceSurfaceFormats2KHR in the virtual swapchain.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuetschard committed Apr 20, 2022
1 parent 09a6a36 commit 17d4ffb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/vulkan/vk_virtual_swapchain/cc/layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ vkGetInstanceProcAddr(VkInstance instance, const char* funcName) {

INTERCEPT(vkGetPhysicalDeviceSurfaceSupportKHR);
INTERCEPT(vkGetPhysicalDeviceSurfaceFormatsKHR);
INTERCEPT(vkGetPhysicalDeviceSurfaceFormats2KHR);
INTERCEPT(vkGetPhysicalDeviceSurfaceCapabilitiesKHR);
INTERCEPT(vkGetPhysicalDeviceSurfaceCapabilities2KHR);
INTERCEPT(vkGetPhysicalDeviceSurfacePresentModesKHR);
Expand Down
9 changes: 9 additions & 0 deletions core/vulkan/vk_virtual_swapchain/cc/swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 6 additions & 1 deletion core/vulkan/vk_virtual_swapchain/cc/swapchain.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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_
#endif // VK_VIRTUAL_SWAPCHAIN_SWAPCHAIN_H_

0 comments on commit 17d4ffb

Please sign in to comment.