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 27, 2023
1 parent b4d7b2b commit 190a574
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 190a574

Please sign in to comment.