SaschaWillems / VulkanCapsViewer

Vulkan hardware capability viewer
GNU Lesser General Public License v3.0
319 stars 70 forks source link

surface: Force QT plugin to match supported surface extension #222

Closed HildarTheDorf closed 2 days ago

HildarTheDorf commented 5 days ago

This results in useful info always being produced unless QT_QPA_PLATFORM has been explicitly set in the environment.

Note: Setting QT_QPA_PLATFORM=xcb when running on not-xcb will result in a segfault without #221.

HildarTheDorf commented 5 days ago

Note2: This causes the wayland build to not run on an X display server at all. This seems unlikely to be a problem in practice, and I intent to write a longer PR fixing that, but I can rethink things if that's unacceptable.

The error message is reasonably helpful, as error messages go:

karenw@zalera:~/src/VulkanCapsViewer$ ./vulkanCapsViewer 
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted (core dumped)