1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2025-11-06 22:44:18 -05:00

Fix OpenGL robustness crash

This disables the OpenGL context's robustness feature since some GPUs
that advertise robustness support do not support sufficient capabilities
for our implementation.

Closes #8713.
This commit is contained in:
Christian Duerr 2025-10-20 05:27:07 +00:00 committed by GitHub
parent 08882d521d
commit 7b33cbcbc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View file

@ -18,6 +18,12 @@ Notable changes to the `alacritty_terminal` crate are documented in its
- Brief error popup when saving the config file with some editors
## 0.16.1
### Fixed
- Crashes on GPUs with partial robustness support
## 0.16.0
### Packaging

View file

@ -4,9 +4,9 @@ use std::num::NonZeroU32;
use glutin::config::{ColorBufferType, Config, ConfigTemplateBuilder, GetGlConfig};
use glutin::context::{
ContextApi, ContextAttributesBuilder, GlProfile, NotCurrentContext, Robustness, Version,
ContextApi, ContextAttributesBuilder, GlProfile, NotCurrentContext, Version,
};
use glutin::display::{Display, DisplayApiPreference, DisplayFeatures, GetGlDisplay};
use glutin::display::{Display, DisplayApiPreference, GetGlDisplay};
use glutin::error::Result as GlutinResult;
use glutin::prelude::*;
use glutin::surface::{Surface, SurfaceAttributesBuilder, WindowSurface};
@ -110,12 +110,7 @@ pub fn create_gl_context(
raw_window_handle: Option<RawWindowHandle>,
) -> GlutinResult<NotCurrentContext> {
let debug = log::max_level() >= LevelFilter::Debug;
let mut builder = ContextAttributesBuilder::new().with_debug(debug);
// Try to enable robustness.
if gl_display.supported_features().contains(DisplayFeatures::CONTEXT_ROBUSTNESS) {
builder = builder.with_robustness(Robustness::RobustLoseContextOnReset);
}
let builder = ContextAttributesBuilder::new().with_debug(debug);
let mut profiles = [
builder