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 Jul 30, 2023
1 parent dd00851 commit a4a6cbe
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 a4a6cbe

Please sign in to comment.