mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app: disable Vulkan on X11
According to https://gioui.org/issue/347 and https://github.com/godotengine/godot/issues/43714 choosing the integrated Intel GPU on a multi-GPU system with NVIDIA doesn't work well in X11. According to Godot, forcing the use of the discrete (NVIDIA) GPU works around the problem. This change disables Vulkan on X11 instead, which is a more conservative and targeted fix. Disabling Vulkan on X11 will reduce testing of Vulkan, but - Pierre is making Wayland the default driver on Linux, where Vulkan is enabled. - The OpenGL driver will be exercized more. Fixes: https://todo.sr.ht/~eliasnaur/gio/347 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+5
-1
@@ -118,9 +118,13 @@ var (
|
||||
newX11VulkanContext func(w *x11Window) (context, error)
|
||||
)
|
||||
|
||||
// X11 and Vulkan doesn't work reliably on NVIDIA systems.
|
||||
// See https://gioui.org/issue/347.
|
||||
const vulkanBuggy = true
|
||||
|
||||
func (w *x11Window) NewContext() (context, error) {
|
||||
var firstErr error
|
||||
if f := newX11VulkanContext; f != nil {
|
||||
if f := newX11VulkanContext; f != nil && !vulkanBuggy {
|
||||
c, err := f(w)
|
||||
if err == nil {
|
||||
return c, nil
|
||||
|
||||
Reference in New Issue
Block a user