Linux: Add Vulkan support for wayland #553

Merged
SSimco merged 14 commits from wayland into main 2022-12-07 12:45:25 -03:00
SSimco commented 2022-12-04 12:42:53 -03:00 (Migrated from github.com)
No description provided.
amayra commented 2022-12-04 14:57:19 -03:00 (Migrated from github.com)

cemu crashed without a log file in Wayland when I chose Vulkan but I blamed my configuration or distro

I never think that cemu don't fully support Wayland yet

cemu crashed without a log file in Wayland when I chose Vulkan but I blamed my configuration or distro I never think that cemu don't fully support Wayland yet
SSimco commented 2022-12-04 16:54:14 -03:00 (Migrated from github.com)

cemu crashed without a log file in Wayland when I chose Vulkan but I blamed my configuration or distro

I never think that cemu don't fully support Wayland yet

Can you try running Cemu in a terminal and post the stack trace?

It might not work on all configurations. I can't get it to run on my NVIDIA dGPU while it runs fine on the integrated GPU.

> cemu crashed without a log file in Wayland when I chose Vulkan but I blamed my configuration or distro > > I never think that cemu don't fully support Wayland yet Can you try running Cemu in a terminal and post the stack trace? It might not work on all configurations. I can't get it to run on my NVIDIA dGPU while it runs fine on the integrated GPU.
Exzap commented 2022-12-05 11:08:34 -03:00 (Migrated from github.com)

Looks good so far, but having both VK_KHR_XLIB_SURFACE_EXTENSION and VK_KHR_WAYLAND_SURFACE_EXTENSION in the list of required extensions will effectively lock out Vulkan devices that only expose one of the two. It would be better to handle it dynamically instead of having a hard requirement.

Looks good so far, but having both `VK_KHR_XLIB_SURFACE_EXTENSION` and `VK_KHR_WAYLAND_SURFACE_EXTENSION` in the list of **required** extensions will effectively lock out Vulkan devices that only expose one of the two. It would be better to handle it dynamically instead of having a hard requirement.
SSimco commented 2022-12-05 15:57:35 -03:00 (Migrated from github.com)

I changed it so it will only have one of those extensions corresponding to what backend the main window has.

I changed it so it will only have one of those extensions corresponding to what backend the main window has.
amayra commented 2022-12-05 19:38:12 -03:00 (Migrated from github.com)

cemu crashed without a log file in Wayland when I chose Vulkan but I blamed my configuration or distro
I never think that cemu don't fully support Wayland yet

Can you try running Cemu in a terminal and post the stack trace?

It might not work on all configurations. I can't get it to run on my NVIDIA dGPU while it runs fine on the integrated GPU.

`(Cemu:476399): Gdk-CRITICAL **: 23:40:49.009: gdk_x11_window_get_xid: assertion 'GDK_IS_X11_WINDOW (window)' failed

(Cemu:476399): Gtk-CRITICAL **: 23:40:49.688: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Cemu:476399): Gdk-CRITICAL **: 23:41:06.606: gdk_x11_window_get_xid: assertion 'GDK_IS_X11_WINDOW (window)' failed
`

> > cemu crashed without a log file in Wayland when I chose Vulkan but I blamed my configuration or distro > > I never think that cemu don't fully support Wayland yet > > Can you try running Cemu in a terminal and post the stack trace? > > It might not work on all configurations. I can't get it to run on my NVIDIA dGPU while it runs fine on the integrated GPU. `(Cemu:476399): Gdk-CRITICAL **: 23:40:49.009: gdk_x11_window_get_xid: assertion 'GDK_IS_X11_WINDOW (window)' failed (Cemu:476399): Gtk-CRITICAL **: 23:40:49.688: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar (Cemu:476399): Gdk-CRITICAL **: 23:41:06.606: gdk_x11_window_get_xid: assertion 'GDK_IS_X11_WINDOW (window)' failed `
SSimco commented 2022-12-05 20:00:34 -03:00 (Migrated from github.com)

cemu crashed without a log file in Wayland when I chose Vulkan but I blamed my configuration or distro
I never think that cemu don't fully support Wayland yet

Can you try running Cemu in a terminal and post the stack trace?
It might not work on all configurations. I can't get it to run on my NVIDIA dGPU while it runs fine on the integrated GPU.

`(Cemu:476399): Gdk-CRITICAL **: 23:40:49.009: gdk_x11_window_get_xid: assertion 'GDK_IS_X11_WINDOW (window)' failed

(Cemu:476399): Gtk-CRITICAL **: 23:40:49.688: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Cemu:476399): Gdk-CRITICAL **: 23:41:06.606: gdk_x11_window_get_xid: assertion 'GDK_IS_X11_WINDOW (window)' failed `

I don't think you are using the right version of Cemu, those errors would only show up if you used a version without this patch.

Try recompiling Cemu with the patch from this PR.

> > > cemu crashed without a log file in Wayland when I chose Vulkan but I blamed my configuration or distro > > > I never think that cemu don't fully support Wayland yet > > > > > > Can you try running Cemu in a terminal and post the stack trace? > > It might not work on all configurations. I can't get it to run on my NVIDIA dGPU while it runs fine on the integrated GPU. > > `(Cemu:476399): Gdk-CRITICAL **: 23:40:49.009: gdk_x11_window_get_xid: assertion 'GDK_IS_X11_WINDOW (window)' failed > > (Cemu:476399): Gtk-CRITICAL **: 23:40:49.688: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar > > (Cemu:476399): Gdk-CRITICAL **: 23:41:06.606: gdk_x11_window_get_xid: assertion 'GDK_IS_X11_WINDOW (window)' failed ` I don't think you are using the right version of Cemu, those errors would only show up if you used a version without this patch. Try recompiling Cemu with the patch from this PR.
qurious-pixel commented 2022-12-05 21:36:05 -03:00 (Migrated from github.com)

@amayra Also make sure you are using the binary, as the appimage currently forces X11 backend, and is missing some of the required libs for wayland.

@amayra Also make sure you are using the binary, as the appimage currently forces X11 backend, and is missing some of the required libs for wayland.
amayra commented 2022-12-06 08:42:23 -03:00 (Migrated from github.com)

i used AUR version not appimage this least version Cemu 2.0-19 (Experimental)

but i don't know how to complied cemu with PR patch im still new to linux

i will wait for it get add to master repo to test it again

right now everything work fine X11 plus ryujinx and PPSSPP have some problems before

i used AUR version not appimage this least version Cemu 2.0-19 (Experimental) but i don't know how to complied cemu with PR patch im still new to linux i will wait for it get add to master repo to test it again right now everything work fine X11 plus ryujinx and PPSSPP have some problems before
Exzap commented 2022-12-06 21:57:46 -03:00 (Migrated from github.com)

This seems to create wxWlSubsurface in VulkanCanvas constructor only for the main window but not for the pad view window. Is this intentional?

This seems to create `wxWlSubsurface` in `VulkanCanvas` constructor only for the main window but not for the pad view window. Is this intentional?
SSimco commented 2022-12-06 22:29:21 -03:00 (Migrated from github.com)

This seems to create wxWlSubsurface in VulkanCanvas constructor only for the main window but not for the pad view window. Is this intentional?

Yes. I've done it that way because it would paint over the menus in the main window if I used the same surface, and the only workaround that I've found is to make a new surface, that has the role of a subsurface, and offset its position with the position of the VulkanCavas.

Since the pad view creates a new frame that doesn't have a menu bar, it doesn't matter on what surface it draws on.

> This seems to create `wxWlSubsurface` in `VulkanCanvas` constructor only for the main window but not for the pad view window. Is this intentional? Yes. I've done it that way because it would paint over the menus in the main window if I used the same surface, and the only workaround that I've found is to make a new surface, that has the role of a subsurface, and offset its position with the position of the `VulkanCavas`. Since the pad view creates a new frame that doesn't have a menu bar, it doesn't matter on what surface it draws on.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: cemu-project_Mirror/Cemu-2024-03-05#553
No description provided.