diff --git a/src/wsi/none/wsi_window_none.cpp b/src/wsi/none/wsi_window_none.cpp index aa11803a8589..87a14af0aab6 100644 --- a/src/wsi/none/wsi_window_none.cpp +++ b/src/wsi/none/wsi_window_none.cpp @@ -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( + 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); } }