mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[vulkan] Use surface creation from wsi interface
This commit is contained in:
parent
86b603b8f9
commit
4f80ffd830
@ -2,6 +2,8 @@
|
||||
|
||||
#include "../dxvk/dxvk_format.h"
|
||||
|
||||
#include "../wsi/wsi_window.h"
|
||||
|
||||
namespace dxvk::vk {
|
||||
|
||||
Presenter::Presenter(
|
||||
@ -416,16 +418,8 @@ namespace dxvk::vk {
|
||||
|
||||
|
||||
VkResult Presenter::createSurface() {
|
||||
HINSTANCE instance = reinterpret_cast<HINSTANCE>(
|
||||
GetWindowLongPtr(m_window, GWLP_HINSTANCE));
|
||||
|
||||
VkWin32SurfaceCreateInfoKHR info = { VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR };
|
||||
info.hinstance = instance;
|
||||
info.hwnd = m_window;
|
||||
|
||||
VkResult status = m_vki->vkCreateWin32SurfaceKHR(
|
||||
m_vki->instance(), &info, nullptr, &m_surface);
|
||||
|
||||
VkResult status = wsi::createSurface(m_window, m_vki, &m_surface);
|
||||
|
||||
if (status != VK_SUCCESS)
|
||||
return status;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user