Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@ void SwapChainVkImpl::CreateSurface()

err = vkCreateMetalSurfaceEXT(m_Instance->GetVkInstance(), &surfaceCreateInfo, NULL, &m_VkSurface);
}
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR)
if (m_Window.pDisplay != nullptr)
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR) || defined(VK_USE_PLATFORM_XCB_KHR) || defined(VK_USE_PLATFORM_XLIB_KHR)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty branch that remained from your first version

# if defined(VK_USE_PLATFORM_WAYLAND_KHR)
if (m_Window.pDisplay != nullptr && m_Window.pWaylandSurface != nullptr)
{
VkWaylandSurfaceCreateInfoKHR surfaceCreateInfo{};
surfaceCreateInfo.sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR;
surfaceCreateInfo.display = reinterpret_cast<struct wl_display*>(m_Window.pDisplay);
surfaceCreateInfo.Surface = reinterpret_cast<struct wl_surface*>(nullptr);

surfaceCreateInfo.display = static_cast<wl_display*>(m_Window.pDisplay);
surfaceCreateInfo.surface = static_cast<wl_surface*>(m_Window.pWaylandSurface);
err = vkCreateWaylandSurfaceKHR(m_Instance->GetVkInstance(), &surfaceCreateInfo, nullptr, &m_VkSurface);
}
#elif defined(VK_USE_PLATFORM_XCB_KHR) || defined(VK_USE_PLATFORM_XLIB_KHR)
# endif

# if defined(VK_USE_PLATFORM_XCB_KHR)
if (m_Window.pXCBConnection != nullptr && m_Window.WindowId != 0)
Expand Down
7 changes: 4 additions & 3 deletions Platforms/Linux/interface/LinuxNativeWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ DILIGENT_BEGIN_NAMESPACE(Diligent)

struct LinuxNativeWindow
{
Uint32 WindowId DEFAULT_INITIALIZER(0);
void* pDisplay DEFAULT_INITIALIZER(nullptr);
void* pXCBConnection DEFAULT_INITIALIZER(nullptr);
Uint32 WindowId DEFAULT_INITIALIZER(0);
void* pDisplay DEFAULT_INITIALIZER(nullptr);
void* pXCBConnection DEFAULT_INITIALIZER(nullptr);
void* pWaylandSurface DEFAULT_INITIALIZER(nullptr);
};

DILIGENT_END_NAMESPACE // namespace Diligent