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:
parent
546d5951aa
commit
28364792b3
2 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue