Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Vulkan on Wayland #3994

Merged
merged 3 commits into from
Jan 11, 2018
Merged

Conversation

valpackett
Copy link
Contributor

Works on QT_QPA_PLATFORM=wayland-egl:

rpcs3-wayland-vulkan

@Megamouse
Copy link
Contributor

Megamouse commented Dec 29, 2017

please try to adjust to our coding style as described in here: https://github.com/RPCS3/rpcs3/wiki/Coding-Style
only then can we properly review this contribution.

There are a lot of missing or wrong indentations like with the namespaces and you often have opening braces in the same line instead of a new one.

@@ -145,6 +150,17 @@ void gs_frame::show()
});
}

#ifdef VK_USE_PLATFORM_WAYLAND_KHR
std::pair<wl_display*, wl_surface*> gs_frame::wayland_handle() const
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Move this into gs_frame::handle(). The checks in VKGSRender to check if wayland handle is valid can also be done there.

#ifdef VK_USE_PLATFORM_WAYLAND_KHR
, std::pair<wl_display*, wl_surface*>
#endif
> VkUnixContext;
Copy link
Contributor

Choose a reason for hiding this comment

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

This template can be moved to gsframe header instead as it is not restricted to use with vulkan only and holds general unix window and display properties. Name can be changed to reflect that as well, something like unix_display_context or something along those lines

@valpackett valpackett force-pushed the wayland-vulkan branch 2 times, most recently from 13c05bb to bffeda5 Compare December 31, 2017 15:51
The variable VK_USE_PLATFORM_WAYLAND_KHR is actually used by the Vulkan
header, so use it here too.
@valpackett
Copy link
Contributor Author

Moved the stuff to gsframe header. New version: handle() returns display_handle_t which an alias for HWND on Windows, and this variant on Unix.

also moved some identical code outside of platform ifdefs in VKGSRender.cpp

@@ -8,6 +8,13 @@
#include <QTimer>
#include <QThread>

#ifdef VK_USE_PLATFORM_WAYLAND_KHR
Copy link
Contributor

Choose a reason for hiding this comment

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

This whole block from line 11 to 16 should be in an ifndef _WIN32 block. That should fix appveyor CI and allow this set to be mergeable

@Inviuz
Copy link
Contributor

Inviuz commented Jan 9, 2018

@jxpz Completely unrelated. The issue that talks about problems with newest nvidia driver is already closed. Issue number #4036

@RPCS3 RPCS3 deleted a comment Jan 9, 2018
@RPCS3 RPCS3 deleted a comment Jan 9, 2018
@kd-11 kd-11 merged commit 5959411 into RPCS3:master Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants