From a49bd742925b36e4b6687ce28de3358da038b8a7 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 29 Dec 2022 09:36:50 +0000 Subject: Disable depth and stencil buffers This patch reduces the active GPU memory consumption by disabling the depth and stencil buffers. During original testing it reduced GPU memory usage on Linux by almost a third. This is a reintroduction of previously reverted patch 3475e44. Closes #2881. --- alacritty/src/renderer/platform.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'alacritty/src/renderer/platform.rs') diff --git a/alacritty/src/renderer/platform.rs b/alacritty/src/renderer/platform.rs index 0f55d941..0a8263c1 100644 --- a/alacritty/src/renderer/platform.rs +++ b/alacritty/src/renderer/platform.rs @@ -42,7 +42,10 @@ pub fn pick_gl_config( gl_display: &Display, raw_window_handle: Option, ) -> Result { - let mut default_config = ConfigTemplateBuilder::new().with_transparency(true); + let mut default_config = ConfigTemplateBuilder::new() + .with_depth_size(0) + .with_stencil_size(0) + .with_transparency(true); if let Some(raw_window_handle) = raw_window_handle { default_config = default_config.compatible_with_native_window(raw_window_handle); -- cgit