mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
gtk: switch to vulkan as the default renderer
This commit is contained in:
@ -189,7 +189,7 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
|
|||||||
// 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.
|
// For the remainder of "why" see the 4.14 comment below.
|
||||||
gdk_disable.@"gles-api" = true;
|
gdk_disable.@"gles-api" = true;
|
||||||
gdk_disable.vulkan = true;
|
gdk_disable.vulkan = config.@"gtk-gsk-renderer" != .vulkan;
|
||||||
gdk_debug.@"gl-no-fractional" = true;
|
gdk_debug.@"gl-no-fractional" = true;
|
||||||
break :environment;
|
break :environment;
|
||||||
}
|
}
|
||||||
@ -202,13 +202,13 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
|
|||||||
// Upstream issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/6589
|
// Upstream issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/6589
|
||||||
gdk_debug.@"gl-disable-gles" = true;
|
gdk_debug.@"gl-disable-gles" = true;
|
||||||
gdk_debug.@"gl-no-fractional" = true;
|
gdk_debug.@"gl-no-fractional" = true;
|
||||||
gdk_debug.@"vulkan-disable" = true;
|
gdk_debug.@"vulkan-disable" = config.@"gtk-gsk-renderer" != .vulkan;
|
||||||
break :environment;
|
break :environment;
|
||||||
}
|
}
|
||||||
// Versions prior to 4.14 are a bit of an unknown for Ghostty. It
|
// Versions prior to 4.14 are a bit of an unknown for Ghostty. It
|
||||||
// is an environment that isn't tested well and we don't have a
|
// is an environment that isn't tested well and we don't have a
|
||||||
// good understanding of what we may need to do.
|
// good understanding of what we may need to do.
|
||||||
gdk_debug.@"vulkan-disable" = true;
|
gdk_debug.@"vulkan-disable" = config.@"gtk-gsk-renderer" != .vulkan;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -2192,7 +2192,7 @@ keybind: Keybinds = .{},
|
|||||||
/// default GSK renderer, or set the GSK_RENDERER environment variable to your
|
/// default GSK renderer, or set the GSK_RENDERER environment variable to your
|
||||||
/// renderer of choice before launching Ghostty. This setting has no effect when
|
/// renderer of choice before launching Ghostty. This setting has no effect when
|
||||||
/// using versions of GTK earlier than 4.14.0.
|
/// using versions of GTK earlier than 4.14.0.
|
||||||
@"gtk-gsk-renderer": GtkGskRenderer = .opengl,
|
@"gtk-gsk-renderer": GtkGskRenderer = .vulkan,
|
||||||
|
|
||||||
/// If `true`, the Ghostty GTK application will run in single-instance mode:
|
/// If `true`, the Ghostty GTK application will run in single-instance mode:
|
||||||
/// each new `ghostty` process launched will result in a new window if there is
|
/// each new `ghostty` process launched will result in a new window if there is
|
||||||
@ -6503,6 +6503,7 @@ pub const WindowPadding = struct {
|
|||||||
pub const GtkGskRenderer = enum {
|
pub const GtkGskRenderer = enum {
|
||||||
default,
|
default,
|
||||||
opengl,
|
opengl,
|
||||||
|
vulkan,
|
||||||
};
|
};
|
||||||
|
|
||||||
test "parse duration" {
|
test "parse duration" {
|
||||||
|
Reference in New Issue
Block a user