diff options
author | Christian Duerr <contact@christianduerr.com> | 2022-12-29 09:36:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-29 12:36:50 +0300 |
commit | a49bd742925b36e4b6687ce28de3358da038b8a7 (patch) | |
tree | 6164ba22866b3c1dd9dd902109d66633e826286a | |
parent | d5e9d1d88317afc1f4374f2c2a7679cece14cb7b (diff) | |
download | alacritty-a49bd742925b36e4b6687ce28de3358da038b8a7.tar.gz alacritty-a49bd742925b36e4b6687ce28de3358da038b8a7.zip |
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.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | alacritty/src/renderer/platform.rs | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c3a97c8d..9f58f63a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Blurry fonts when changing padding size at runtime - Crash while typing on Wayland - Multi-line semantic bracket selection +- Reduced GPU memory usage ## 0.11.0 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<RawWindowHandle>, ) -> Result<Config, String> { - 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); |