window: X/Wayland: Software frontend is now llvmpipe

refs: https://github.com/wez/wezterm/issues/265#issuecomment-701882933
This commit is contained in:
Wez Furlong committed 2020-10-01 20:03:45 -07:00
1 parent e6a858664f
commit f3bccc7d08
2 files changed
+9 -4

No files matched your search

+1 -1
View File
@@ -1,4 +1,3 @@
use anyhow::Context as _;
use std::path::Path;
use vergen::{generate_cargo_keys, ConstantsFlags};
@@ -68,6 +67,7 @@ fn main() {
#[cfg(windows)]
{
use anyhow::Context as _;
use std::io::Write;
let profile = std::env::var("PROFILE").unwrap();
let exe_output_dir = Path::new("target").join(profile);
+8 -3
View File
@@ -1,3 +1,4 @@
use crate::{is_swrast_preferred, prefer_swrast};
use anyhow::{anyhow, bail, ensure, Error};
use std::ffi::c_void;
use std::rc::Rc;
@@ -390,6 +391,11 @@ impl GlState {
let mut errors = vec![];
for _ in 0..2 {
if is_swrast_preferred() {
// Assuming that we're using Mesa, set an environment
// variable that should select CPU based rendering.
std::env::set_var("LIBGL_ALWAYS_SOFTWARE", "true");
}
for path in &paths {
if let Ok(lib) = libloading::Library::new(path) {
match EglWrapper::load_egl(lib) {
@@ -408,9 +414,8 @@ impl GlState {
}
}
}
// If we're using Mesa, set some environment variables
// that should select CPU based rendering and try again
std::env::set_var("LIBGL_ALWAYS_SOFTWARE", "true");
// Since we didn't yet succeed, try enabling software rasterization
prefer_swrast();
}
bail!("with_egl_lib failed: {}", errors.join(", "))
}