mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +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 "../dxvk/dxvk_format.h"
|
||||||
|
|
||||||
|
#include "../wsi/wsi_window.h"
|
||||||
|
|
||||||
namespace dxvk::vk {
|
namespace dxvk::vk {
|
||||||
|
|
||||||
Presenter::Presenter(
|
Presenter::Presenter(
|
||||||
@ -416,15 +418,7 @@ namespace dxvk::vk {
|
|||||||
|
|
||||||
|
|
||||||
VkResult Presenter::createSurface() {
|
VkResult Presenter::createSurface() {
|
||||||
HINSTANCE instance = reinterpret_cast<HINSTANCE>(
|
VkResult status = wsi::createSurface(m_window, m_vki, &m_surface);
|
||||||
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);
|
|
||||||
|
|
||||||
if (status != VK_SUCCESS)
|
if (status != VK_SUCCESS)
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user