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

Detect Vulkan Xlib/Wayland surface support at runtime #4048

Merged
merged 5 commits into from Jan 14, 2018

Conversation

valpackett
Copy link
Contributor

No description provided.

@hcorion
Copy link
Member

hcorion commented Jan 12, 2018

Confirming that this fixed the issue for me.

@@ -1135,6 +1136,29 @@ namespace vk
}
};

class supported_extentions
Copy link
Contributor

Choose a reason for hiding this comment

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

You typo'd extensions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol oops :D

To support drivers without Wayland surface support
@kd-11
Copy link
Contributor

kd-11 commented Jan 14, 2018

../rpcs3/Emu/RSX/VK/VKHelpers.h:1258:29: error: ‘VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME’ was not declared in this scope
    if (support.is_supported(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME)) {

@valpackett
Copy link
Contributor Author

huh, I guess that needs the ifdef still

@kd-11
Copy link
Contributor

kd-11 commented Jan 14, 2018

Looks like not vulkan headers have the macro definition for wayland surface extension. You can manually link to an external deb which has said declaration and modify travis.yml or use the extension name itself. Travis isn't building as is, making this unmergable. I'd like to get this in fast as it is a hotfix.

@kd-11
Copy link
Contributor

kd-11 commented Jan 14, 2018

Disregard last, found it

#ifdef VK_USE_PLATFORM_WAYLAND_KHR
#define VK_KHR_wayland_surface 1
#include <wayland-client.h>

#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"

looks like a missing #ifdef like you posited

The extension name is not present when VK_USE_PLATFORM_WAYLAND_KHR is not defined
{
uint32_t count;
if (vkEnumerateInstanceExtensionProperties(nullptr, &count, nullptr) != VK_SUCCESS)
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

add space after the return here

#endif
supported_extensions support;
bool found_surface_ext = false;
if (support.is_supported(VK_KHR_XLIB_SURFACE_EXTENSION_NAME)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

brace on newline

#ifdef VK_USE_PLATFORM_WAYLAND_KHR
VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
if (support.is_supported(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

found_surface_ext = true;
}
#endif
if (!found_surface_ext) {
Copy link
Contributor

Choose a reason for hiding this comment

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

and here

@kd-11 kd-11 merged commit 15d0bdb into RPCS3:master Jan 14, 2018
Zangetsu38 pushed a commit to Zangetsu38/rpcs3 that referenced this pull request Jan 16, 2018
Detect Vulkan Xlib/Wayland surface support at runtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants