mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
apprt/gtk: use proper env var for vulkan disable on <= 4.14
This commit is contained in:
@ -100,9 +100,11 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Disabling Vulkan can improve startup times by hundreds of
|
// Disabling Vulkan can improve startup times by hundreds of
|
||||||
// milliseconds on some systems
|
// milliseconds on some systems. We don't use Vulkan so we can just
|
||||||
|
// disable it.
|
||||||
if (version.atLeast(4, 16, 0)) {
|
if (version.atLeast(4, 16, 0)) {
|
||||||
// From gtk 4.16, GDK_DEBUG is split into GDK_DEBUG and GDK_DISABLE
|
// From gtk 4.16, GDK_DEBUG is split into GDK_DEBUG and GDK_DISABLE.
|
||||||
|
// For the remainder of "why" see the 4.14 comment below.
|
||||||
_ = internal_os.setenv("GDK_DISABLE", "gles-api,vulkan");
|
_ = internal_os.setenv("GDK_DISABLE", "gles-api,vulkan");
|
||||||
_ = internal_os.setenv("GDK_DEBUG", "opengl");
|
_ = internal_os.setenv("GDK_DEBUG", "opengl");
|
||||||
} else if (version.atLeast(4, 14, 0)) {
|
} else if (version.atLeast(4, 14, 0)) {
|
||||||
@ -112,14 +114,14 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
|
|||||||
// reassess...
|
// reassess...
|
||||||
//
|
//
|
||||||
// Upstream issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/6589
|
// Upstream issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/6589
|
||||||
_ = internal_os.setenv("GDK_DISABLE", "vulkan");
|
_ = internal_os.setenv("GDK_DEBUG", "opengl,gl-disable-gles,vulkan-disable");
|
||||||
_ = internal_os.setenv("GDK_DEBUG", "opengl,gl-disable-gles");
|
|
||||||
} else {
|
} else {
|
||||||
_ = internal_os.setenv("GDK_DISABLE", "vulkan");
|
_ = internal_os.setenv("GDK_DEBUG", "vulkan-disable");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version.atLeast(4, 14, 0)) {
|
if (version.atLeast(4, 14, 0)) {
|
||||||
// We need to export GSK_RENDERER to opengl because GTK uses ngl by default after 4.14
|
// We need to export GSK_RENDERER to opengl because GTK uses ngl by
|
||||||
|
// default after 4.14
|
||||||
_ = internal_os.setenv("GSK_RENDERER", "opengl");
|
_ = internal_os.setenv("GSK_RENDERER", "opengl");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user