After the commit with a message "mesa*: Add platforms option" (I use git repository hosted on github.com/freebsd/freebsd, it is the commit 25466cc) I can no longer use Vulkan applications (like vkquake) on Wayland: QUAKE ERROR: Couldn't create window: Installed Vulkan doesn't implement the VK_KHR_wayland_surfaceextension My port options are all set with exception of VDPAU.
A commit references this bug: Author: manu Date: Mon Jun 8 10:49:33 UTC 2020 New revision: 538209 URL: https://svnweb.freebsd.org/changeset/ports/538209 Log: mesa-dri: Add wayland to -Dplatform if option is selected PR: 247056 Approved by: zeising (x11@ implicit) Changes: head/graphics/mesa-dri/Makefile
Fixed in r538209. Built a poudriere image with only : devel/vulkan-tools graphics/drm-devel-kmod graphics/mesa-demos x11-wm/sway x11/alacritty and vulkaninfo and vkcube works correctly.
(In reply to Emmanuel Vadot from comment #2) > and vulkaninfo and vkcube works correctly. - vulkaninfo would work even without X11 and Wayland (see VK_KHR_display) - vkcube uses X11 via Xwayland as Wayland version crashes (VK_KHR_display works fine on console) Try the following instead: $ pkg install vkquake $ SDL_VIDEODRIVER=wayland vkquake & $ swaymsg -t get_tree | jq '.. | select(.shell? == "xdg_shell") | .name' "vkQuake 1.03.0"
(In reply to Jan Beich from comment #3) Am I supposed to see the "vkQuake 1.03.0" ?
I see one difference when I'm starting vkquake with SDL_VIDEODRIVER=wayland and without : - When SDL_VIDEODRIVER=wayland vkquake starts in windowed mode - When it's not set vkquake starts in fullscreen I'll build a new image tomorow with Xwayland disabled to be sure.
(In reply to Emmanuel Vadot from comment #4) Yep, in the list of native Wayland clients. "shell" is either "xwayland" for X11 clients and "xdg_shell" for Wayland clients. Another option is to advertise shell in window title: $ swaymsg for_window \[shell=".*"] title_format "%title :: %shell" or disable X11 support $ swaymsg xwayland disable $ pkill Xwayland
(In reply to Jan Beich from comment #6) Well I don't see any shell variable in swaymsg -t get_tree But using $ swaymsg for_window \[shell=".*"] title_format "%title :: %shell" Shows xdg_shell when I start vkquake with SDL_VIDEODRIVER=wayland When I don't set this variable and use your commands ( $ swaymsg xwayland disable $ pkill Xwayland) it starts it with Xwayland mode.
(In reply to Emmanuel Vadot from comment #7) Not sure if it's new or not but anyway vkquake with wayland works. also note that I've just got a freeze after 1/ swaymsg xwayland disable 2/ pkill Xwayland (it was killed) 3/ starting vkquake without SDL_VIDEODRIVER set (seems to be start in X11 mode) 4/ pkill Xwayland 5/ start vkquake again Not a freeze per-say but I ended up on the console with garbage on it, still could ssh to the machine and reboot. I'll try to reproduce and do a proper PR then.
(In reply to Emmanuel Vadot from comment #7) > it starts it with Xwayland mode. I guess, disabling X11 after startup is buggy. Sway doesn't clear DISPLAY variable that tells potential clients X11 can be used. Maybe Xwayland was restarted or pkill didn't have permissions due to setuid bit.
Works for me, thanks