Skip to content

Commit

Permalink
Use VK_EXT_headless_surface in wsi-none
Browse files Browse the repository at this point in the history
  • Loading branch information
expipiplus1 committed Aug 31, 2023
1 parent ca91095 commit c611baa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/wsi/none/wsi_window_none.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,16 @@ namespace dxvk::wsi {
PFN_vkGetInstanceProcAddr pfnVkGetInstanceProcAddr,
VkInstance instance,
VkSurfaceKHR* pSurface) {
// TODO: Could use VK_EXT_headless_surface here?
return VK_ERROR_FEATURE_NOT_PRESENT;
auto pfnVkCreateHeadlessSurfaceEXT = reinterpret_cast<PFN_vkCreateHeadlessSurfaceEXT>(
pfnVkGetInstanceProcAddr(instance, "vkCreateHeadlessSurfaceEXT"));

if (!pfnVkCreateHeadlessSurfaceEXT)
return VK_ERROR_FEATURE_NOT_PRESENT;

VkHeadlessSurfaceCreateInfoEXT info = { VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT };
info.pNext = nullptr;
info.flags = 0;
return pfnVkCreateHeadlessSurfaceEXT(instance, &info, nullptr, pSurface);
}

}

0 comments on commit c611baa

Please sign in to comment.