1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00

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.
This commit is contained in:
Christian Duerr 2022-12-29 09:36:50 +00:00 committed by GitHub
parent d5e9d1d883
commit a49bd74292
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -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 - Blurry fonts when changing padding size at runtime
- Crash while typing on Wayland - Crash while typing on Wayland
- Multi-line semantic bracket selection - Multi-line semantic bracket selection
- Reduced GPU memory usage
## 0.11.0 ## 0.11.0

View file

@ -42,7 +42,10 @@ pub fn pick_gl_config(
gl_display: &Display, gl_display: &Display,
raw_window_handle: Option<RawWindowHandle>, raw_window_handle: Option<RawWindowHandle>,
) -> Result<Config, String> { ) -> 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 { if let Some(raw_window_handle) = raw_window_handle {
default_config = default_config.compatible_with_native_window(raw_window_handle); default_config = default_config.compatible_with_native_window(raw_window_handle);