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 /alacritty/src | |
parent | d5e9d1d88317afc1f4374f2c2a7679cece14cb7b (diff) | |
download | r-alacritty-a49bd742925b36e4b6687ce28de3358da038b8a7.tar.gz r-alacritty-a49bd742925b36e4b6687ce28de3358da038b8a7.tar.bz2 r-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.
Diffstat (limited to 'alacritty/src')
-rw-r--r-- | alacritty/src/renderer/platform.rs | 5 |
1 files changed, 4 insertions, 1 deletions
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); |