windows: Software frontend is now mesa llvmpipe
This is a bit of a switch-up, see this comment for more background: refs: https://github.com/wez/wezterm/issues/265#issuecomment-701882933 This commit: * Adds a pre-compiled mesa3d opengl32.dll replacement * The mesa dll is deployed to `<appdir>/mesa/opengl32.dll` which by default is ignored. * When the frontend is set to `Software` then the `mesa` directory is added to the dll search path, causing the llvmpipe renderer to be enabled. * The old software renderer implementation is available using the `OldSoftware` frontend name I'm not a huge fan of the subdirectory for the opengl32.dll, but I couldn't get it to work under a different dll name; the code thought that everything was initialized, but the window just rendered a white rectangle.
This commit is contained in:
1 parent
6069eabc9b
commit
e6a858664f
10 files changed
+78
-5
No files matched your search
@@ -42,6 +42,11 @@ impl GuiFrontEnd {
|
||||
Self::try_new()
|
||||
}
|
||||
|
||||
pub fn try_new_swrast() -> anyhow::Result<Rc<dyn FrontEnd>> {
|
||||
::window::prefer_swrast();
|
||||
Self::try_new()
|
||||
}
|
||||
|
||||
pub fn try_new() -> anyhow::Result<Rc<dyn FrontEnd>> {
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
{
|
||||
@@ -49,6 +54,7 @@ impl GuiFrontEnd {
|
||||
Connection::disable_wayland();
|
||||
}
|
||||
}
|
||||
|
||||
let connection = Connection::init()?;
|
||||
let front_end = Rc::new(GuiFrontEnd { connection });
|
||||
Ok(front_end)
|
||||
|
||||
+5
-2
@@ -16,6 +16,7 @@ pub mod muxserver;
|
||||
pub enum FrontEndSelection {
|
||||
OpenGL,
|
||||
Software,
|
||||
OldSoftware,
|
||||
MuxServer,
|
||||
Null,
|
||||
}
|
||||
@@ -59,7 +60,8 @@ impl FrontEndSelection {
|
||||
let (front_end, is_gui) = match self {
|
||||
FrontEndSelection::MuxServer => (muxserver::MuxServerFrontEnd::try_new(), false),
|
||||
FrontEndSelection::Null => (muxserver::MuxServerFrontEnd::new_null(), false),
|
||||
FrontEndSelection::Software => (gui::GuiFrontEnd::try_new_no_opengl(), true),
|
||||
FrontEndSelection::Software => (gui::GuiFrontEnd::try_new_swrast(), true),
|
||||
FrontEndSelection::OldSoftware => (gui::GuiFrontEnd::try_new_no_opengl(), true),
|
||||
FrontEndSelection::OpenGL => (gui::GuiFrontEnd::try_new(), true),
|
||||
};
|
||||
|
||||
@@ -73,7 +75,7 @@ impl FrontEndSelection {
|
||||
|
||||
// TODO: find or build a proc macro for this
|
||||
pub fn variants() -> Vec<&'static str> {
|
||||
vec!["OpenGL", "Software", "MuxServer", "Null"]
|
||||
vec!["OpenGL", "Software", "OldSoftware", "MuxServer", "Null"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +86,7 @@ impl std::str::FromStr for FrontEndSelection {
|
||||
"muxserver" => Ok(FrontEndSelection::MuxServer),
|
||||
"null" => Ok(FrontEndSelection::Null),
|
||||
"software" => Ok(FrontEndSelection::Software),
|
||||
"oldsoftware" => Ok(FrontEndSelection::OldSoftware),
|
||||
"opengl" => Ok(FrontEndSelection::OpenGL),
|
||||
_ => Err(anyhow!(
|
||||
"{} is not a valid FrontEndSelection variant, possible values are {:?}",
|
||||
|
||||
Reference in new issue
Block a user