From 3475e449870b382cda4ea6d48f980577cd8c929e Mon Sep 17 00:00:00 2001 From: Jasper Mattsson Date: Fri, 11 Oct 2019 23:16:13 +0300 Subject: [PATCH] Disable depth and stencil buffers Disable allocation of depth and stencil buffers. This reduces active GPU memory consumption by almost a third, at least on Linux. --- CHANGELOG.md | 1 + alacritty/src/window.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7a28413..8bc0097d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Crash when resuming after suspension - Crash when trying to start on X11 with a Wayland compositor running - Crash with a virtual display connected on X11 +- GPU memory usage has been decreased by disabling allocation of depth and stencil buffers ### Removed diff --git a/alacritty/src/window.rs b/alacritty/src/window.rs index 4b5de2c9..c783dc69 100644 --- a/alacritty/src/window.rs +++ b/alacritty/src/window.rs @@ -117,6 +117,8 @@ fn create_gl_window( let windowed_context = ContextBuilder::new() .with_srgb(srgb) .with_vsync(true) + .with_depth_buffer(0) + .with_stencil_buffer(0) .with_hardware_acceleration(None) .build_windowed(window, event_loop)?;