1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2025-02-10 15:46:10 -05:00

Fallback to underline shader when dotted fails

Some hardware is just bad.

Fixes #7404.
This commit is contained in:
Kirill Chibisov 2023-12-02 03:52:51 +04:00 committed by GitHub
parent 546d5951aa
commit 28364792b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -73,6 +73,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Message bar content getting stuck after closing with multiple messages on Wayland
- Vi cursor position not redrawn on PageUp/PageDown without scrollback
- Cursor not updating when blinking and viewport is scrolled
- Failure to start with recent version of mesa's i915 driver
### Removed

View file

@ -3,6 +3,7 @@ use std::mem;
use ahash::RandomState;
use crossfont::Metrics;
use log::info;
use alacritty_terminal::grid::Dimensions;
use alacritty_terminal::index::{Column, Point};
@ -261,7 +262,16 @@ impl RectRenderer {
let rect_program = RectShaderProgram::new(shader_version, RectKind::Normal)?;
let undercurl_program = RectShaderProgram::new(shader_version, RectKind::Undercurl)?;
let dotted_program = RectShaderProgram::new(shader_version, RectKind::DottedUnderline)?;
// This shader has way more ALU operations than other rect shaders, so use a fallback
// to underline just for it when we can't compile it.
let dotted_program = match RectShaderProgram::new(shader_version, RectKind::DottedUnderline)
{
Ok(dotted_program) => dotted_program,
Err(err) => {
info!("Error compiling dotted shader: {err}\n falling back to underline");
RectShaderProgram::new(shader_version, RectKind::Normal)?
},
};
let dashed_program = RectShaderProgram::new(shader_version, RectKind::DashedUnderline)?;
unsafe {