diff options
Diffstat (limited to 'src/libs/dxvk-native-1.9.2a/src/wsi/win32/wsi_presenter_win32.cpp')
-rw-r--r-- | src/libs/dxvk-native-1.9.2a/src/wsi/win32/wsi_presenter_win32.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libs/dxvk-native-1.9.2a/src/wsi/win32/wsi_presenter_win32.cpp b/src/libs/dxvk-native-1.9.2a/src/wsi/win32/wsi_presenter_win32.cpp new file mode 100644 index 00000000..b3ff9b5a --- /dev/null +++ b/src/libs/dxvk-native-1.9.2a/src/wsi/win32/wsi_presenter_win32.cpp @@ -0,0 +1,23 @@ +#include "../wsi_presenter.h" + +namespace dxvk::wsi { + + VkResult createSurface( + HWND hWindow, + const Rc<vk::InstanceFn>& vki, + VkSurfaceKHR* pSurface) { + HINSTANCE hInstance = reinterpret_cast<HINSTANCE>( + GetWindowLongPtr(hWindow, GWLP_HINSTANCE)); + + VkWin32SurfaceCreateInfoKHR info; + info.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR; + info.pNext = nullptr; + info.flags = 0; + info.hinstance = hInstance; + info.hwnd = hWindow; + + return vki->vkCreateWin32SurfaceKHR( + vki->instance(), &info, nullptr, pSurface); + } + +}
\ No newline at end of file |